/* Enable scrolling for this page */
body.echo-voice-page {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}

body.echo-voice-page #app {
    height: auto;
    min-height: 100vh;
}

/* =============================================================================
   Echo Voice Setup - Styles
   ============================================================================= */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #a78bfa;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #252540;
    --bg-hover: #2f2f4a;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #374151;
    --border-radius: 12px;
    
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Page Container */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.page-header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--accent);
}

.hidden {
    display: none !important;
}

/* Intro Card */
.intro-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
}

.intro-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.intro-card h2 {
    margin-bottom: 15px;
}

.intro-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quote {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--accent);
    font-size: 1.1rem;
    margin-top: 20px;
    padding: 15px;
    border-left: 3px solid var(--primary);
    text-align: left;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.feature-highlights {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.highlight-icon {
    font-size: 1.5rem;
}

/* Consent */
.consent-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
}

.consent-form {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
}

.consent-info h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.consent-info ul {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.consent-info li {
    margin-bottom: 8px;
}

.privacy-assurance {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

.privacy-assurance ul {
    margin-left: 20px;
    margin-bottom: 0;
}

.consent-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 25px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.consent-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

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

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

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

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card);
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-record {
    background: var(--danger);
    color: var(--text-primary);
    width: 180px;
}

.btn-record.recording {
    animation: pulse 1s infinite;
}

.btn-stop {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 2px solid var(--danger);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Progress Bar */
.progress-bar-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

#progress-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Prompts */
.prompts-container {
    display: grid;
    gap: 15px;
}

.prompt-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.prompt-card:hover {
    background: var(--bg-hover);
}

.prompt-card.completed {
    border-color: var(--success);
    opacity: 0.7;
}

.prompt-card.active {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.prompt-info {
    flex: 1;
}

.prompt-info h4 {
    margin-bottom: 5px;
}

.prompt-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.prompt-status {
    font-size: 1.5rem;
}

/* Recording UI */
.recording-ui {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 20px;
}

.recording-prompt {
    text-align: center;
    margin-bottom: 30px;
}

.prompt-instruction {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.prompt-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--accent);
    line-height: 1.5;
}

.recording-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Visualizer */
.recording-visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 60px;
}

.visualizer-bar {
    width: 8px;
    height: 20px;
    background: var(--primary);
    border-radius: 4px;
    transition: height 0.1s;
}

.recording-visualizer.active .visualizer-bar {
    animation: visualize 0.5s infinite;
}

.recording-visualizer.active .visualizer-bar:nth-child(1) { animation-delay: 0s; }
.recording-visualizer.active .visualizer-bar:nth-child(2) { animation-delay: 0.1s; }
.recording-visualizer.active .visualizer-bar:nth-child(3) { animation-delay: 0.2s; }
.recording-visualizer.active .visualizer-bar:nth-child(4) { animation-delay: 0.1s; }
.recording-visualizer.active .visualizer-bar:nth-child(5) { animation-delay: 0s; }

@keyframes visualize {
    0%, 100% { height: 20px; }
    50% { height: 50px; }
}

.recording-timer {
    font-size: 2rem;
    font-family: monospace;
    color: var(--text-primary);
}

/* Playback */
.playback-section {
    margin-top: 30px;
    text-align: center;
}

.playback-section audio {
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}

.playback-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Processing */
.processing-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.processing-progress {
    margin-top: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-secondary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-note {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Complete */
.complete-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 50px;
    text-align: center;
}

.complete-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.test-voice {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.test-voice p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

/* Settings */
.settings-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
}

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

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    margin-bottom: 5px;
}

.setting-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 450px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 15px;
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.modal-content .warning {
    color: var(--danger);
    font-weight: 500;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

/* Footer */
.page-footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .intro-card {
        padding: 25px;
    }
    
    .feature-highlights {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats {
        gap: 20px;
    }
    
    .setting-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
