/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors */
    --bg-dark: #06100d;
    --card-dark: rgba(5, 16, 13, 0.78);
    --card-soft: rgba(10, 24, 18, 0.72);
    --gold: #d8a84f;
    --gold-light: #f6d88b;
    --orange: #d96b24;
    --green: #79c85a;
    --red: #d94824;
    --muted: #b9b29a;
    --text: #f4ead2;
    --border-gold: rgba(216, 168, 79, 0.55);
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--bg-dark);
    background-image: url('../background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(216, 168, 79, 0.08) 0%, transparent 60%),
                linear-gradient(180deg, rgba(6, 16, 13, 0.85) 0%, rgba(6, 16, 13, 0.95) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   APP SHELL
   ============================================ */
.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    padding-top: max(var(--spacing-md), env(safe-area-inset-top));
    padding-bottom: max(var(--spacing-md), env(safe-area-inset-bottom));
    overflow: hidden;
}

/* ============================================
   SCREEN CARD
   ============================================ */
.screen-card {
    display: none;
    width: 100%;
    max-width: 430px;
    height: fit-content;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    /* hide scrollbar across all browsers */
    -ms-overflow-style: none;
    scrollbar-width: none;
    background: transparent;
    border: none;
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    backdrop-filter: blur(0px);
    box-shadow: none;
    animation: fadeIn 0.4s ease-out;
}

.screen-card::-webkit-scrollbar {
    display: none;
}

.screen-card.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.step-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    opacity: 0.9;
}

.screen-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
}

.screen-subtext {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.tagline {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--gold);
    text-align: center;
    margin-top: var(--spacing-md);
    opacity: 0.7;
}

/* ============================================
   GLASS CARD
   ============================================ */
.glass-card {
    background: var(--card-soft);
    border: 1px solid rgba(216, 168, 79, 0.25);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(246, 216, 139, 0.05);
}

/* ============================================
   BUTTONS
   ============================================ */
.gold-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(216, 168, 79, 0.3),
                0 0 0 1px rgba(246, 216, 139, 0.5);
}

.gold-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(216, 168, 79, 0.4),
                0 0 0 1px rgba(246, 216, 139, 0.7);
}

.gold-button:active:not(:disabled) {
    transform: translateY(0);
}

.gold-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gold-button i {
    width: 20px;
    height: 20px;
}

.ghost-button {
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gold);
    cursor: pointer;
    transition: var(--transition);
    margin-top: var(--spacing-md);
}

.ghost-button:hover {
    background: rgba(216, 168, 79, 0.1);
    border-color: var(--gold);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--gold);
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: var(--spacing-sm);
    padding: 0;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--gold-light);
    gap: 10px;
}

.back-link i {
    width: 14px;
    height: 14px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: var(--spacing-xs);
}

.text-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(5, 16, 13, 0.6);
    border: 1px solid rgba(216, 168, 79, 0.3);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    transition: var(--transition);
}

.text-input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.text-input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(5, 16, 13, 0.8);
    box-shadow: 0 0 0 3px rgba(216, 168, 79, 0.1);
}

/* ============================================
   STATUS ICONS
   ============================================ */
.status-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
}

.status-icon.success {
    background: rgba(121, 200, 90, 0.15);
    border: 2px solid var(--green);
}

.status-icon.success::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(121, 200, 90, 0.2) 0%, transparent 70%);
}

.status-icon.error {
    background: rgba(217, 72, 36, 0.15);
    border: 2px solid var(--red);
}

.status-icon.error::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 72, 36, 0.2) 0%, transparent 70%);
}

.status-icon.large {
    width: 100px;
    height: 100px;
}

.status-icon i {
    width: 40px;
    height: 40px;
    color: inherit;
    position: relative;
    z-index: 1;
}

.status-icon.success i {
    color: var(--green);
}

.status-icon.error i {
    color: var(--red);
}

.status-icon.large i {
    width: 50px;
    height: 50px;
}

/* ============================================
   PRIVACY TEXT
   ============================================ */
.privacy-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: var(--spacing-lg);
}

.privacy-text .lock-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* ============================================
   SMALL TEXT
   ============================================ */
.small-text {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    margin-top: var(--spacing-md);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .screen-card {
        padding: var(--spacing-md);
        border-radius: var(--radius-lg);
        max-height: calc(100vh - 16px);
    }
    
    .screen-heading {
        font-size: 1.5rem;
    }
    
    .app-shell {
        padding: var(--spacing-xs);
    }
    
    .step-label {
        font-size: 0.65rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .screen-subtext {
        font-size: 0.85rem;
        margin-bottom: var(--spacing-md);
    }
    
    .tagline {
        font-size: 0.6rem;
        margin-top: var(--spacing-md);
    }
}

@media (min-width: 768px) {
    .app-shell {
        padding: var(--spacing-xl);
    }
    
    .screen-card {
        padding: var(--spacing-xl);
    }
    
    .screen-heading {
        font-size: 2rem;
    }
}

/* ============================================
   SEAT COUNTER
   ============================================ */
.seats-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--spacing-sm);
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.seat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(216, 168, 79, 0.22);
    background: rgba(216, 168, 79, 0.05);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--muted);
    transition: var(--transition);
}

.seat-pill .seat-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.7;
    flex-shrink: 0;
}

.seat-pill .seat-num {
    color: var(--gold);
    font-weight: 700;
}

.seat-pill.seat-full {
    border-color: rgba(217, 72, 36, 0.3);
    background: rgba(217, 72, 36, 0.05);
}
.seat-pill.seat-full .seat-dot { background: var(--red); }
.seat-pill.seat-full .seat-num { color: var(--red); }

.seat-pill.seat-paused {
    border-color: rgba(185, 178, 154, 0.2);
    background: transparent;
}
.seat-pill.seat-paused .seat-dot { background: var(--muted); opacity: 0.4; }
.seat-pill.seat-paused .seat-num { color: var(--muted); }

.seat-divider {
    color: rgba(216, 168, 79, 0.25);
    font-size: 0.6rem;
    user-select: none;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

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

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* ============================================
   INFO NOTICE
   ============================================ */
.info-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: 14px 16px;
    background: rgba(216, 168, 79, 0.08);
    border: 1px solid rgba(216, 168, 79, 0.3);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(246, 216, 139, 0.08);
}

.info-notice-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin-top: 2px;
}

.info-notice-icon i {
    width: 20px;
    height: 20px;
}

.info-notice-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-notice-content strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 0.01em;
}

.info-notice-content span {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text);
    opacity: 0.9;
}

.inline-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(216, 168, 79, 0.4);
    transition: var(--transition);
    padding-bottom: 1px;
}

.inline-link:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold-light);
}
