:root {
    /* Color Palette - Premium Spiritual Aesthetic */
    --primary: #c5a059;
    /* Muted Gold */
    --primary-light: #e0c28d;
    --secondary: #2c3e50;
    /* Deep Slate Blue */
    --accent: #8e44ad;
    --bg-dark: #0f172a;
    /* Deep Navy Night */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-dark);
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Background Glows */
.bg-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.15;
}

.bg-glow-1 {
    top: -50px;
    right: -50px;
    background: var(--primary);
}

.bg-glow-2 {
    bottom: 50px;
    left: -50px;
    background: var(--accent);
}

/* Header */
.main-header {
    padding: 2rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

/* Home Hero Layout - From Designer Preview */
.hero-image-outer {
    position: relative;
    width: 100%;
    height: 280px;
    margin-bottom: 2rem;
}

.hero-image-outer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 0 40px 40px;
}

.hero-overlay-text {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    padding: 1rem 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    width: 85%;
    backdrop-filter: blur(15px);
}

.welcome-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.church-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
}

.logo span {
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.icon-btn:active {
    transform: scale(0.95);
}

.notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    z-index: 5;
    padding-bottom: 80px;
}

section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Adjustments for the Overhaul */
.hero-image-container {
    width: 100%;
    height: 300px;
    /* Taller image as requested */
    border-radius: 0 0 40px 40px;
    overflow: hidden;
    margin-bottom: 0;
    position: relative;
    border: 1px solid var(--glass-border);
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, var(--bg-dark), transparent);
}

.hero {
    margin: 1rem 0 2rem;
    text-align: center;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-weight: 300;
    font-style: italic;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.next-meeting h3 {
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.next-meeting h3::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

#countdown-timer {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#next-meeting-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Radio Mini Player */
.radio-mini-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.radio-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.radio-info i {
    color: var(--primary);
    font-size: 1.2rem;
}

.radio-info h4 {
    font-size: 1rem;
}

.radio-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.play-btn {
    background: var(--primary);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    transition: var(--transition);
}

.play-btn:hover {
    transform: scale(1.05);
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 10px 10px;
    z-index: 100;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
}

.bottom-nav::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    width: 75px;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 400;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* Bible Section Styles */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary);
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bible-search {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.bible-search input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: inherit;
}

.bible-text {
    min-height: 200px;
    line-height: 1.8;
}

.placeholder-text {
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    margin-top: 3rem;
}

/* Schedule List */
.schedule-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem;
}

.item-day {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    width: 80px;
}

.item-details h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.item-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Note Editor */
.note-editor textarea {
    width: 100%;
    min-height: 120px;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    margin-bottom: 1rem;
}

.note-editor textarea:focus {
    outline: none;
}

.save-btn {
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

.save-btn:active {
    transform: scale(0.98);
}

.notes-grid {
    display: grid;
    gap: 1rem;
}

.note-card p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.note-footer button {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 5px;
}

/* Radio Player Full */
.radio-full-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 3rem 2rem;
}

.player-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 60px;
}

.player-visualizer .bar {
    width: 8px;
    background: var(--primary);
    border-radius: 4px;
    animation: bounce 1s ease-in-out infinite alternate;
}

.player-visualizer .bar:nth-child(2) {
    animation-delay: 0.2s;
    height: 100%;
}

.player-visualizer .bar:nth-child(1) {
    height: 60%;
}

.player-visualizer .bar:nth-child(3) {
    height: 80%;
    animation-delay: 0.4s;
}

@keyframes bounce {
    from {
        height: 20%;
    }

    to {
        height: 100%;
    }
}

.play-btn.large {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
}

.radio-status {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Overlay & Modals */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.overlay.hidden {
    display: none;
}

.modal {
    width: 100%;
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
}

/* Reading Plan Styles */
.reading-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 15px;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.reading-item:hover {
    border-color: var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
}

.reading-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Devotional Styles */
.devotional-card {
    padding: 2.5rem 2rem;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.devotional-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
}

.devotional-card .verse-ref {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: block;
}

.devotional-card .devotional-text {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 2rem;
    font-weight: 300;
}

.devotional-card .author-box {
    text-align: right;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.2rem;
}

.devotional-card .author-box span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 600;
}

/* Responsive Overrides */
@media (min-width: 501px) {
    .app-container {
        border-right: 1px solid var(--glass-border);
        border-left: 1px solid var(--glass-border);
        box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
    }
}