/**
 * Voices of Koragajja - Spotify-Inspired Dark Theme
 * Mobile-first, desktop-optimized design
 */

:root {
    --bg-primary: #121212;
    --bg-secondary: #181818;
    --bg-elevated: #282828;
    --bg-highlight: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-subdued: #6a6a6a;
    --accent-primary: #1db954;
    --accent-hover: #1ed760;
    --accent-secondary: #ff6b35;
    --border-subtle: #282828;
    --whatsapp: #25d366;
    --whatsapp-hover: #20ba59;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    background: linear-gradient(180deg, #1f1f1f 0%, var(--bg-primary) 100%);
    padding: 48px 0 32px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

header .container {
    text-align: center;
}

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: 50%;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

header p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Navigation */
nav {
    background: var(--bg-secondary);
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 8px;
    display: flex;
    gap: 24px;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
    letter-spacing: 0.02em;
}

nav a:hover {
    color: var(--text-primary);
}

/* WhatsApp CTA */
.whatsapp-cta {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.whatsapp-cta a {
    background: #1ea952;
    color: #000000;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 8px;
    letter-spacing: 0.02em;
    transition: all 0.2s;
    display: inline-block;
}

.whatsapp-cta a:hover {
    background: var(--whatsapp);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.cta-note {
    font-size: 0.85rem;
    color: var(--text-subdued);
    text-align: center;
    max-width: 320px;
}

/* Filters */
.filters {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 32px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.filter-group select {
    padding: 10px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 160px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.filter-group select:hover {
    background: var(--bg-highlight);
    border-color: var(--text-subdued);
}

.filter-group select:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-color: var(--accent-primary);
}

/* Audio List */
.audio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 48px;
}

/* Audio Card */
.audio-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.audio-card:hover {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
}

/* Desktop: compact horizontal layout */
@media (min-width: 768px) {
    .audio-card {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        padding: 12px 20px;
        min-height: 64px;
    }

    .audio-header {
        flex: 1;
        min-width: 0;
    }

    .audio-player {
        flex: 0 0 280px;
    }

    .audio-actions {
        flex: 0 0 auto;
        flex-direction: row;
    }
}

.audio-header {
    margin-bottom: 16px;
}

.audio-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tag,
.language-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.language-tag {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-subtle);
}

.tag {
    background: transparent;
    color: var(--text-subdued);
    border: none;
}

/* Audio Player */
.audio-player {
    margin: 16px 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

audio {
    width: 100%;
    height: 40px;
    outline: none;
    border-radius: 6px;
}

audio::-webkit-media-controls-panel {
    background-color: var(--bg-elevated);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-pause-button {
    background-color: var(--accent-primary);
    border-radius: 50%;
}

audio::-webkit-media-controls-timeline {
    background-color: var(--bg-highlight);
    border-radius: 4px;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: var(--text-secondary);
}

/* Actions */
.audio-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    align-items: center;
}

/* Pray Button */
.btn-pray {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: all 0.15s;
}

.btn-pray .pray-icon {
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-pray:hover .pray-icon {
    transform: scale(1.15);
}

.btn-pray:active .pray-icon {
    transform: scale(0.9);
}

.btn-pray .pray-count {
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 16px;
    color: var(--text-subdued);
}

.btn-pray.prayed .pray-count {
    color: var(--accent-primary);
}

.btn-pray:disabled {
    cursor: default;
}

/* Share Button */
.btn-share {
    display: flex;
    align-items: center;
    padding: 4px;
    color: var(--text-subdued);
    text-decoration: none;
    transition: all 0.15s;
}

.btn-share:hover {
    color: var(--text-secondary);
}

.btn-share svg {
    width: 18px;
    height: 18px;
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .audio-actions {
        gap: 12px;
        margin-top: 0;
    }

    .btn-pray .pray-icon {
        font-size: 1rem;
    }

    .btn-pray .pray-count {
        font-size: 0.75rem;
    }

    .btn-share svg {
        width: 16px;
        height: 16px;
    }
}

/* Content Page (About) */
.content-page {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 12px;
    line-height: 1.8;
    margin-bottom: 48px;
}

.content-page h2 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.content-page h3 {
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 600;
}

.content-page p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.content-page ul {
    margin-left: 24px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.content-page li {
    margin-bottom: 10px;
}

.content-page hr {
    margin: 32px 0;
    border: none;
    border-top: 1px solid var(--border-subtle);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 12px;
}

.empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.95rem;
    color: var(--text-subdued);
}

/* Footer */
footer {
    margin-top: 64px;
    padding: 32px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-subdued);
    line-height: 1.8;
}

footer p {
    margin-bottom: 8px;
}

footer strong {
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    header h1 {
        font-size: 1.8rem;
    }

    header {
        padding: 32px 0 24px;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group label {
        font-size: 0.85rem;
    }

    .filter-group select {
        width: 100%;
    }

    .audio-card {
        padding: 16px;
    }

    .audio-header {
        margin-bottom: 12px;
    }

    .audio-title {
        white-space: normal;
        font-size: 1rem;
    }

    .audio-player {
        margin: 12px 0;
    }

    .content-page {
        padding: 24px;
    }

    .content-page h2 {
        font-size: 1.6rem;
    }

    .content-page h3 {
        font-size: 1.2rem;
    }
}

@media (min-width: 768px) {
    header h1 {
        font-size: 3rem;
    }

    .container {
        padding: 0 24px;
    }

    nav {
        padding: 16px 24px;
    }

    .filters {
        padding: 24px;
    }

    .audio-player {
        margin: 0;
    }

    .audio-header {
        margin-bottom: 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
