/* =========================
   Grundlayout & Hintergrund
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Gemeinsamer Hintergrund für Frontend + Backend */
.main-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top, #e0f2fe 0%, #bfdbfe 30%, #60a5fa 55%, #1f2937 90%),
    linear-gradient(to bottom, #111827 0%, #020617 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: #e5edff;
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
}



/* Admin ergänzt nur minimale Anpassungen */
.admin-body {
  min-height: 100vh;
}

/* =========================
   Topbar / Header
   ========================= */

.topbar {
  width: 100%;
  padding: 0.8rem 8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px);
  background: linear-gradient(to right, rgba(15,23,42,0.9), rgba(15,23,42,0.75), rgba(15,23,42,0.9));
  box-shadow: 0 15px 40px rgba(0,0,0,0.55);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #dbeafe;
}

.site-logo {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .03em;
}

.actions {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.welcome-text {
  font-size: 0.9rem;
  opacity: .9;
}

/* =========================
   Buttons / Controls
   ========================= */

.btn,
.copybtn {
  background: linear-gradient(135deg, rgba(96,165,250,0.6), rgba(59,130,246,0.9));
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #e5edff;
  box-shadow: 0 4px 18px rgba(15,23,42,0.8);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover,
.copybtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(15,23,42,1);
  background: linear-gradient(135deg, rgba(129,199,255,0.9), rgba(59,130,246,1));
}

.btn.danger {
  background: linear-gradient(135deg, rgba(248,113,113,0.7), rgba(220,38,38,0.95));
}

.btn.danger:hover {
  background: linear-gradient(135deg, rgba(252,165,165,0.9), rgba(185,28,28,1));
}

/* Dropdowns "glassy" */

.glass-select,
.dropdown,
.select-wrapper select {
  background: rgba(15,23,42,0.8);
  color: #e5edff;
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 999px;
  padding: 6px 32px 6px 12px;
  font-size: 0.9rem;
  outline: none;
  appearance: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(15,23,42,0.7);
  position: relative;
}
/* Dropdown-Einträge dunkel + gut lesbar */
.glass-select option,
.dropdown option,
.select-wrapper select option {
  background-color: #020617;
  color: #e5edff;
}


.glass-select:hover,
.dropdown:hover,
.select-wrapper select:hover {
  background: rgba(15,23,42,0.95);
}

.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: #cbd5f5;
  pointer-events: none;
}

/* =========================
   Frontpage-Upload
   ========================= */

.container {
  width: 90%;
  max-width: 1100px;
  margin: 2.5rem auto 3rem auto;
}

.upload-panel {
  padding: 2rem;
  border-radius: 1.2rem;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.95), rgba(15,23,42,0.85));
  box-shadow: 0 18px 50px rgba(0,0,0,0.7);
  border: 1px solid rgba(148,163,184,0.45);
}

.upload-panel h1 {
  margin-top: 0;
  margin-bottom: .3rem;
}

.upload-panel p {
  margin-top: 0;
  margin-bottom: 1.1rem;
  color: #cbd5f5;
  font-size: .9rem;
}

/* Drag & Drop Feld (Frontend + Backend) */

.dropzone {
  border: 2px dashed rgba(148,163,184,0.7);
  border-radius: 1.2rem;
  padding: 3rem 1rem;
  text-align: center;
  color: #e5edff;
  font-size: 0.95rem;
  background: radial-gradient(circle at top, rgba(37,99,235,0.18), rgba(15,23,42,0.9));
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .1s ease, box-shadow .18s ease;
  box-shadow: 0 10px 30px rgba(15,23,42,0.8);
}

.dropzone:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15,23,42,1);
}

.dropzone.dragover {
  border-color: #60a5fa;
  background: radial-gradient(circle at top, rgba(37,99,235,0.35), rgba(15,23,42,0.95));
}

/* Upload-Status & Links im Frontend */

#progressList {
  margin-top: 1rem;
}

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15,23,42,0.75);
  border-radius: .8rem;
  padding: .6rem .75rem;
  margin-bottom: .4rem;
  font-size: .85rem;
  border: 1px solid rgba(51,65,85,0.7);
}

