/* Interview Coach - Bilingual Job Interview Practice */

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-elevated: #1a1a25;
    --border: #2a2a3a;
    --text: #e8e8ed;
    --text-muted: #8888a0;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', var(--font-body);
}

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

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

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem 2rem;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.back-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.25rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.lang-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 0.5rem 0 0;
    margin-bottom: 1rem;
}

.hero-icon {
    font-size: 3rem;
    margin-bottom: 0.25rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.what-youll-get {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.duration {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.75rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.select-btn {
    flex: 1;
    min-width: calc(33% - 0.5rem);
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.select-btn:hover {
    border-color: var(--primary);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

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

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

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

.btn:focus-visible {
    outline: 2px solid var(--primary-hover);
    outline-offset: 2px;
}

.select-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Interview Context */
.interview-context {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border-radius: 20px;
    display: inline-block;
    width: auto;
    margin-left: auto;
    margin-right: auto;
}

.interview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.interview-section > * {
    width: 100%;
}

.interview-section > .interview-context {
    width: auto;
}

/* Interview Header */
.interview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-quit {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
}

.btn-quit:hover {
    border-color: var(--error);
    color: var(--error);
}

.interview-header .progress-bar {
    flex: 1;
    margin-bottom: 0;
}

.interview-header .progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
    width: 20%;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Question Card */
.question-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
}

.question-text {
    font-size: 1.25rem;
    line-height: 1.7;
    min-height: 3rem;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Answer Input */
.answer-card textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.answer-card textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.answer-card textarea::placeholder {
    color: var(--text-muted);
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.char-count.near-limit {
    color: var(--warning);
}

.char-count.at-limit {
    color: var(--error);
}

/* Feedback Card */
.feedback-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.score-display {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 4px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.score-circle.large {
    width: 120px;
    height: 120px;
    font-size: 1.75rem;
}

.score-circle.good { border-color: var(--success); }
.score-circle.medium { border-color: var(--warning); }
.score-circle.low { border-color: var(--error); }

.feedback-section {
    margin-bottom: 1.5rem;
}

.feedback-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.feedback-section ul {
    list-style: none;
    padding-left: 0;
}

.feedback-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feedback-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.feedback-strengths li::before {
    content: '✓';
    color: var(--success);
}

.feedback-improvements li::before {
    content: '→';
    color: var(--warning);
}

.feedback-section p {
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

/* Summary Section */
.summary-section .card {
    text-align: center;
}

.final-score {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.summary-text {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: left;
    white-space: pre-wrap;
}

.score-history h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.scores-section {
    margin-bottom: 2rem;
}

.scores-section h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.score-bars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.score-bar {
    width: 40px;
    height: 100px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-bar-fill {
    width: 100%;
    background: var(--primary);
    transition: height 0.5s ease;
}

.score-bar-label {
    font-size: 0.75rem;
    padding: 0.25rem;
    color: var(--text-muted);
}

.score-bar-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.15rem;
}

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

.site-footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--primary);
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 0.75rem 1rem 2rem;
    }

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

    .what-youll-get {
        font-size: 0.8rem;
    }

    .card {
        padding: 1.5rem;
    }

    .select-btn {
        min-width: calc(50% - 0.5rem);
    }

    .top-bar {
        padding: 0.75rem 1rem;
    }

    .back-link {
        font-size: 0.8rem;
    }

    .lang-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }
    
    .progress-fill,
    .score-bar-fill,
    .btn,
    .select-btn,
    .lang-btn {
        transition: none;
    }
}
