/*
 * KV Diwali shared theme — "Jhilmil Diwali · 25 years of Sparkles" (Silver Jubilee).
 * Single source of truth for the site's color scheme and a few reusable
 * building blocks (buttons, alerts, fade-in). Linked by index_2026.php,
 * viewattendees.php, viewperformers.php, and register.php — change a
 * variable here and it applies everywhere it's linked.
 *
 * Palette is taken from the 2026 banner:
 *   silver  #ECECED / #E2E1DE   page and card surfaces
 *   navy    #163976             titles, headings, primary buttons
 *   emerald #08703E             "KutchValley's" / date text → secondary accent
 *   gold    #BF9D60 / #D2A866   sparkles, borders, badges
 *   flame   #E8651A             diya-flame orange → hover / required marks
 *
 * NOTE ON NAMES: this replaces the earlier dark night-sky theme (backup:
 * diwali-theme.dark-backup.css). The variable names from that theme were kept
 * so no page needed renaming, but a few now mean something different:
 *   --night-sky      page background (now silver)
 *   --heading-gold   heading / link / number color (now navy)
 *   --text-on-dark   primary text on cards (now dark slate, since cards are light)
 * To go back to the dark theme: copy diwali-theme.dark-backup.css over this file.
 */

:root {
    /* ── Core palette ── */
    --navy: #163976;
    --navy-deep: #0f2a5a;
    --green: #08703e;
    --on-gold: #112a5c;            /* text that sits on gold badges/buttons */

    --primary-color: #c9a35a;      /* champagne gold: borders, dividers, focus rings */
    --secondary-color: #08703e;    /* emerald */
    --accent-color: #e8651a;       /* diya-flame orange: hover, required marks */
    --text-dark: #1b2a4a;
    --text-light: #ecf0f1;
    --background-light: #f4f5f6;

    /* ── Gradients ── */
    --gradient: linear-gradient(135deg, #0f2a5a 0%, #163976 55%, #335188 100%);   /* navy; use with white text */
    --anniversary-gradient: linear-gradient(135deg, #f0e0b0 0%, #d4b26a 45%, #b88f44 100%); /* gold; use with --on-gold text */
    --numeral-gradient: linear-gradient(135deg, #0f2a5a 0%, #163976 50%, #335188 100%);     /* the big "25" */

    /* ── Page + surfaces ── */
    --night-sky:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0) 22%),
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.90) 0, rgba(255, 255, 255, 0) 24%),
        radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.70) 0, rgba(255, 255, 255, 0) 32%),
        linear-gradient(180deg, #f2f3f5 0%, #e6e7ea 45%, #d3d5da 80%, #bfc2c8 100%);
    --aurora-bg:
        radial-gradient(ellipse at 20% 50%, rgba(201, 163, 90, 0.14) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.80) 0%, transparent 45%),
        radial-gradient(ellipse at 60% 80%, rgba(22, 57, 118, 0.06) 0%, transparent 40%);
    --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 245, 246, 0.84));
    --card-border: rgba(201, 163, 90, 0.45);
    --hero-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(233, 235, 239, 0.88));
    --surface-inset: rgba(22, 57, 118, 0.045);
    --badge-bg: rgba(22, 57, 118, 0.10);
    --fade-edge: rgba(244, 245, 246, 0.95);       /* edge fade on the scrolling name tickers */
    --shadow: 0 4px 15px rgba(22, 57, 118, 0.08);
    --shadow-glow: 0 8px 32px rgba(22, 57, 118, 0.10);
    --border-radius: 12px;

    /* ── Text ── */
    --heading-gold: #163976;       /* headings, links, big numbers (navy) */
    --text-on-dark: #1b2a4a;       /* primary text on cards */
    --text-muted: #5a6781;

    /* ── Tables, footer, forms ── */
    --table-head-bg: linear-gradient(135deg, #0f2a5a, #163976);
    --table-head-text: #f0e0b0;
    --footer-bg: linear-gradient(135deg, #0f2a5a, #163976);
    --footer-text: #eef1f8;
    --option-bg: #ffffff;          /* <select> dropdown rows */
    --input-focus-bg: #ffffff;
    --danger-text: #a3222f;

    /* ── Sponsor tiles: tinted panel so white-background logos stay visible ── */
    --panel-bg: linear-gradient(160deg, #dde2ea 0%, #ebeef3 100%);
    --tile-bg: #ffffff;
    --tile-border: rgba(201, 163, 90, 0.65);
    --tile-shadow: 0 2px 10px rgba(22, 57, 118, 0.14);
    --tile-ring: linear-gradient(135deg, #d4b26a, #f3e6bf 50%, #d4b26a);

    /* ── Sparkles ── */
    --sparkle-color: #d4b26a;
    --sparkle-glow: rgba(212, 178, 106, 0.85);
    --ring-color: rgba(184, 143, 68, 0.28);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--night-sky);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Ambient glow — CSS-only, no markup or JS required */
body::before {
    content: '';
    position: fixed;
    inset: -50%;
    z-index: 0;
    pointer-events: none;
    background: var(--aurora-bg);
    animation: kv-aurora-shift 18s ease-in-out infinite alternate;
}

@keyframes kv-aurora-shift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(3%, -2%) rotate(2deg); }
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

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

/* Shared buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--anniversary-gradient);
    color: var(--on-gold);
    font-weight: 600;
    font-size: 0.85em;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(184, 143, 68, 0.35);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(184, 143, 68, 0.5);
    color: var(--on-gold);
    text-decoration: none;
}

.btn-secondary {
    background: var(--surface-inset);
    color: var(--text-on-dark);
    border: 1px solid var(--card-border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(22, 57, 118, 0.10);
    color: var(--heading-gold);
    box-shadow: none;
}

.btn-gradient-glow {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 18px 35px;
    font-size: 1.5em;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(22, 57, 118, 0.30);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-gradient-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(22, 57, 118, 0.40);
}

.btn-gradient-glow:disabled {
    background: #8a8f99;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading lock-out — deliberately not :disabled, so the button's name/value
   still posts with the form. See register.php's submit handler. */
.btn-gradient-glow.is-loading {
    background: #8a8f99;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* Shared alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(8, 112, 62, 0.10);
    color: #0a5a33;
    border-color: #08703e;
}

.alert-error {
    background: rgba(185, 40, 55, 0.09);
    color: #8f1d2b;
    border-color: #b92837;
}

.alert-warning {
    background: rgba(201, 163, 90, 0.18);
    color: #6b4e12;
    border-color: #c9a35a;
}

.big-number {
    font-size: 2em;
    font-weight: bold;
    color: var(--heading-gold);
    text-shadow: 0 0 12px rgba(201, 163, 90, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    .fade-in {
        animation: none !important;
    }
}
