/* ============================================================
   JC Idle Game — Theme overrides on top of Bootstrap 5
   ============================================================ */

/* ---------- Color palette ---------- */
:root {
    --jc-navy:        #1a1a2e;
    --jc-gold:        #c9a227;
    --jc-gold-dark:   #a07d0f;
    --jc-parchment:   #f5f0e8;
    --jc-card:        #fffdf7;
    --jc-border:      #ddd6c5;
    --jc-muted:       #7a6e5e;
    --jc-success:     #2d6a4f;
    --jc-danger:      #8b1a1a;

    /* Override Bootstrap primary to gold */
    --bs-primary:     #c9a227;
    --bs-primary-rgb: 201,162,39;
    --bs-body-bg:     #FAF0E6;
    --bs-body-color:  #2c2c2c;
    --bs-border-color: #ddd6c5;
    --bs-card-bg:     #fffdf7;
}

body { -webkit-font-smoothing: antialiased; }

/* ---------- Buttons ---------- */
.btn-primary  { background: var(--jc-gold); border-color: var(--jc-gold); color: var(--jc-navy); font-weight: 700; }
.btn-primary:hover, .btn-primary:focus { background: var(--jc-gold-dark); border-color: var(--jc-gold-dark); color: #fff; }
.btn-outline-primary { border-color: var(--jc-gold); color: var(--jc-gold); }
.btn-outline-primary:hover { background: var(--jc-gold); color: var(--jc-navy); }

/* Secondary = navy */
.btn-secondary { background: var(--jc-navy); border-color: var(--jc-navy); color: #fff; font-weight: 700; }
.btn-secondary:hover { background: #2d2d5e; border-color: #2d2d5e; }
.btn-outline-secondary { border-color: var(--jc-navy); color: var(--jc-navy); }
.btn-outline-secondary:hover { background: var(--jc-navy); color: #fff; }

/* ---------- Cards ---------- */
.card { border-color: var(--jc-border); background: var(--jc-card); border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); }
.card-header { background: rgba(26,26,46,0.04); border-bottom-color: var(--jc-border); font-weight: 700; font-family: Georgia, serif; }

/* ---------- Forms ---------- */
.form-control,
.form-select,
textarea.form-control {
    background-color: #ffffff;
    border: 1px solid #c8bfb0;
    color: #2c2c2c;
}
.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: var(--jc-gold);
    box-shadow: 0 0 0 0.2rem rgba(201,162,39,0.2);
}
.form-control:disabled, .form-control[readonly] {
    background-color: #ede8df;
}
.form-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--jc-muted); }

/* ---------- Badges ---------- */
.badge.bg-primary   { background: var(--jc-gold) !important; color: var(--jc-navy); }
.badge.bg-secondary { background: var(--jc-navy) !important; }

/* ---------- Alerts ---------- */
.alert-primary { background: rgba(201,162,39,0.12); border-color: rgba(201,162,39,0.4); color: #7a5c00; }

/* ============================================================
   SPLASH PAGE — linen background with light-ray SVG
   ============================================================ */
.splash-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #FAF0E6;   /* linen */
    color: #2c2010;
}

/* Hero: rays fill the top, title sits over them */
.splash-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding-bottom: 1rem;
    position: relative;
}

/* SVG ray graphic — full-width, fixed height */
.splash-rays-wrap {
    width: 100%;
    line-height: 0;   /* remove inline gap */
}
.splash-rays-svg {
    width: 100%;
    height: auto;
    display: block;
    max-height: 260px;
}

/* Title and subtitle sit below the rays */
.splash-title {
    font-family: Georgia, serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--jc-navy);
    line-height: 1.1;
    margin-top: 1.25rem;
    margin-bottom: 0;
}
.splash-subtitle {
    color: #6b5a42;
    font-size: 1rem;
    max-width: 280px;
    line-height: 1.65;
    margin-top: 0.6rem;
}

/* Italic story quote */
.splash-story {
    margin: 0 1.25rem 0;
    padding: 1.1rem 1.4rem;
    background: rgba(201,162,39,0.08);
    border: 1px solid rgba(201,162,39,0.3);
    border-radius: 12px;
    font-style: italic;
    color: #6b5a42;
    font-size: 0.9rem;
    line-height: 1.75;
    text-align: center;
}

.splash-cta { padding: 1.25rem 1.25rem 2.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.splash-cta .btn { font-size: 1.05rem; padding: 0.85rem; border-radius: 10px; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--jc-navy);
    background-image: radial-gradient(ellipse at top, #2d2d5e 0%, #1a1a2e 60%);
}
.auth-card { width: 100%; max-width: 400px; border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,0.35); }
.auth-logo .cross { font-size: 3rem; display: block; }
.auth-logo h2 { font-family: Georgia, serif; color: var(--jc-navy); }
.auth-logo p { font-size: 0.85rem; color: var(--jc-muted); }

