:root {
    --primary: #004d40;
    --primary-dark: #00251a;
    --gold: #d4af37;
    --gold-light: #fdd835;
    --gold-dark: #9e8229;
    --accent: #ff6f00;
    --dark: #121212;
    --surface: #1e1e1e;
    --text: #ffffff;
    --text-secondary: #b0bec5;
    --success: #4caf50;
    --error: #f44336;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--text);
    height: 100vh;
    display: flex;
    justify-content: center;
    overflow: hidden;
    /* App container handles scroll */
}

#app-container {
    width: 100%;
    max-width: 480px;
    /* Mobile width simulation */
    height: 100%;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--surface) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* --- Header --- */
header {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gold);
}

.app-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gold);
}

.user-balance-display {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--gold-light);
    font-size: 0.9rem;
    border: 1px solid var(--gold-dark);
}

/* --- Content Area --- */
#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 80px;
    /* Space for navbar */
    position: relative;
}

/* --- Typography & Utils --- */
h1,
h2,
h3 {
    margin-bottom: 0.5rem;
}

.text-gold {
    color: var(--gold);
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.w-full {
    width: 100%;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.btn {
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    width: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--gold);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background: var(--gold-light);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

/* --- Cards --- */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
}

.ticket-card {
    border-left: 4px solid var(--gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-info h3 {
    color: var(--gold-light);
    font-size: 1.1rem;
}

.ticket-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Screens --- */
.screen {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Screen */
.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    align-items: center;
    gap: 1.5rem;
    background: radial-gradient(circle at center, #004d40 0%, #000000 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

/* Animated Background Effect */
.auth-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    animation: rotateBg 10s linear infinite;
    pointer-events: none;
}

@keyframes rotateBg {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.auth-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.logo-animate {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.input-group {
    position: relative;
    margin-bottom: 1.2rem;
}

.input-field {
    width: 100%;
    padding: 14px 14px 14px 45px;
    /* Space for icon */
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    /* Pill shape */
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.input-field:focus {
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.6);
    outline: none;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 1.1rem;
}

/* Wallet Screen */
.balance-card {
    text-align: center;
    background: linear-gradient(135deg, var(--gold-dark), var(--primary));
    padding: 2rem;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Payment Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--gold);
    text-align: center;
}

.qr-code-img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    margin: 1rem auto;
    display: block;
    background: white;
    /* Placeholder if bg is transparent */
    padding: 5px;
}

.timer-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--error);
    margin: 10px 0;
}

.upi-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.upi-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: black;
}

/* --- Bottom Nav --- */
.bottom-nav {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: var(--surface);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 20;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    gap: 4px;
}

.nav-item.active {
    color: var(--gold);
}

.nav-icon {
    font-size: 1.2rem;
}

/* Admin Panel */
.admin-card {
    border-color: var(--accent);
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
}

.status-pending {
    background: #ff9800;
    color: black;
}

.status-approved {
    background: var(--success);
}

.status-rejected {
    background: var(--error);
}