/* ===== L.C. Bible Forge - Base Styles ===== */
:root {
    --gold: #c9a84c;
    --gold-light: #e5c76b;
    --gold-dark: #a8863a;
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
    --transition: all 0.3s ease;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-scripture: 'Merriweather', serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font-body); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 10px; }

/* ===== Hero Background (all pages) ===== */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.hero-bg .radial-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(201, 168, 76, 0.12), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(120, 80, 200, 0.15), transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(201, 168, 76, 0.08), transparent 55%);
}

.light-rays {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    background: repeating-linear-gradient(
        100deg,
        transparent 0,
        transparent 80px,
        rgba(255, 240, 200, 0.06) 82px,
        transparent 160px
    );
    opacity: 0.5;
    animation: raysPulse 8s ease-in-out infinite;
    pointer-events: none;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-light), var(--gold));
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.8);
    animation: floatUp linear infinite;
}

.particle.star {
    border-radius: 0;
    background: var(--gold-light);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    box-shadow: none;
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    color: #17170e;
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201, 168, 76, 0.5); }

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: var(--glass-border); }

.btn-danger { background: #e0555580; color: #fff; }
.btn-danger:hover { background: #e05555; }

.btn-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.btn-icon:hover { background: var(--gold); color: #17170e; }
.btn-icon.active { background: var(--gold); color: #17170e; }

/* ===== App Layout ===== */
.app-layout { display: flex; min-height: 100vh; }

.main-content {
    flex: 1;
    padding: 40px;
    max-width: 100%;
    min-height: 100vh;
}

.page-header { margin-bottom: 32px; }
.page-header h1 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.page-header p { color: var(--text-secondary); }

/* ===== Sidebar ===== */
.sidebar {
    width: 270px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.35s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px 24px;
    border-bottom: 1px solid var(--glass-border);
}
.sidebar-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; animation: pulseGlow 3s ease-in-out infinite; }
.sidebar-header h2 { font-size: 1.15rem; color: var(--gold); line-height: 1.2; }

.nav-menu { flex: 1; padding: 20px 14px; overflow-y: auto; }
.nav-menu li { margin-bottom: 6px; }
.nav-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    min-height: 44px;
}
.nav-menu a i { width: 20px; text-align: center; color: var(--gold); }
.nav-menu a:hover { background: var(--glass-bg); color: var(--text-primary); }
.nav-menu a.active { background: linear-gradient(135deg, rgba(201,168,76,0.25), rgba(201,168,76,0.08)); color: var(--text-primary); box-shadow: inset 3px 0 0 var(--gold); }

.sidebar-footer {
    padding: 18px 14px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sidebar-footer button {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    background: var(--glass-bg);
    width: 100%;
    min-height: 44px;
}
.sidebar-footer button:hover { color: var(--text-primary); background: var(--glass-border); }

.hamburger {
    display: none;
    position: fixed;
    top: 18px; left: 18px;
    z-index: 200;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99;
}

/* ===== Cards Grid ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.stat-card {
    padding: 26px;
    text-align: center;
}
.stat-card i { font-size: 1.8rem; color: var(--gold); margin-bottom: 12px; }
.stat-card .stat-value { font-size: 2.2rem; font-family: var(--font-heading); font-weight: 700; }
.stat-card .stat-label { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); }
.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1rem;
    min-height: 44px;
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.2); }
textarea.form-control { resize: vertical; min-height: 110px; }

/* ===== Modal ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center; justify-content: center;
    z-index: 500;
    padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 32px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { color: var(--gold); font-size: 1.4rem; }
.modal-close { font-size: 1.3rem; color: var(--text-secondary); }

/* ===== Toast ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    padding: 16px 22px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 500;
    box-shadow: var(--shadow-md);
}
.toast.success { background: linear-gradient(135deg, #2f9e6e, #1c7a52); }
.toast.error { background: linear-gradient(135deg, #d64545, #a92e2e); }
.toast.info { background: linear-gradient(135deg, #4a6fd6, #33509e); }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state i { font-size: 3rem; color: var(--gold); opacity: 0.5; margin-bottom: 16px; }

/* Utility */
.text-gold { color: var(--gold); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