.upload-item .name {
  flex: 1;
  margin-right: .7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-item .status {
  font-size: 0.8rem;
  color: #a5b4fc;
}

#links {
  margin-top: 1rem;
}

.file-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(15,23,42,0.85);
  border-radius: .8rem;
  padding: .6rem .8rem;
  margin-bottom: .4rem;
  border: 1px solid rgba(51,65,85,0.7);
  font-size: 0.85rem;
}

.file-link a {
  color: #bfdbfe;
  text-decoration: none;
  word-break: break-all;
}

.file-link a:hover {
  text-decoration: underline;
}

.file-link .thumb-preview {
  width: 60px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

/* =========================
   Info-Box wenn nicht eingeloggt
   ========================= */

.info-box {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 0.9rem;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.55);
  color: #e5e7eb;
  font-size: 0.9rem;
}

/* =========================
   Login-Seite
   ========================= */

.login-container {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top, #e0f2fe 0%, #bfdbfe 35%, #60a5fa 65%, #111827 95%),
    linear-gradient(to bottom, #111827 0%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5edff;
}



.login-box {
  width: 320px;
  padding: 1.8rem 1.6rem 1.5rem 1.6rem;
  border-radius: 1.2rem;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.96), rgba(15,23,42,0.9));
  box-shadow: 0 20px 55px rgba(0,0,0,0.85);
  border: 1px solid rgba(148,163,184,0.5);
  text-align: center;
}

.login-logo {
  width: 40px;
  height: 40px;
  margin-bottom: .4rem;
}

.login-box h1 {
  margin: .3rem 0 0.8rem 0;
  font-size: 1.1rem;
}

.input-group {
  margin-bottom: .75rem;
  text-align: left;
  font-size: .85rem;
}

.input-group label {
  display: block;
  margin-bottom: .2rem;
  color: #dbeafe;
}

.input-group input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148,163,184,0.7);
  background: rgba(15,23,42,0.85);
  color: #e5edff;
  outline: none;
  font-size: 0.85rem;
}

.input-group input:focus {
  border-color: #60a5fa;
}

.error-box {
  background: rgba(248,113,113,0.15);
  border: 1px solid rgba(239,68,68,0.7);
  padding: 0.4rem 0.6rem;
  border-radius: 0.6rem;
  color: #fecaca;
  font-size: 0.8rem;
  margin-bottom: .6rem;
}

/* =========================
   Admin-Bereich
   ========================= */

.admin-container {
  width: 90%;
  max-width: 1300px;
  margin: 2rem auto 3rem auto;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,0.35);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

.admin-container h1 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Datei-Tabelle im Admin */

.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-table th,
.file-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  font-size: 0.9rem;
}

.file-table thead th {
  font-weight: 600;
  color: #d8e5ff;
}

.file-table tbody tr:hover {
  background: rgba(255,255,255,0.04);
}

.thumb-cell {
  text-align: center;
}

.thumb-wrapper {
  display: inline-block;
  position: relative;
  cursor: pointer;
}

.thumb {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.5);
  transition: transform .15s ease, box-shadow .15s ease;
}

.thumb-wrapper:hover .thumb {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(0,0,0,0.7);
}

.file-name {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expired {
  color: #f97373;
  font-weight: 500;
}

/* Admin Upload Panel */

.admin-upload-panel {
  margin-bottom: 25px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.4);
}

#adminUploadStatus {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #cbd5f5;
}

/* =========================
   Preview-Seite (Frontend)
   ========================= */

.preview-page {
  min-height: 100vh;
}

.preview-wrapper {
  width: 90%;
  max-width: 900px;
  margin: 2.5rem auto 3rem auto;
}

.preview-card {
  padding: 1.6rem;
  border-radius: 1.2rem;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.96), rgba(15,23,42,0.9));
  box-shadow: 0 20px 55px rgba(0,0,0,0.85);
  border: 1px solid rgba(148,163,184,0.5);
}

.preview-media {
  text-align: center;
  margin-bottom: 1rem;
}

.preview-media img,
.preview-media video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.85);
}

.preview-info {
  font-size: 0.85rem;
  color: #d1d5db;
}

/* Links im Admin / allgemein */

a {
  color: #bfdbfe;
}

a:hover {
  color: #e5e7eb;
}
