/* Talk Coastguard Audio Guide - Styles */

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

:root {
    --primary: #c8102e;      /* Coastguard red */
    --primary-dark: #a00d25;
    --secondary: #1d3c6e;    /* Navy blue */
    --accent: #f39c12;       /* Orange/gold */
    --accent-hover: #d68910;
    --success: #27ae60;
    --warning: #f39c12;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

/* Navigation */
nav {
    background: var(--primary);
    padding: 1rem 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.8;
}

/* Main content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 2rem 0 3rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero .description {
    color: var(--text-light);
}

/* Controls section */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.voice-select {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.voice-select label {
    font-weight: 500;
    color: var(--text);
}

.voice-select select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.voice-select select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Status message */
.status {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.status.info {
    background: #e8f4fd;
    color: #1a5276;
}

.status.success {
    background: #d4edda;
    color: #155724;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
}

.status.hidden {
    display: none;
}

/* Progress bar */
.progress-container {
    background: var(--border);
    border-radius: 8px;
    height: 24px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.progress-container.hidden {
    display: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 8px;
    transition: width 0.3s ease;
}

#progressText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: var(--text);
    font-size: 0.875rem;
}

/* Combined audio player */
.audio-player {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    text-align: center;
}

.audio-player.hidden {
    display: none;
}

.audio-player h2 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.audio-player audio {
    width: 100%;
    margin-bottom: 1rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    background: var(--success);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    background: #229954;
}

/* Script sections */
.script-sections h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-intro {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.script-section {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary) 0%, #152c54 100%);
    color: white;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.section-controls {
    display: flex;
    gap: 0.5rem;
}

.section-controls button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.section-controls button:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
}

.section-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.section-controls button.hidden {
    display: none;
}

.section-controls button.done {
    background: var(--success);
}

.section-content {
    padding: 1.5rem;
}

.section-content p {
    margin-bottom: 1rem;
}

.section-content p:last-child {
    margin-bottom: 0;
}

.section-content strong {
    color: var(--primary);
}

.section-content em {
    color: var(--text-light);
}

.section-audio {
    display: none;
}

/* Info box */
.info-box {
    background: linear-gradient(135deg, #fef3e2 0%, #fdecd2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border-left: 4px solid var(--accent);
}

.info-box h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.info-box ul {
    list-style: none;
    margin-left: 1rem;
}

.info-box li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.info-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 600px) {
    main {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .controls {
        flex-direction: column;
        gap: 1rem;
    }

    .voice-select {
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