/* ============================================================
   GAME LAYOUT — fixed header + fixed bottom nav
   ============================================================ */
:root {
    --header-h: 60px;
    --nav-h:    62px;
}

.game-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: #2c1a0e;
    color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1rem;
    z-index: 1030;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.header-brand { font-family: Georgia, serif; font-size: 0.95rem; font-weight: 700; color: var(--jc-gold); display: flex; align-items: center; gap: 0.4rem; }
.header-stats { display: flex; gap: 0.35rem; }
.stat-pill {
    display: flex; align-items: center; gap: 0.2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px; padding: 0.2rem 0.55rem;
    font-size: 0.75rem; font-weight: 700;
}
.stat-pill.sp-believers { color: #a8d8a8; }
.stat-pill.sp-faith     { color: #f0d778; }
.stat-pill.sp-energy    { color: #a8c8f0; }

.game-content {
    margin-top: var(--header-h);
    margin-bottom: var(--nav-h);
    padding: 1.1rem;
    min-height: calc(100vh - var(--header-h) - var(--nav-h));
    background: #FAF0E6;
}

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: #E0C9A6;
    display: flex; align-items: stretch;
    z-index: 1030;
    box-shadow: 0 -1px 6px rgba(100,60,10,0.15);
    border-top: 1px solid #C9A874;
    overflow: visible;
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: rgba(80,50,15,0.45); text-decoration: none; font-size: 0.68rem; gap: 0.15rem;
    transition: color 0.15s; padding: 0.4rem 0;
    border-top: 2px solid transparent;
}
.nav-item .nav-icon { font-size: 1.35rem; line-height: 1; }
.nav-item.active { color: #1a1008; border-top: 3px solid #1a1a2e; }
.nav-item:hover { color: rgba(80,50,15,0.85); text-decoration: none; }

/* Preach — raised hero button */
.nav-preach {
    position: relative;
    margin-top: -20px;
    border-top: none !important;
    justify-content: flex-end;
    padding-bottom: 0.35rem;
}
.nav-preach .nav-icon {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d8ae28, #c9a227);
    border: 3px solid #E0C9A6;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem; line-height: 1;
    box-shadow: 0 -3px 12px rgba(201,162,39,0.4), 0 3px 10px rgba(0,0,0,0.18);
    margin-bottom: 0.2rem;
}
.nav-preach.active { color: #7a4f0a; border-top: none !important; }
.nav-preach.active .nav-icon {
    background: linear-gradient(145deg, #eac832, #d4a820);
    border-color: #fff;
    box-shadow: 0 -4px 16px rgba(201,162,39,0.6), 0 3px 10px rgba(0,0,0,0.2);
}

/* ============================================================
   GAME COMPONENTS
   ============================================================ */
.welcome-banner {
    background: linear-gradient(135deg, #2c1a0e 0%, #4a2e14 100%);
    border-radius: 12px; padding: 1.25rem 1.25rem 1.1rem; margin-bottom: 1rem; color: #fff;
}
.welcome-banner h2 { font-family: Georgia, serif; font-size: 1.25rem; color: var(--jc-gold); margin-bottom: 0.2rem; }
.welcome-banner p  { font-size: 0.85rem; color: rgba(255,220,170,0.75); margin: 0; line-height: 1.5; }

.stat-card-sm { text-align: center; }
.stat-card-sm .s-icon  { font-size: 1.5rem; }
.stat-card-sm .s-value { font-size: 1.25rem; font-weight: 700; color: var(--jc-navy); display: block; }
.stat-card-sm .s-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--jc-muted); }

.energy-bar { height: 9px; background: var(--jc-border); border-radius: 5px; overflow: hidden; }
.energy-bar-fill { height: 100%; background: linear-gradient(90deg, #4a90d9, #a8c8f0); border-radius: 5px; transition: width 0.5s ease; }

.scripture-card { font-style: italic; color: #5a4e3e; font-size: 0.9rem; line-height: 1.75; }

/* Profile avatar */
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--jc-navy), #2d2d5e);
    color: var(--jc-gold); font-family: Georgia, serif; font-size: 2rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.75rem; border: 3px solid var(--jc-gold);
}

/* Explore accordion */
.region-cities { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.city-row {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--jc-parchment); border-radius: 8px; padding: 0.7rem 0.9rem;
    border: 1px solid var(--jc-border);
}
.city-name { font-weight: 700; font-size: 0.875rem; color: var(--jc-navy); }
.city-desc { font-size: 0.73rem; color: var(--jc-muted); margin-top: 0.1rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 576px) {
    .splash-title { font-size: 3rem; }
    .game-content { max-width: 600px; margin-left: auto; margin-right: auto; }
}
