:root {
    --bg-dark: #0a0a0a;
    --gold-primary: #D4AF37;
    --gold-light: #F4DFB4;
    --gold-dark: #AA8C2C;
    --text-primary: #F0F0F0;
    --text-secondary: #A0A0A0;
    --card-bg: rgba(255, 255, 255, 0.03);
    --success-green: #2ecc71;
    --error-red: #e74c3c;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 600px; /* Tablet/Kiosk size */
    height: 100vh;
    position: relative;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-out;
    transform: scale(0.95);
    padding: 40px;
    text-align: center;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* IDLE SCREEN */
.logo-area {
    margin-bottom: 60px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary), var(--gold-dark));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 0.9rem;
    letter-spacing: 6px;
    color: var(--gold-primary);
    text-transform: uppercase;
}

.nfc-indicator {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    touch-action: manipulation;
}

.nfc-indicator .icon {
    color: var(--gold-primary);
    z-index: 2;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--gold-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: -10px; bottom: -10px; left: -10px; right: -10px;
    border: 1px solid var(--gold-dark);
    border-radius: 50%;
    animation: pulse 2s infinite 0.5s;
    opacity: 0;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 0; }
}

.instruction {
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.idle-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.secondary-action {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: 6px;
    letter-spacing: 2px;
    font-size: 0.75rem;
    text-transform: uppercase;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}

.secondary-action:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.22);
}

.secondary-action:active {
    transform: scale(0.98);
}

@media (hover: none) and (pointer: coarse) {
    .secondary-action {
        width: min(360px, 100%);
    }
}

/* MEMBER SCREEN */
.status-bar {
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-badge {
    color: var(--success-green);
    border: 1px solid var(--success-green);
    padding: 5px 10px;
    border-radius: 2px;
    letter-spacing: 2px;
    font-size: 0.7rem;
}

.member-card {
    background: var(--card-bg);
    padding: 50px 30px;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.profile-image-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
}

.profile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(20%) contrast(110%);
}

.gold-border {
    position: absolute;
    top: -5px; bottom: -5px; left: -5px; right: -5px;
    border: 2px solid var(--gold-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.member-info h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.tier-badge {
    color: var(--gold-primary);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    display: inline-block;
    padding-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px; /* Increased vertical gap */
    margin-top: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-light);
}

.footer-message {
    position: absolute;
    bottom: 40px;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ERROR SCREEN */
.icon-error {
    font-size: 4rem;
    color: var(--error-red);
    margin-bottom: 20px;
    border: 2px solid var(--error-red);
    width: 80px;
    height: 80px;
    line-height: 80px; /* Vertically center */
    border-radius: 50%;
    display: inline-block;
}

#error-screen h2 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 10px;
}

#error-screen p {
    color: var(--text-secondary);
}
