
/* --- Global Variables --- */
:root {
    /* Brand Colors */
    --color-brand: #C62828; /* Rich Chuck's Red */
    --color-brand-light: #FFEBEE;
    --color-brand-dark: #8E0000;
    
    /* Functional Colors */
    --color-success: #2E7D32;
    --color-success-bg: #E8F5E9;
    --color-warning: #FF6D00;
    --color-error: #D32F2F;
    --color-bg-app: #FAFAFA;
    --color-bg-card: #FFFFFF;
    
    /* Text Colors */
    --color-text-primary: #212121;
    --color-text-secondary: #757575;
    --color-text-tertiary: #BDBDBD;
    
    /* Typography */
    --font-family-base: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.05), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-float: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* --- Reset & Base --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; /* App-like */ }

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg-app);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
#app {
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Scroll within app container */
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 480px; /* Mobile focused max-width */
    margin: 0 auto;
    width: 100%;
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Components --- */

/* Buttons */
.btn {
    appearance: none;
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease, background-color 0.2s;
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
    background-color: var(--color-brand);
    color: white;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}
.btn-primary:active { background-color: var(--color-brand-dark); }

.btn-secondary {
    background-color: white;
    color: var(--color-brand);
    border: 1px solid var(--color-brand-light);
}

.btn-ghost {
    color: var(--color-text-secondary);
}

/* Inputs */
.form-group { margin-bottom: var(--spacing-md); }
.label { display: block; margin-bottom: var(--spacing-sm); font-weight: 500; font-size: 0.9rem; color: var(--color-text-secondary); }
.input {
    width: 100%;
    padding: 16px;
    border: 2px solid #E0E0E0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}
.input:focus { outline: none; border-color: var(--color-brand); }

/* Cards */
.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

/* Typography */
h1 { font-size: 2rem; font-weight: 800; margin: 0 0 var(--spacing-sm) 0; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 var(--spacing-sm) 0; }
h3 { font-size: 1.25rem; font-weight: 600; margin: 0 0 var(--spacing-sm) 0; }
p { margin: 0 0 var(--spacing-md) 0; line-height: 1.5; color: var(--color-text-secondary); }
.text-center { text-align: center; }
.text-small { font-size: 0.85rem; }

/* Utilities */
.hidden { display: none !important; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.w-full { width: 100%; }
.mt-auto { margin-top: auto; }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* Status Badges */
.badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-pending { background: #E0E0E0; color: #616161; }
.badge-warning { background: #FFF3E0; color: #E65100; }

/* Brand Header */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.brand-logo { width: 40px; height: 40px; border-radius: 8px; background: var(--color-brand); margin-right: 12px; } /* Placeholder */
.brand-name { font-weight: 900; font-size: 1.2rem; color: var(--color-text-primary); }

/* Offline Banner */
#offline-banner {
    background-color: var(--color-text-primary);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 0.85rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s;
}
#offline-banner.visible { transform: translateY(0); }

/* Install Banner */
#install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: var(--spacing-md);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 900;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#install-banner.visible { transform: translateY(0); }

/* Punch Card Visuals */
.punch-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 24px 0;
}
.punch-dot {
    aspect-ratio: 1;
    border-radius: 50%;
    background: #EEEEEE;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.punch-dot.filled {
    background: var(--color-brand);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.3);
    transform: scale(1.1);
}
.punch-dot.active-reward {
    background: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}
