:root {
    --bg-dark: #0f0c29;
    --bg-mid: #302b63;
    --bg-light: #24243e;
    --accent: #4facfe;
    --accent-glow: rgba(79, 172, 254, 0.5);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid), var(--bg-light));
    z-index: -1;
}

.player-container {
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 700px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none !important;
}

.mini-logo {
    width: 40px;
    height: 40px;
    opacity: 0.8;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    gap: 2.5rem;
}

.art-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto;
}

.album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.5s ease;
    z-index: 2;
    position: relative;
    border: 1px solid var(--glass-border);
}

.art-wrapper.playing .album-art {
    transform: scale(1.05);
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: var(--accent);
    opacity: 0;
    z-index: 1;
}

.art-wrapper.playing .pulse-ring {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

.info-wrapper h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-wrapper p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

.controls-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px var(--accent-glow);
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px var(--accent-glow);
}

.play-btn:active {
    transform: translateY(0);
}

.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    background: var(--glass);
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.volume-wrapper i {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

#volume-slider {
    flex: 1;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-glow);
}

footer {
    padding-top: 1rem;
}

.social-links {
    display: flex;
    gap: 2rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
}

/* --- Modal & Menu Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    height: 80vh;
    background: #1a1a2e; /* Darker background for readability */
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.modal-content.glass {
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.menu-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.menu-item i {
    font-size: 1.5rem;
}

.bible-icon { color: #ffd700; }
.schedule-icon { color: var(--accent); }

/* --- Bible View Styles --- */
.view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.bible-scroll-area, .schedule-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.bible-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.8rem;
}

.bible-grid.chapters {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
}

.bible-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.8rem;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    text-align: center;
}

.bible-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.bible-testament-header {
    grid-column: 1 / -1;
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin: 1.5rem 0 0.5rem;
    font-weight: 600;
}

.bible-text {
    line-height: 1.8;
    text-align: justify;
    font-size: 1.05rem;
    padding-bottom: 2rem;
    white-space: pre-wrap;
}

.bible-verse-num {
    color: var(--accent);
    font-weight: 600;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

/* --- Schedule Styles --- */
.schedule-item {
    background: var(--glass);
    border-left: 3px solid transparent;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.schedule-item.active {
    border-left-color: var(--accent);
    background: rgba(79, 172, 254, 0.1);
}

.schedule-time {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.schedule-name {
    font-size: 1rem;
}

.loading-text {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 2rem;
}

/* Scrollbar Style */
.modal-body::-webkit-scrollbar,
.bible-scroll-area::-webkit-scrollbar,
.schedule-scroll-area::-webkit-scrollbar {
    width: 5px;
}
.modal-body::-webkit-scrollbar-track,
.bible-scroll-area::-webkit-scrollbar-track,
.schedule-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}
.modal-body::-webkit-scrollbar-thumb,
.bible-scroll-area::-webkit-scrollbar-thumb,
.schedule-scroll-area::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* Mobile optimizations */
@media (max-height: 600px) {
    .art-wrapper { width: 180px; height: 180px; }
    main { gap: 1.5rem; }
    .play-btn { width: 65px; height: 65px; font-size: 1.5rem; }
    .modal-content { height: 90vh; padding: 1.5rem; }
}
