/* File: static/css/main.css */
/* Main stylesheet for Friday Sermon User Portal */
/* Version: 1.2.0 */
/* Last Modified: 2026-01-31 */
/* Change: Expanded with shared component classes and new CSS variables */

:root {
    --primary: #1a5f3c;
    --primary-dark: #0d4a2b;
    --primary-light: #2e7d32;
    --secondary: #607D8B;
    --danger: #e53935;
    --warning: #ff9800;
    --success: #4CAF50;
    --surface: #ffffff;
    --background: #f8f9fa;
    --background-dark: #0a0a0a;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border: #dee2e6;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Landing Page */
.landing-container {
    max-width: 960px;
    margin-inline: auto;
    padding-inline: 1rem;
    padding-block: 2rem;
}

.landing-header {
    text-align: center;
    margin-block-end: 3rem;
}

.landing-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-block-end: 0.5rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-card h3 {
    color: var(--primary);
    margin-block-end: 0.5rem;
}

/* Language Selection */
.language-selection-container {
    max-width: 600px;
    margin-inline: auto;
    padding: 2rem 1rem;
    text-align: center;
}

.language-selection-container h1 {
    color: var(--primary);
    margin-block-end: 2rem;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.language-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.language-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.language-endonym {
    font-size: 1.5rem;
    font-weight: 600;
}

.language-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-block-start: 0.25rem;
}

/* Player */
.player-container {
    min-height: 100vh;
    background: var(--background-dark);
    color: white;
    display: flex;
    flex-direction: column;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.8;
}

.back-button:hover {
    opacity: 1;
}

.language-badge {
    background: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
}

.player-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.subtitle-display {
    text-align: center;
    margin-block-end: 3rem;
}

#current-subtitle {
    font-size: 1.5rem;
    line-height: 1.8;
    opacity: 0.9;
}

.audio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.play-pause-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.play-pause-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.volume-control input[type="range"] {
    width: 100px;
    accent-color: var(--primary-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: #e8f5e9;
}

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

.btn-secondary:hover {
    background: var(--background);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c62828;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    background: #f5f5f5;
}

.btn-outline-white {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-hero {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: #e8f5e9;
    color: var(--primary);
}

.badge-danger {
    background: #ffebee;
    color: var(--danger);
}

.badge-warning {
    background: #fff3e0;
    color: var(--warning);
}

.badge-info {
    background: #e3f2fd;
    color: #1565c0;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--danger);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.see-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* Utility classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 430px) {
    .language-grid {
        grid-template-columns: 1fr;
    }

    .landing-header h1 {
        font-size: 1.75rem;
    }

    #current-subtitle {
        font-size: 1.25rem;
    }
}
