/* ── NAVBAR ── */
/* ── NAVBAR ── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4%;
    background: rgba(5,3,15,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(123,95,255,0.15);
    box-sizing: border-box;
    gap: 16px;
    transition: all 0.3s ease;
  }
  nav.scrolled {
    padding: 6px 4%;
    background: rgba(5,3,15,0.97);
    box-shadow: 0 4px 30px rgba(0,0,0,0.4), 0 0 20px rgba(123,95,255,0.05);
  }

  .nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
  }

  .nav-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: brightness(1.1);
  }

  .nav-logo-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
    text-shadow: 0 0 20px rgba(123,95,255,0.5);
    white-space: nowrap;
    background: linear-gradient(135deg, #fff 0%, #c4b5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
  }

  .nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.2s;
    padding: 6px 12px;
    border-radius: 5px;
    white-space: nowrap;
  }
  .nav-links a:hover { background: rgba(123,95,255,0.15); color: #fff; }

  .nav-links a:hover, .nav-links a.active { color: #fff; }

  .btn-preorder {
    background: var(--purple);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
  }

  .btn-preorder:hover { background: var(--purple-dark); transform: translateY(-1px); }

  .btn-preorder svg { width: 14px; height: 14px; }

  

/* ── HAMBURGER MENU ── */
  .hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(123,95,255,0.08);
    border: 1px solid rgba(123,95,255,0.25);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 1100;
    transition: all 0.3s ease;
  }
  .hamburger:hover {
    border-color: var(--accent);
    background: rgba(123,95,255,0.15);
  }
  .hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }
  .hamburger.open {
    background: rgba(123,95,255,0.12);
    border-color: rgba(160,132,255,0.4);
  }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Mobile nav overlay */
  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.4s, opacity 0.3s ease;
  }
  .mobile-nav-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5,3,15,0.75);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .mobile-nav-overlay.open {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s ease;
  }
  .mobile-nav-overlay.open::before {
    opacity: 1;
  }

  .mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: linear-gradient(170deg, #0e0a22 0%, #0a0716 60%, #080510 100%);
    border-left: 1px solid rgba(123,95,255,0.15);
    box-shadow: -8px 0 40px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    padding: 80px 28px 32px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .mobile-nav-overlay.open .mobile-nav-panel {
    transform: translateX(0);
  }

  /* Decorative top line */
  .mobile-nav-panel::before {
    content: '';
    position: absolute;
    top: 66px;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(123,95,255,0.3), transparent);
  }

  .mobile-nav-overlay .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    list-style: none;
    margin-bottom: 20px;
  }
  .mobile-nav-overlay .nav-links li {
    border-radius: 8px;
    transition: background 0.2s ease;
  }
  .mobile-nav-overlay .nav-links li:hover {
    background: rgba(123,95,255,0.08);
  }
  .mobile-nav-overlay .nav-links a {
    font-size: 15px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
  }
  .mobile-nav-overlay .nav-links a:hover,
  .mobile-nav-overlay .nav-links a.active {
    color: #fff;
    background: rgba(123,95,255,0.1);
  }

  /* Divider line between nav and user area */
  .mobile-nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(123,95,255,0.2), transparent);
    margin: 8px 0 16px;
  }

  /* Auth area (not logged in) */
  .mobile-nav-overlay #mobileAuthArea {
    margin-top: auto;
    padding: 0 4px;
  }

  /* Shared action button base */
  .mobile-nav-action-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: none;
  }
  .mobile-nav-login-btn {
    background: linear-gradient(135deg, rgba(123,95,255,0.15), rgba(123,95,255,0.08));
    border: 1px solid rgba(123,95,255,0.3) !important;
    color: #c8b8ff;
  }
  .mobile-nav-login-btn:hover {
    background: linear-gradient(135deg, rgba(123,95,255,0.25), rgba(123,95,255,0.12));
    border-color: rgba(123,95,255,0.5) !important;
  }

  /* User card (logged in) */
  .mobile-user-card {
    margin-top: auto;
    background: linear-gradient(160deg, rgba(123,95,255,0.06), rgba(10,7,22,0.8));
    border: 1px solid rgba(123,95,255,0.12);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .mobile-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(123,95,255,0.15), rgba(201,168,76,0.1));
    border: 1px solid rgba(123,95,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }
  .mobile-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .mobile-user-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-user-coins {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #c9a84c;
    letter-spacing: 0.03em;
  }

  .mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .mobile-nav-inventar-btn {
    background: linear-gradient(135deg, rgba(90,61,138,0.4), rgba(58,29,106,0.4));
    border: 1px solid rgba(160,100,255,0.25) !important;
    color: #d0a0ff;
  }
  .mobile-nav-inventar-btn:hover {
    background: linear-gradient(135deg, rgba(90,61,138,0.6), rgba(58,29,106,0.5));
    border-color: rgba(160,100,255,0.4) !important;
  }
  .mobile-nav-admin-btn {
    background: linear-gradient(135deg, rgba(123,31,162,0.3), rgba(74,20,140,0.3));
    border: 1px solid rgba(200,100,255,0.2) !important;
    color: #e0a0ff;
  }
  .mobile-nav-admin-btn:hover {
    background: linear-gradient(135deg, rgba(123,31,162,0.5), rgba(74,20,140,0.4));
    border-color: rgba(200,100,255,0.35) !important;
  }

  .mobile-nav-logout-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.3);
    padding: 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
  }
  .mobile-nav-logout-btn:hover {
    color: rgba(255,100,100,0.6);
  }

  @media (max-width: 900px) {
    /* Navbar */
    nav { padding: 10px 16px; gap: 10px; }
    .nav-links { display: none !important; }
    #authArea, #userInfo { display: none !important; }
    .hamburger { display: flex; }

    /* Hero */
    .hero-content { grid-template-columns: 1fr; padding: 80px 20px 40px; min-height: 90vh; }
    .hero-character { display: none; }
    .hero-title { font-size: clamp(38px, 10vw, 64px); }
    .hero-desc { font-size: 13px; max-width: 100%; }
    .hero-nav { bottom: 100px; right: 20px; }

    /* Features */
    .features-band { padding: 0 16px 50px; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-card { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }

    /* About */
    .section-about { grid-template-columns: 1fr; padding: 60px 16px; gap: 32px; }
    .about-visual { height: 200px; }
    .about-stats { gap: 24px; flex-wrap: wrap; }
    .stat-num { font-size: 32px; }

    /* Footer */
    footer { padding: 28px 16px; flex-direction: column; gap: 10px; text-align: center; }

    /* Char builder */
    .char-builder { grid-template-columns: 1fr; }
    .char-panel { padding: 14px; }

    /* Cases */
    .cases-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cases-featured { grid-template-columns: 1fr; }
    .chest-wrap { width: 90px; height: 82px; }
    .chest-front { width: 82px; height: 38px; }
    .chest-side { width: 18px; height: 38px; right: -16px; }
    .chest-lid { width: 82px; height: 22px; transform: translateY(-38px); }
    .case-card:hover .chest-lid { transform: translateY(-38px) rotateX(-55deg); }
    .chest-lid-side { width: 18px; height: 22px; right: -16px; top: -38px; }

    /* Wheel */
    .wheel-section { grid-template-columns: 1fr; gap: 32px; }
    .wheel-arena { width: 300px; height: 300px; }
    .wheel-outer { width: 260px; height: 260px; }
    #wheelCanvas { width: 260px; height: 260px; }
    .wheel-glow-bg { width: 240px; height: 240px; }
    .wheel-wrap { gap: 20px; }

    /* Section padding */
    .page-section { padding: 0; }
    .section-header { margin-bottom: 40px; }
    .section-content { padding-left: 16px !important; padding-right: 16px !important; }

    /* Karten Editor */
    #kartenEditorRoot { padding: 0 12px 40px; }
  }

  @media (max-width: 480px) {
    /* Extra-small phones */
    .hero-title { font-size: clamp(30px, 9vw, 48px); }
    .hero-content { padding: 70px 14px 30px; }
    .features-band { padding: 0 10px 40px; }

    .cases-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .case-info { padding: 0 8px 10px; }
    .case-name { font-size: 0.75rem; }
    .btn-open-case { font-size: 0.62rem; }

    .wheel-arena { width: 260px; height: 260px; }
    .wheel-outer { width: 220px; height: 220px; }
    #wheelCanvas { width: 220px; height: 220px; }
    .wheel-glow-bg { width: 200px; height: 200px; }

    .section-about { padding: 40px 14px; }
    .about-stats { gap: 16px; }
    .stat-num { font-size: 28px; }
    .section-title { font-size: clamp(28px, 8vw, 42px); }

    footer { padding: 20px 14px; }

    .char-panel { padding: 10px; }
    .char-option { padding: 8px 10px; gap: 8px; }
    .char-option-icon { width: 30px; height: 30px; font-size: 15px; }

    .preview-box { padding: 16px; }
  }

  /* ── Nav Profile Avatar ── */
  .nav-profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(123,95,255,0.35);
    transition: all 0.2s;
    flex-shrink: 0;
  }
  .nav-profile-avatar:hover {
    border-color: rgba(123,95,255,0.7);
    box-shadow: 0 0 12px rgba(123,95,255,0.3);
    transform: scale(1.08);
  }
  .mobile-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(123,95,255,0.2);
    background: linear-gradient(135deg, rgba(123,95,255,0.15), rgba(201,168,76,0.1));
    flex-shrink: 0;
  }
  .mobile-nav-profil-btn {
    background: linear-gradient(135deg, rgba(123,95,255,0.2), rgba(80,40,180,0.15));
    border: 1px solid rgba(123,95,255,0.3) !important;
    color: #c8b8ff;
  }
  .mobile-nav-profil-btn:hover {
    background: linear-gradient(135deg, rgba(123,95,255,0.35), rgba(80,40,180,0.25));
    border-color: rgba(123,95,255,0.5) !important;
  }
