:root {
  --bg: #1a1a22;
  --bg-alt: #16161e;
  --panel: #26262f;
  --panel-border: rgba(170, 160, 200, 0.10);
  --text-main: #dcdce6;
  --text-dim: #9b98ab;
  --silver: #c7c8d6;
  --silver-soft: rgba(199, 200, 214, 0.12);
  --purple: #a970ff;
  --purple-soft: rgba(169, 112, 255, 0.14);
  --purple-line: rgba(169, 112, 255, 0.45);
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input,
textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes dotBounce {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0) scale(0.85); }
  40% { opacity: 1; transform: translateY(-4px) scale(1); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(199,200,214,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(199,200,214,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 72%);
  pointer-events: none;
  z-index: 0;
  animation: fadeIn 1.2s ease both;
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 760px;
  background: radial-gradient(circle, rgba(169,112,255,0.12) 0%, rgba(169,112,255,0) 60%);
  pointer-events: none;
  z-index: 0;
  animation: fadeIn 1.6s ease both;
}

.topbar {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.topbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  animation: fadeInUp 1.1s var(--ease-out) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(169, 112, 255, 0.22), rgba(199, 200, 214, 0.06));
  color: var(--purple);
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.25s var(--ease-out);
}

.brand:hover .brand-mark {
  transform: scale(1.05);
}

.brand-name {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.3px;
  color: var(--text-main);
  text-transform: uppercase;
  transition: letter-spacing 0.3s ease;
}

.brand:hover .brand-name {
  letter-spacing: 0.6px;
}

.brand-name em {
  font-style: normal;
  color: var(--purple);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--discord);
  text-decoration: none;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 8px 15px;
  background: rgba(88, 101, 242, 0.12);
  border-radius: 0;
  transition: background 0.25s ease, transform 0.25s var(--ease-out);
}

.login-link:hover {
  background: rgba(88, 101, 242, 0.2);
  transform: translateY(-2px);
}

.login-link:active {
  transform: translateY(0) scale(0.97);
}

.login-link:hover .discord-icon {
  transform: scale(1.15) rotate(-6deg);
}

.discord-icon {
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out);
}

.stage {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 32px 24px 48px;
}

.hero-card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 640px;
  text-align: center;
  animation: fadeInUp 1.1s var(--ease-out) both;
}

.hero-title {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 500;
  font-size: 36px;
  line-height: 1.22;
  letter-spacing: 0.2px;
  color: var(--text-main);
  margin-bottom: 18px;
  animation: fadeInUp 1.1s var(--ease-out) 0.2s both;
}

.hero-title em {
  font-style: normal;
  color: var(--purple);
}

.hero-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 440px;
  margin: 0 auto 30px;
  animation: fadeInUp 1.1s var(--ease-out) 0.4s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 1.1s var(--ease-out) 0.6s both;
}

.btn-primary {
  display: inline-block;
  text-decoration: none;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--purple);
  background: rgba(169, 112, 255, 0.14);
  padding: 12px 24px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--ease-out);
}

.btn-primary:hover {
  background: rgba(169, 112, 255, 0.22);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-ghost {
  display: inline-block;
  text-decoration: none;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--text-main);
  background: rgba(199, 200, 214, 0.09);
  padding: 12px 22px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.25s ease, color 0.2s ease, transform 0.25s var(--ease-out);
}

.topnav .btn-ghost,
.topnav-loggedin .btn-ghost {
  padding: 8px 15px;
  font-size: 13px;
  color: #f2555a;
  background: rgba(242, 85, 90, 0.1);
}

.topnav .btn-ghost:hover,
.topnav-loggedin .btn-ghost:hover {
  background: rgba(242, 85, 90, 0.18);
  color: #f2555a;
}

.btn-ghost:hover {
  background: rgba(199, 200, 214, 0.16);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost:active {
  transform: translateY(0) scale(0.97);
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: var(--discord);
  background: rgba(88, 101, 242, 0.12);
  padding: 13px 26px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--ease-out);
}

.btn-discord:hover {
  background: rgba(88, 101, 242, 0.2);
  transform: translateY(-2px);
}

.btn-discord:active {
  transform: translateY(0) scale(0.97);
}

.login-error {
  font-size: 13px;
  color: #f2555a;
  background: rgba(242, 85, 90, 0.1);
  border: 1px solid rgba(242, 85, 90, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 24px;
  animation: fadeInUp 0.4s var(--ease-out) both;
}

.topnav-loggedin {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Chakra Petch', sans-serif;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-username {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f2555a;
  text-decoration: none;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 8px 15px;
  background: rgba(242, 85, 90, 0.1);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--ease-out);
}

.btn-logout:hover {
  background: rgba(242, 85, 90, 0.18);
  transform: translateY(-2px);
}

/* ---------- Upload / Dropzone ---------- */

.upload-card {
  max-width: 640px;
  text-align: left;
}

.upload-card .hero-title,
.upload-card .hero-text {
  text-align: center;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
  animation: fadeInUp 0.9s var(--ease-out) 0.3s both;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  border: none;
  border-radius: 12px;
  background: var(--bg-alt);
  cursor: pointer;
  text-align: center;
  transition: background 0.25s ease, transform 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  background: var(--purple-soft);
  transform: translateY(-2px);
}

