/* Scripture Page Styles */
:root {
    --void: #000000;
    --light: #FFFFFF;
    --gold: #C9A962;
    --highlight: rgba(201, 169, 98, 0.3);
    --font-heading: 'Cinzel', serif;
    --font-body: 'EB Garamond', serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a0a 0%, #111 100%);
    color: var(--light);
    font-family: var(--font-body);
    line-height: 1.8;
}

/* Navigation */
.scripture-nav {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 100;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 1;
}

/* Audio Controls Panel */
.audio-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.controls-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.control-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    border-color: var(--gold);
    background: rgba(201, 169, 98, 0.1);
}

.control-btn .hidden {
    display: none;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.control-group label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.control-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light);
    padding: 0.4rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    min-width: 80px;
}

.control-select:focus {
    outline: none;
    border-color: var(--gold);
}

.voice-group .control-select {
    min-width: 150px;
    max-width: 200px;
}

.control-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--light);
    border-radius: 50%;
    cursor: pointer;
}

.control-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--light);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--void);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-content p {
    font-style: italic;
    opacity: 0.6;
}

/* Fallback Message */
.fallback-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(180, 50, 50, 0.9);
    color: white;
    padding: 1rem;
    text-align: center;
    z-index: 9999;
}

.fallback-message.hidden {
    display: none;
}

/* Scripture Container */
.scripture-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 6rem 2rem 10rem;
}

.scripture-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.scripture-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.chapter-ref {
    font-size: 1rem;
    opacity: 0.5;
    font-style: italic;
}

/* Scripture Text */
.scripture-text {
    font-size: 1.35rem;
    line-height: 2;
}

.verse {
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border-left: 2px solid transparent;
    transition: all 0.4s ease;
    border-radius: 4px;
}

.verse-num {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    vertical-align: super;
    opacity: 0.4;
    margin-right: 0.3rem;
    letter-spacing: 0.05em;
}

/* Highlighted (Currently Speaking) Verse */
.verse.speaking {
    background: var(--highlight);
    border-left-color: var(--gold);
    box-shadow: 0 0 30px rgba(201, 169, 98, 0.15);
}

.verse.speaking .verse-num {
    opacity: 1;
    color: var(--gold);
}

/* Scripture Footer */
.scripture-footer {
    text-align: center;
    margin-top: 4rem;
    padding-bottom: 2rem;
}

.end-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    opacity: 0.4;
}

/* Responsive */
@media (max-width: 768px) {
    .scripture-nav {
        top: 1rem;
        left: 1rem;
    }

    .audio-controls {
        padding: 0.8rem 1rem;
    }

    .controls-inner {
        gap: 1rem;
    }

    .control-btn {
        width: 44px;
        height: 44px;
    }

    .voice-group {
        display: none;
        /* Hide on mobile for simplicity */
    }

    .scripture-container {
        padding: 5rem 1.5rem 9rem;
    }

    .scripture-text {
        font-size: 1.15rem;
    }

    .verse {
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .control-group label {
        display: none;
    }

    .scripture-header h1 {
        letter-spacing: 0.05em;
    }
}

/* Hidden utility */
.hidden {
    display: none !important;
}