  @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

  :root {
    --bg-primary: #080808;
    --bg-secondary: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-elevated: #141414;
    --red: #e5193b;
    --red-glow: rgba(229,25,59,0.35);
    --red-soft: rgba(229,25,59,0.12);
    --black-card: #1e1e1e;
    --black-glow: rgba(0,0,0,0.6);
    --accent: #e5193b;
    --accent-glow: rgba(229,25,59,0.25);
    --gold: #c9a84c;
    --gold-glow: rgba(201,168,76,0.25);
    --text-primary: #f2f0ed;
    --text-secondary: #8a8780;
    --text-muted: #5a5852;
    --border: rgba(255,255,255,0.06);
    --border-light: rgba(255,255,255,0.10);
    --success: #2ecc71;
    --error: #e5193b;
  }

  * { margin:0; padding:0; box-sizing:border-box; }

  body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  html {
    height: -webkit-fill-available;
  }

  .app-container {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
  }

  /* Background effects */
  .bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }
  .bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: orbFloat 20s ease-in-out infinite;
  }
  .bg-orb-1 { width:400px; height:400px; background:var(--red); top:-100px; right:-100px; opacity: 0.08; }
  .bg-orb-2 { width:300px; height:300px; background:var(--gold); bottom:-50px; left:-50px; animation-delay:-10s; opacity: 0.06; }
  .bg-orb-3 { width:200px; height:200px; background:var(--red); top:50%; left:50%; animation-delay:-5s; opacity: 0.05; }

  @keyframes orbFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(30px,-30px) scale(1.1); }
    66% { transform: translate(-20px,20px) scale(0.9); }
  }

  /* ========== LOGIN ========== */
  .login-wrapper {
    height: 100vh;
    height: 100dvh;
    display: flex;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(135deg, #080808 0%, #0c0808 50%, #100808 100%);
  }

  .login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(229,25,59,0.04) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 20%, rgba(201,168,76,0.03) 0%, transparent 50%);
    animation: slowDrift 30s ease-in-out infinite;
  }

  @keyframes slowDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, 1%); }
  }

  .login-left-content {
    position: relative;
    z-index: 2;
    max-width: 480px;
  }

  .login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
  }

  .login-brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }

  .login-brand-logo.mobile {
    width: 36px;
    height: 36px;
  }

  .header-left-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .header-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }

  .login-brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--red), #1a1a1a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    font-weight: 800;
    letter-spacing: -2px;
    box-shadow: 0 4px 20px rgba(229,25,59,0.3);
  }

  .login-brand-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
  }

  .login-brand-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(201,168,76,0.12);
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-left: 8px;
  }

  .login-hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
  }

  .login-hero-title span {
    background: linear-gradient(135deg, var(--red), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero-count {
    font-variant-numeric: tabular-nums;
  }

  .login-hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 400px;
  }

  .login-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 24px;
  }

  .login-stat-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  .login-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
  }

  .accuracy-value {
    color: var(--success);
  }

  .version-value {
    color: var(--gold);
  }

  .login-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(46,204,113,0.6);
    animation: livePulse 2s ease-in-out infinite;
    flex-shrink: 0;
  }

  .user-dot {
    background: #3498db;
    box-shadow: 0 0 8px rgba(52,152,219,0.5);
  }

  @keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  .login-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .login-feature {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .login-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }

  .login-feature-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
  }

  .login-feature-text strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 1px;
  }

  .login-right {
    width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    position: relative;
    overflow: visible;
  }

  .login-right-inner {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }

  .login-right-header {
    margin-bottom: 32px;
  }

  .login-right-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
  }

  .login-right-header p {
    font-size: 14px;
    color: var(--text-muted);
  }

  /* Mobile brand - hidden on desktop, shown on mobile */
  .login-mobile-brand { display: none; }
  .login-desktop-lang { display: flex; }

  @media (max-width: 900px) {
    .login-mobile-brand { display: block; }
    .login-desktop-lang { display: none !important; }
  }

  .login-divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
  }

  .login-footer-info {
    text-align: center;
    padding-top: 0;
  }

  .login-footer-info .company-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
  }

  .login-footer-info .company-address {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
  }

  .login-footer-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
  }

  .login-footer-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.2s;
  }
  .login-footer-link:hover { color: var(--accent); text-decoration-color: var(--accent); }

  .login-copyright {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
    opacity: 0.6;
  }


  .login-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 36px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
  }

  .login-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
  }

  .login-logo {
    text-align: center;
    margin-bottom: 32px;
  }

  .login-logo h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--red), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
  }

  .login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
  }

  .form-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
  }

  .form-group input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-soft);
  }

  .login-btn {
    width: 100%;
    padding: 15px;
    background: var(--red);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
  }

  .login-btn:hover {
    background: #c8142f;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--red-glow);
  }

  .login-btn:active { transform: translateY(0); }

  .login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
  }

  .login-btn-loading {
    pointer-events: none;
  }

  .login-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: loginSpin 0.6s linear infinite;
  }

  @keyframes loginSpin {
    to { transform: rotate(360deg); }
  }

  .login-error {
    background: rgba(255,71,87,0.08);
    border: 1px solid rgba(255,71,87,0.2);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    animation: shake 0.4s ease-out;
  }

  @keyframes shake {
    0%,100% { transform:translateX(0); }
    25% { transform:translateX(-8px); }
    75% { transform:translateX(8px); }
  }

  .telegram-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }

  .telegram-link p { color: var(--text-muted); font-size: 13px; }
  .telegram-link a {
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 14px;
    transition: color 0.2s;
  }
  .telegram-link a:hover { color: var(--gold); }

  /* ========== LANGUAGE SELECTOR ========== */
  .lang-selector {
    position: relative;
    z-index: 100;
  }

  .lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .lang-btn:hover { border-color: var(--border-light); }

  .lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 8px;
    min-width: 200px;
    max-height: 360px;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: dropIn 0.2s ease-out;
  }

  @keyframes dropIn {
    from { opacity:0; transform:translateY(-8px); }
    to { opacity:1; transform:translateY(0); }
  }

  .lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    width: 100%;
    font-family: 'Outfit', sans-serif;
    text-align: left;
  }
  .lang-option:hover { background: var(--bg-card); }
  .lang-option.active { background: var(--accent-glow); color: var(--accent); }

  /* ========== HEADER ========== */
  .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,15,0.8);
    backdrop-filter: blur(20px);
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .header-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .logout-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .logout-btn:hover { border-color: var(--error); color: var(--error); }

  /* Hamburger Menu */
  .hamburger-menu {
    position: relative;
  }
  .hamburger-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hamburger-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
  }
  .hamburger-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    z-index: 1000;
    animation: fadeIn 0.15s ease-out;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  .hamburger-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
  }
  .hamburger-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
  }
  .hamburger-item svg {
    flex-shrink: 0;
  }
  .hamburger-logout {
    color: var(--error);
  }
  .hamburger-logout:hover {
    color: var(--error);
    background: rgba(229,25,59,0.08);
  }
  .hamburger-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
  }

  /* ========== MAIN CONTENT ========== */
  .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
  }

  /* ========== CARD DISPLAY ========== */
  .cards-display {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .card-slot {
    width: 72px;
    height: 100px;
    border-radius: 12px;
    border: 2px dashed rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
  }

  .card-slot.filled {
    border-style: solid;
    animation: cardAppear 0.5s ease-out;
    background: #f5f3f0;
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.8);
  }

  .card-slot.red-card {
    border-color: rgba(229,25,59,0.25);
    box-shadow: 0 4px 20px rgba(229,25,59,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
  }

  .card-slot.black-card {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.8);
  }

  @keyframes cardAppear {
    0% { opacity: 0; transform: scale(0.85) translateY(8px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
  }

  .card-suit {
    font-size: 44px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
  }
  .card-suit.red-suit { color: var(--red); }
  .card-suit.black-suit { color: #1a1a1a; }

  .card-empty {
    font-size: 24px;
    color: var(--text-muted);
  }

  .section-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 4px;
  }

  .cards-counter {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
  }

  /* ========== BUTTONS ========== */
  .input-buttons {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    width: 100%;
    max-width: 400px;
  }

  .color-btn {
    flex: 1;
    padding: 20px;
    border: none;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
  }

  .color-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
  }

  .color-btn.red-btn {
    background: linear-gradient(135deg, var(--red), #8a0f24);
    color: white;
    box-shadow: 0 4px 15px var(--red-glow);
  }
  .color-btn.red-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--red-glow);
  }
  .color-btn.red-btn:active { transform: translateY(0); }

  .color-btn.black-btn {
    background: linear-gradient(135deg, #2a2a2a, #111111);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 1px solid #333;
  }
  .color-btn.black-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  }
  .color-btn.black-btn:active { transform: translateY(0); }

  .color-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
  }

  .action-btn {
    padding: 16px 40px;
    border: none;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin: 8px;
  }

  .next-btn {
    background: linear-gradient(135deg, var(--red), #a01025);
    color: white;
    box-shadow: 0 4px 15px var(--red-glow);
    animation: pulse 2s ease-in-out infinite;
  }
  .next-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--red-glow); }

  @keyframes pulse {
    0%,100% { box-shadow: 0 4px 15px var(--red-glow); }
    50% { box-shadow: 0 4px 30px var(--red-glow); }
  }

  .reset-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 10px;
  }
  .reset-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); }

  /* ========== PREDICTION ========== */
  .analyzing-screen {
    text-align: center;
    padding: 24px 0;
    animation: fadeIn 0.4s ease-out;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Scan phase — cards being scanned one by one */
  .scan-phase {
    width: 100%;
    opacity: 1;
    transition: opacity 0.4s ease;
  }

  .scan-phase.scan-done {
    opacity: 0;
    position: absolute;
    pointer-events: none;
  }

  .scan-cards {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
  }

  .scan-card {
    width: 72px;
    height: 100px;
    border-radius: 12px;
    background: #f5f3f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
  }

  .scan-card.scanning {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 0 20px rgba(229,25,59,0.35);
  }

  .scan-card.scanned {
    opacity: 0.7;
    transform: scale(1);
  }

  .scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--red);
    box-shadow: 0 0 10px var(--red);
    animation: scanDown 0.35s ease-in-out infinite;
  }

  @keyframes scanDown {
    0% { top: 0; }
    100% { top: calc(100% - 3px); }
  }

  .scan-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    animation: cardAppear 0.3s ease-out;
  }

  /* Analysis phase */
  .analysis-phase {
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .analysis-phase.analysis-visible {
    opacity: 1;
  }

  .analyze-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
  }

  .analyze-step {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
    min-height: 20px;
    animation: stepFade 0.3s ease-out;
  }

  @keyframes stepFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .analyze-progress-track {
    width: 100%;
    max-width: 320px;
    height: 5px;
    background: var(--bg-card);
    border-radius: 3px;
    margin: 12px auto 0;
    overflow: hidden;
  }

  .analyze-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--red), var(--gold));
    border-radius: 3px;
  }

  .prediction-screen {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    width: 100%;
  }

  .prediction-card {
    width: 140px;
    height: 200px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px auto;
    position: relative;
    animation: cardReveal 0.6s ease-out;
    background: linear-gradient(145deg, #ffffff, #f0ede8);
    border: 1px solid rgba(255,255,255,0.5);
  }

  .prediction-card.red-card {
    box-shadow: 0 10px 40px rgba(229,25,59,0.2), 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.9);
  }

  .prediction-card.black-card {
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.9);
  }

  .prediction-card::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 17px;
    border: 1px solid rgba(0,0,0,0.06);
    pointer-events: none;
  }

  .prediction-suit {
    font-size: 64px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  }
  .prediction-suit.red-suit { color: var(--red); }
  .prediction-suit.black-suit { color: #1a1a1a; }

  @keyframes cardReveal {
    0% { opacity: 0; transform: scale(0.9) translateY(16px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
  }

  .prediction-label {
    font-size: 22px;
    font-weight: 700;
    margin-top: 16px;
  }
  .prediction-label.red-text { color: var(--red); }
  .prediction-label.black-text { color: #999; }

  .confirm-question {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 24px 0 16px;
  }

  .confirm-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
  }

  .yes-btn {
    background: var(--success);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }
  .yes-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,214,143,0.3); }

  .no-btn {
    background: var(--error);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }
  .no-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,71,87,0.3); }

  /* ========== HISTORY & STATS ========== */
  .stats-bar {
    display: flex;
    gap: 16px;
    width: 100%;
    margin: 24px 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .stat-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 20px;
    text-align: center;
    flex: 1;
    min-width: 100px;
  }

  .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
  }

  .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
  }

  .history-section {
    width: 100%;
    margin-top: 16px;
  }

  .history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
  }

  .history-dot {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    animation: dotPop 0.3s ease-out;
  }

  .history-dot.correct {
    border: 2px solid var(--success);
    color: var(--success);
  }
  .history-dot.wrong {
    border: 2px solid var(--error);
    color: var(--error);
  }
  .history-dot.red-bg { background: var(--red-soft); }
  .history-dot.black-bg { background: rgba(45,45,63,0.4); }

  @keyframes dotPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
  }

  /* ========== FOOTER ========== */
  .app-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    position: relative;
    z-index: 1;
    background: rgba(10,10,15,0.8);
    backdrop-filter: blur(20px);
  }

  .footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 8px;
  }

  .footer-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: underline;
    text-decoration-color: transparent;
  }
  .footer-link:hover { color: var(--text-primary); text-decoration-color: var(--accent); }

  .footer-copy {
    font-size: 12px;
    color: var(--text-muted);
  }

  /* ========== LEGAL PAGE ========== */
  .legal-page {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 24px;
    animation: fadeIn 0.4s ease-out;
  }

  .legal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--red);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 24px;
    transition: color 0.2s;
  }
  .legal-back:hover { color: var(--gold); }

  .legal-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .legal-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
    white-space: pre-line;
  }

  /* ========== ANIMATIONS ========== */
  @keyframes slideUp {
    from { opacity:0; transform:translateY(30px); }
    to { opacity:1; transform:translateY(0); }
  }
  @keyframes fadeIn {
    from { opacity:0; }
    to { opacity:1; }
  }

  /* ========== RESPONSIVE - MOBILE FIRST ========== */

  /* Touch-friendly: no hover transforms on mobile (prevents sticky hover) */
  @media (hover: none) {
    .color-btn.red-btn:hover,
    .color-btn.black-btn:hover,
    .next-btn:hover,
    .yes-btn:hover,
    .no-btn:hover,
    .login-btn:hover,
    .logout-btn:hover {
      transform: none;
    }
  }

  /* Active states for touch feedback */
  .color-btn:active { transform: scale(0.97) !important; }
  .yes-btn:active { transform: scale(0.97) !important; }
  .no-btn:active { transform: scale(0.97) !important; }
  .next-btn:active { transform: scale(0.97) !important; }
  .login-btn:active { transform: scale(0.97) !important; }

  /* Tablets & smaller - merge login into single column */
  @media (max-width: 900px) {
    .login-wrapper {
      flex-direction: column;
      min-height: 100vh;
      min-height: 100dvh;
      height: auto;
      overflow-y: auto;
    }

    .bg-orb-1 { width: 200px; height: 200px; opacity: 0.05; }
    .bg-orb-2 { width: 150px; height: 150px; opacity: 0.04; bottom: -80px; left: -80px; }
    .bg-orb-3 { width: 100px; height: 100px; opacity: 0.03; }

    /* Hide the left panel entirely on mobile - we show key info inline */
    .login-left { display: none; }

    .login-right {
      width: 100%;
      flex: none;
      border-left: none;
      padding: 0;
      display: block;
      background: var(--bg-primary);
      overflow-y: visible;
      max-height: none;
    }

    .login-right-inner {
      max-width: 400px;
      width: 100%;
      margin: 0 auto;
      padding: 32px 24px;
      padding-bottom: 48px;
    }

    /* Show a compact mobile header in right panel */
    .login-right-inner::before {
      content: '';
      display: block;
    }
  }

  /* Phones */
  @media (max-width: 480px) {
    .login-right-inner { padding: 24px 20px; }
    .login-right-header { margin-bottom: 24px; }
    .login-right-header h2 { font-size: 20px; }
    .login-right-header p { font-size: 13px; }
    .form-group { margin-bottom: 14px; }
    .form-group label { font-size: 11px; margin-bottom: 5px; }
    .form-group input { padding: 13px 14px; font-size: 16px; border-radius: 10px; }
    .login-btn { padding: 14px; font-size: 15px; border-radius: 10px; }
    .telegram-link { margin-top: 16px; padding-top: 16px; }
    .telegram-link p { font-size: 12px; }
    .telegram-link a { font-size: 13px; }
    .login-footer-info .company-name { font-size: 11px; }
    .login-footer-info .company-address { font-size: 10px; }
    .login-footer-link { font-size: 10px; }
    .login-copyright { font-size: 9px; }
    .login-divider { margin: 16px 0; }
    .lang-btn { padding: 6px 10px; font-size: 12px; gap: 6px; }

    /* === HEADER === */
    .app-header { padding: 12px 16px; }
    .header-logo { font-size: 20px; }
    .lang-dropdown { min-width: 170px; }
    .lang-option { padding: 9px 12px; font-size: 13px; }
    .logout-btn { padding: 6px 12px; font-size: 12px; }

    /* === MAIN CONTENT === */
    .main-content { padding: 12px 16px; }
    .paywall-overlay { padding: 12px; align-items: center; }
    .paywall-card { max-height: calc(100dvh - 24px); }

    /* === CARDS === */
    .section-label { font-size: 12px; letter-spacing: 1.5px; }
    .cards-display {
      gap: 10px;
      margin: 14px 0;
      justify-content: center;
      flex-wrap: nowrap;
    }
    .card-slot {
      width: clamp(52px, 15.5vw, 68px);
      height: clamp(72px, 21.5vw, 94px);
      border-radius: 10px;
      flex-shrink: 1;
      min-width: 0;
    }
    .card-suit { font-size: 38px; }
    .card-empty { font-size: 20px; }
    .cards-counter { font-size: 12px; margin-top: 4px; }

    /* === BUTTONS — large touch targets === */
    .input-buttons { gap: 12px; margin: 10px 0; max-width: 100%; }
    .color-btn {
      padding: 18px 12px;
      font-size: 16px;
      border-radius: 14px;
      letter-spacing: 1.5px;
      min-height: 58px;
    }
    .action-btn { padding: 14px 32px; font-size: 15px; border-radius: 12px; margin: 6px; }

    /* === PREDICTION === */
    .prediction-screen { padding-top: 0; }
    .prediction-card { width: 110px; height: 155px; border-radius: 16px; margin: 16px auto; }
    .prediction-suit { font-size: 48px; }
    .prediction-card::before { border-radius: 13px; }
    .prediction-label { font-size: 18px; margin-top: 12px; }
    .confirm-question { font-size: 16px; margin: 16px 0 12px; }
    .confirm-buttons { gap: 12px; }
    .yes-btn, .no-btn {
      padding: 14px 36px;
      font-size: 15px;
      border-radius: 12px;
      min-height: 50px;
    }

    /* === ANALYZING === */
    .analyzing-screen { padding: 20px 0; }
    .analyze-icon { width: 70px; height: 70px; margin-bottom: 16px; }
    .analyze-center-icon { font-size: 20px; }
    .analyze-title { font-size: 17px; }
    .analyze-step { font-size: 12px; margin-bottom: 16px; }
    .analyze-progress-track { max-width: 240px; height: 5px; }
    .analyze-percent { font-size: 12px; margin-top: 8px; }

    /* === FOOTER === */
    .app-footer { padding: 14px 16px; }
    .footer-links { gap: 16px; }
    .footer-link { font-size: 12px; }
    .footer-copy { font-size: 11px; }

    /* === LEGAL === */
    .legal-page { padding: 24px 16px; }
    .legal-back { font-size: 13px; margin-bottom: 20px; }
    .legal-title { font-size: 24px; margin-bottom: 20px; }
    .legal-content { font-size: 13px; line-height: 1.7; }
  }

  /* Small phones (iPhone SE, etc) */
  @media (max-width: 375px) {
    .login-right-inner { padding: 20px 16px; }
    .login-right-header h2 { font-size: 18px; }
    .form-group input { padding: 12px 12px; }
    .login-btn { padding: 13px; }
    .card-slot { width: 60px; height: 84px; }
    .card-suit { font-size: 34px; }
    .cards-display { gap: 8px; }
    .color-btn { padding: 16px 10px; font-size: 14px; min-height: 54px; }
    .prediction-card { width: 100px; height: 140px; }
    .prediction-suit { font-size: 42px; }
    .yes-btn, .no-btn { padding: 13px 28px; font-size: 14px; }
    .header-logo { font-size: 18px; }
  }

  /* Sharper raster/SVG-on-bitmap assets on mobile */
  .payment-icon img,
  .header-logo-img {
    image-rendering: -webkit-optimize-contrast;
  }

  /* Safe area insets for notch phones */
  @supports (padding-top: env(safe-area-inset-top)) {
    .app-header {
      padding-top: calc(12px + env(safe-area-inset-top));
    }
    .app-footer {
      padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
  }

  /* Prevent text selection on buttons for mobile */
  button, .color-btn, .action-btn, .yes-btn, .no-btn, .lang-btn, .lang-option {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
  }

  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent zoom on input focus iOS */
  @media (max-width: 480px) {
    input, select, textarea {
      font-size: 16px !important;
    }
  }

  /* ========== CHECKBOX ========== */
  .form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
  }
  .form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--red);
    cursor: pointer;
    flex-shrink: 0;
  }
  .form-checkbox label {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
  }
  .form-checkbox label a {
    color: var(--red);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.2s;
  }
  .form-checkbox label a:hover {
    text-decoration-color: var(--red);
  }

  /* ========== AUTH TABS ========== */
  .auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
  }
  .auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  .auth-tab.active {
    background: var(--red);
    color: white;
    font-weight: 600;
  }
  .auth-tab:not(.active):hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
  }

  /* ========== VERIFY EMAIL ========== */
  .verify-screen {
    text-align: center;
    padding: 24px 0;
  }
  .verify-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
  }
  .verify-email {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--gold);
    word-break: break-all;
    margin: 8px 0 16px;
  }
  .verify-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
  }
  .verify-btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin: 4px;
  }
  .verify-btn-primary {
    background: var(--red);
    color: white;
  }
  .verify-btn-primary:hover {
    background: #c8142f;
    transform: translateY(-1px);
  }
  .verify-btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
  }
  .verify-btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
  }

  .success-msg {
    background: rgba(46,204,113,0.08);
    border: 1px solid rgba(46,204,113,0.2);
    color: var(--success);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    animation: slideUp 0.4s ease-out;
  }

  /* ========== PAYWALL ========== */
  .paywall-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    animation: fadeIn 0.3s ease-out;
  }
  .paywall-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 36px;
    max-width: 520px;
    width: 100%;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    position: relative;
    margin: auto;
    animation: slideUp 0.4s ease-out;
  }
  .paywall-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
  }
  .paywall-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }
  .paywall-close:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
  }
  .paywall-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
  }
  .paywall-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
  }
  .paywall-lock-icon {
    text-align: center;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
  }
  .plans-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }
  .plan-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: all 0.2s;
  }
  .plan-option:hover {
    border-color: var(--border-light);
    background: rgba(255,255,255,0.04);
  }
  .plan-option.selected {
    border-color: var(--red);
    background: var(--red-soft);
  }
  .plan-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .plan-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .plan-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--gold);
    color: #000;
  }
  .plan-desc {
    font-size: 12px;
    color: var(--text-muted);
  }
  .plan-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
  }
  .plan-price span {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
  }
  .bon-submitted-icon {
    margin-bottom: 16px;
  }
  .xbon-buy-info {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    margin-top: 4px;
  }
  .xbon-buy-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    line-height: 1.45;
  }
  .xbon-buy-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
    text-decoration: none;
    transition: opacity 0.2s;
  }
  .xbon-buy-link:hover {
    opacity: 0.8;
  }
  .paywall-continue-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--red), #a01025);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
  }
  .paywall-continue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--red-glow);
  }
  .paywall-continue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
  }

  /* Payment methods */
  .payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }
  .payment-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
  }
  .payment-method:hover {
    border-color: var(--border-light);
    background: rgba(255,255,255,0.04);
    transform: translateX(4px);
  }
  .payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
  }
  .payment-text {
    flex: 1;
  }
  .payment-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
  }
  .payment-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
  }
  .payment-arrow {
    color: var(--text-muted);
    font-size: 16px;
  }
  .paywall-back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: color 0.2s;
  }
  .paywall-back-btn:hover { color: var(--text-primary); }

  /* Upload zone */
  .upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
  }
  .upload-zone:hover, .upload-zone.dragover {
    border-color: var(--red);
    background: var(--red-soft);
  }
  .upload-zone-icon { font-size: 2rem; margin-bottom: 0.5rem; }
  .upload-zone-text {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
  }
  .upload-preview {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    margin-top: 0.75rem;
    object-fit: contain;
  }
  .upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
  }

  /* Bon type selector */
  .bon-type-grid {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
  }
  .bon-type-option {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: rgba(255,255,255,0.02);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  .bon-type-option:hover {
    border-color: var(--border-light);
    background: rgba(255,255,255,0.04);
  }
  .bon-type-option.selected {
    border-color: var(--red);
    background: var(--red-soft);
  }
  .bon-type-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
  }
  .bon-type-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  /* Bon code input with formatting */
  .bon-code-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.2s;
  }
  .bon-code-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-soft);
  }
  .bon-code-input::placeholder {
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.3;
  }

  .xbon-section-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
  }

  .paywall-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  /* 5th Card Add-on */
  .pending-verification-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 14px 18px;
    margin-top: 16px;
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.4s ease-out;
  }
  .pending-verification-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pending-verification-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
  }
  .pending-verification-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
  }

  .fifth-card-banner {
    background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(229,25,59,0.06));
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 16px;
    padding: 16px 20px;
    margin-top: 16px;
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.4s ease-out;
  }
  .fifth-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .fifth-card-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .fifth-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .fifth-card-accuracy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(46,204,113,0.12);
    color: var(--success);
    letter-spacing: 0.5px;
  }
  .fifth-card-dismiss {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  .fifth-card-dismiss:hover {
    color: var(--text-primary);
    border-color: var(--gold);
    background: rgba(201,168,76,0.1);
  }
  .fifth-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
  }
  .fifth-card-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--gold), #a0842e);
    border: none;
    border-radius: 10px;
    color: #000;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
  }
  .fifth-card-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--gold-glow);
  }
  .fifth-card-active-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    padding: 8px 0 0;
  }
  .fifth-card-active-badge::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(46,204,113,0.15);
    font-size: 10px;
  }

  /* Multi-bon rows */
  .bon-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
  .bon-row {
    display: grid;
    grid-template-columns: 1fr 120px 28px;
    gap: 8px;
    align-items: end;
    padding: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    animation: fadeIn 0.3s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .bon-row-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
    font-family: 'JetBrains Mono', monospace;
  }
  .bon-row input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
  }
  .bon-row input:focus { border-color: var(--red); }
  .bon-row input::placeholder { opacity: 0.3; }
  .bon-amount-wrap {
    position: relative;
  }
  .bon-amount-wrap .bon-currency {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    pointer-events: none;
  }
  .bon-amount-wrap input { padding-right: 30px; }
  .bon-delete-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    align-self: end;
    margin-bottom: 4px;
  }
  .bon-delete-btn:hover { border-color: var(--error); color: var(--error); }
  .bon-delete-btn:disabled { opacity: 0.2; cursor: default; }
  .bon-delete-btn:disabled:hover { border-color: var(--border); color: var(--text-muted); }
  .add-bon-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
  }
  .add-bon-btn:hover { border-color: var(--red); color: var(--text-primary); }
  .add-bon-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  .add-bon-btn:disabled:hover { border-color: var(--border); color: var(--text-muted); }
  .bon-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(229,25,59,0.06);
    border: 1px solid rgba(229,25,59,0.15);
    border-radius: 10px;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
  }
  .bon-summary-label { color: var(--text-secondary); }
  .bon-summary-value { color: var(--text-primary); font-weight: 600; }

  @media (max-width: 480px) {
    .bon-row { grid-template-columns: 1fr 90px 28px; gap: 6px; padding: 12px 10px; }
    .bon-row input { font-size: 12px; padding: 9px 10px; }
  }

  @media (max-width: 480px) {
    .paywall-card { padding: 24px 20px; border-radius: 20px; }
    .paywall-title { font-size: 20px; }
    .plan-option { padding: 14px 16px; }
    .plan-price { font-size: 18px; }
    .auth-tabs { border-radius: 8px; }
    .auth-tab { padding: 10px; font-size: 13px; }
  }