.dropzone-icon {
  color: var(--text-dim);
  transition: transform 0.3s var(--ease-out), color 0.25s ease;
}

.dropzone.dragover .dropzone-icon,
.dropzone:hover .dropzone-icon {
  color: var(--purple);
  animation: floatY 1.4s ease-in-out infinite;
}

.dropzone-text {
  font-size: 14px;
  color: var(--text-dim);
}

.dropzone-link {
  color: var(--purple);
  text-decoration: underline;
}

.file-input {
  display: none;
}

.file-list {
  width: 100%;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--panel);
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-main);
  animation: fadeInUp 0.3s var(--ease-out) both;
  transition: background 0.2s ease;
}

.file-item:hover {
  background: rgba(169, 112, 255, 0.09);
}

.file-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 0;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.file-remove:hover {
  color: #f2555a;
  background: rgba(242, 85, 90, 0.1);
  transform: scale(1.1) rotate(90deg);
}

.submit-btn {
  width: 100%;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-size: 15px;
  padding: 13px 24px;
  background: rgba(47, 168, 96, 0.12);
  color: #3bb36f;
  transition: background 0.25s ease, transform 0.2s var(--ease-out);
}

.submit-btn:hover {
  background: rgba(47, 168, 96, 0.2);
  transform: translateY(-2px);
}

.submit-btn:active {
  transform: translateY(0) scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.upload-status {
  text-align: center;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  animation: fadeInUp 0.35s var(--ease-out) both;
}

.upload-status.success {
  color: #3bb36f;
  background: rgba(59, 179, 111, 0.1);
}

.upload-status.error {
  color: #f2555a;
  background: rgba(242, 85, 90, 0.1);
}

/* ---------- Link-Liste (eigene / alle Uploads) ---------- */

.links-section {
  margin-top: 34px;
  width: 100%;
}

.links-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 12px;
  text-align: left;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: 10px;
  animation: fadeInUp 0.35s var(--ease-out) both;
  transition: background 0.2s ease;
}

.link-item:hover {
  background: rgba(169, 112, 255, 0.07);
}

.link-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--panel);
}

.link-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.link-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-url {
  font-size: 12.5px;
  color: var(--purple);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
}

.link-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.link-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.link-copy-btn,
.link-delete-btn {
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  transition: transform 0.2s var(--ease-out), background 0.2s ease;
}

.link-copy-btn {
  background: rgba(169, 112, 255, 0.14);
  color: var(--purple);
}

.link-copy-btn:hover {
  background: rgba(169, 112, 255, 0.22);
  transform: translateY(-1px);
}

.link-copy-btn.copied {
  background: rgba(47, 168, 96, 0.18);
  color: #3bb36f;
}

.link-delete-btn {
  background: rgba(242, 85, 90, 0.1);
  color: #f2555a;
}

.link-delete-btn:hover {
  background: rgba(242, 85, 90, 0.18);
  transform: translateY(-1px);
}

.links-empty {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  padding: 20px 0;
}

.admin-links-list .link-item {
  flex-wrap: wrap;
}

.admin-owner {
  font-size: 11px;
  color: var(--discord);
  font-family: 'Chakra Petch', sans-serif;
}

/* ---------- Toast ---------- */

.notify1 {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 20px -14px rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.35s ease;
  pointer-events: none;
}

.notify1.show {
  transform: translateX(0);
  opacity: 1;
}

.notify1.success {
  background: rgba(47, 168, 96, 0.16);
  color: #3bb36f;
}

.notify1.error {
  background: rgba(242, 85, 90, 0.16);
  color: #f2555a;
}

@media (max-width: 560px) {
  .topbar { padding: 20px 16px 0; }
  .hero-title { font-size: 27px; }
  .link-item { flex-wrap: wrap; }
  .notify1 {
    left: 16px;
    right: 16px;
    top: 16px;
    transform: translateY(-120%);
  }
  .notify1.show { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Sprachmenü (Pflicht-Overlay) ---------- */

.lang-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 20, 0.82);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lang-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.lang-modal {
  width: 100%;
  max-width: 380px;
  margin: 0 20px;
  padding: 36px 30px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  text-align: center;
  animation: scaleIn 0.35s var(--ease-out) both;
}

.lang-modal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(169, 112, 255, 0.22), rgba(199, 200, 214, 0.06));
  color: var(--purple);
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.lang-modal-title {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 500;
  font-size: 21px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.lang-modal-text {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.lang-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lang-choice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: 0;
  cursor: pointer;
  padding: 13px 20px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-main);
  background: rgba(199, 200, 214, 0.09);
  transition: background 0.2s ease, transform 0.2s var(--ease-out);
}

.lang-choice-btn:hover {
  background: var(--purple-soft);
  color: var(--purple);
  transform: translateY(-2px);
}

.lang-flag {
  font-size: 17px;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  cursor: pointer;
  padding: 8px 14px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #3bb36f;
  background: rgba(47, 168, 96, 0.14);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-out);
}

.lang-switch-btn:hover {
  background: rgba(47, 168, 96, 0.24);
  border-color: none;
  transform: translateY(-2px);
}

.lang-switch-btn:active {
  transform: translateY(0) scale(0.97);
}