/* ==========================================================================
   Hostgalaxy Webtransfer - Stylesheet (Mantine Design System)
   Corporate Colors: #0070f3 (Primary), #00d2ff (Accent), #1a1b1e (Dark)
   ========================================================================== */

:root {
  --primary-color: #228be6;
  --primary-hover: #1c7ed6;
  --primary-light: #e7f5ff;
  --accent-color: #00d2ff;
  --text-main: #212529;
  --text-muted: #868e96;
  --border-color: #e9ecef;
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-pill: 2rem;
  --header-height: 3.75rem;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.55;
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.header-container {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-image {
  height: 38px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.badge-webtransfer {
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-left: 2px;
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #495057;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 150ms ease;
}

.nav-link:hover, .nav-link.active {
  background-color: #f8f9fa;
  color: #000;
}

.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* ==========================================================================
   Container & Layouts
   ========================================================================== */
.main-container {
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
  flex: 1;
}

/* ==========================================================================
   Startseite (Hero Section)
   ========================================================================== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  padding: 2rem 0;
}

.hero-content {
  max-width: 560px;
}

.hero-title {
  font-size: 42px;
  line-height: 1.2;
  font-weight: 900;
  color: #000;
  letter-spacing: -0.03em;
}

.hero-highlight {
  position: relative;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  white-space: nowrap;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #333;
}

.feature-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.25rem;
}

.hero-illustration {
  flex-shrink: 0;
  max-width: 380px;
}

.hero-illustration img {
  width: 100%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 35px rgba(0, 168, 181, 0.2));
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 150ms ease;
  border: 1px solid transparent;
  user-select: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: #fff;
  border-color: #ced4da;
  color: #212529;
}

.btn-outline:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background-color: #fa5252;
  color: white;
}

.btn-danger:hover {
  background-color: #e03131;
}

/* ==========================================================================
   Upload Interface
   ========================================================================== */
.upload-topbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dropzone {
  background-color: #fff;
  border: 2px dashed #ced4da;
  border-radius: var(--radius-md);
  padding: 3.5rem 1.5rem 4rem;
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.dropzone-icon {
  color: #495057;
  margin-bottom: 1rem;
}

.dropzone-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dropzone-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

.dropzone-circle-btn {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid rgba(0, 112, 243, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: all 150ms ease;
}

.dropzone-circle-btn:hover {
  background-color: #d0ebff;
  transform: translateX(-50%) translateY(-2px);
}

/* File list */
.files-preview {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.file-info > div {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.file-name {
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-remove-btn {
  background: none;
  border: none;
  color: #fa5252;
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
}

/* Share Settings Box */
.share-settings {
  margin-top: 1.5rem;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
}

.form-control {
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #ced4da;
  border-radius: var(--radius-sm);
  background-color: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(34, 139, 230, 0.2);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: #fff;
  border-radius: var(--radius-md);
  max-width: 480px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background-color: #e9ecef;
  border-radius: 5px;
  overflow: hidden;
  margin: 1.25rem 0;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--primary-color);
  transition: width 150ms linear;
}

.share-link-box {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.share-link-input {
  flex: 1;
  background-color: #f1f3f5;
  border: 1px solid #ced4da;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-color);
  background-color: #ffffff;
  padding: 1rem 1.5rem;
}

.footer-container {
  max-width: 60rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-center {
  text-align: center;
}

.footer-center a {
  color: #1c7ed6;
  font-weight: 500;
}

.footer-center a:hover {
  text-decoration: underline;
}

.footer-right {
  text-align: right;
  display: flex;
  justify-content: flex-end;
}

.desktop-only {
  display: inline;
}
.mobile-only {
  display: none;
}
.mobile-select-btn {
  display: none;
}

/* ==========================================================================
   Mobile & Responsive Optimizations
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 3.5rem;
  }

  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: inline !important;
  }
  .mobile-select-btn {
    display: inline-flex !important;
  }

  /* Header & Navigation */
  .header {
    height: var(--header-height);
  }

  .header-container {
    padding: 0 0.85rem;
    position: relative;
  }

  .logo-image {
    height: 28px;
    max-width: 150px;
  }

  .badge-webtransfer {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 1002;
  }

  .burger-btn span {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .burger-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .burger-btn.open span:nth-child(2) {
    opacity: 0;
  }
  .burger-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    gap: 0.35rem;
    display: none;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    padding: 10px 14px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    background-color: #f8f9fa;
  }

  .nav-link:hover, .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
  }

  /* Main Container */
  .main-container {
    padding: 1.25rem 0.85rem 3rem;
  }

  /* Hero Section */
  .hero {
    flex-direction: column-reverse;
    gap: 1.25rem;
    padding: 0.5rem 0 1.5rem;
    text-align: left;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  .hero-highlight {
    padding: 1px 7px;
    font-size: 0.95em;
  }

  .hero-subtitle {
    font-size: 0.92rem;
    margin-top: 0.65rem;
    line-height: 1.5;
  }

  .feature-list {
    margin-top: 1.25rem;
    gap: 0.85rem;
  }

  .feature-item {
    font-size: 0.88rem;
    gap: 0.65rem;
    line-height: 1.45;
  }

  .feature-icon {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 1px;
  }

  .hero-illustration {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.25rem;
  }

  .hero-illustration img {
    max-width: 220px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
    margin-top: 1.5rem;
  }

  .hero-buttons .btn {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    text-align: center;
    justify-content: center;
  }

  /* Upload Page */
  .upload-topbar {
    margin-bottom: 0.85rem;
  }

  .upload-topbar .btn {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    justify-content: center;
  }

  .dropzone {
    padding: 2rem 1rem 2.5rem;
    border-radius: var(--radius-sm);
  }

  .dropzone-icon {
    margin-bottom: 0.5rem;
  }

  .dropzone-icon svg {
    width: 36px;
    height: 36px;
  }

  .dropzone-title {
    font-size: 1.15rem;
  }

  .dropzone-desc {
    font-size: 0.85rem;
    line-height: 1.45;
  }

  .dropzone-circle-btn {
    width: 38px;
    height: 38px;
    bottom: -19px;
  }

  /* File Lists (no horizontal overflow) */
  .files-preview {
    margin-top: 1.5rem;
    gap: 0.5rem;
  }

  .file-item {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem;
  }

  .file-info {
    min-width: 0;
    flex: 1;
    gap: 0.65rem;
  }

  .file-name {
    max-width: 100%;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .file-size {
    font-size: 0.75rem;
  }

  /* Share Settings */
  .share-settings {
    padding: 1.15rem 0.85rem;
    margin-top: 1.25rem;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .form-control {
    font-size: 16px; /* Verhindert automatisches iOS-Zooming bei Fokus */
    padding: 0.7rem 0.85rem;
  }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 0.75rem;
  }

  .modal-card {
    padding: 1.25rem 1rem;
    max-width: 100%;
    border-radius: var(--radius-sm);
  }

  .share-link-box {
    flex-direction: column;
    gap: 0.5rem;
  }

  .share-link-input {
    font-size: 0.85rem;
    padding: 0.65rem;
    text-align: center;
  }

  .share-link-box .btn {
    width: 100%;
    padding: 0.65rem;
  }

  /* Share / Download Page on Mobile */
  .share-header-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }

  #downloadZipBtn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.85rem;
  }

  /* Footer on Mobile */
  .footer {
    padding: 1.25rem 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-right {
    justify-content: center;
    gap: 1.5rem;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 22px;
  }

  .logo-image {
    height: 25px;
    max-width: 125px;
  }
}
