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

:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #141416;
    --bg-card: #1a1a1d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a5;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --border: #2a2a2e;
    --success: #22c55e;
    --error: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.card > h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Upload Groups */
.upload-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.upload-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
}

.upload-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.required {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--error);
    text-transform: uppercase;
}

.optional {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* File Upload Section */
.upload-section {
    margin-bottom: 1rem;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
}

.file-upload-label:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.file-upload-label.drag-over {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.file-upload-label.has-file {
    border-color: var(--success);
    border-style: solid;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    font-weight: 600;
    color: var(--text-primary);
}

.upload-subtext {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.file-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    text-align: center;
}

.file-status.success {
    color: var(--success);
}

.file-status.error {
    color: var(--error);
}

.file-status.loading {
    color: var(--accent);
}

/* Textarea */
textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

textarea::placeholder {
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: #16a34a;
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Interview Card */
.interview-card {
    text-align: center;
}

.interview-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.interview-header h2 {
    margin: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.interview-instructions {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.interview-instructions p {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0;
}

/* Interview Tips */
.interview-tips {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

.interview-tips h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.interview-tips ul {
    list-style: none;
}

.interview-tips li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
}

.interview-tips li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.interview-tips li strong {
    color: var(--text-primary);
}

.interview-actions {
    display: flex;
    justify-content: center;
}

/* Footer */
footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.privacy {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Hide widget until interview starts */
#widget-container {
    display: none;
}

#widget-container.active elevenlabs-convai {
    display: block;
}

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

/* Mode Toggle Button (upload/text switch) */
.mode-toggle {
    display: inline-block;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-toggle:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: var(--bg-card);
}

/* Option Group (Interviewer Type, Language) */
.option-group {
    margin-bottom: 1.5rem;
}

.option-group h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Option Button (pill style like Continue button) */
.option-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 120px;
}

.option-btn:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

.option-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
}

.option-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-top: 0.25rem;
}

.option-btn.selected .option-title {
    color: white;
}

.option-btn.selected .option-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Interviewer Type specific colors */
.option-btn[data-value="Hiring Manager"].selected {
    background: #f59e0b;
    border-color: #f59e0b;
}

.option-btn[data-value="Hiring Manager"]:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.option-btn[data-value="Technical"].selected {
    background: #ef4444;
    border-color: #ef4444;
}

.option-btn[data-value="Technical"]:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Interviewer Voice colors */
.option-btn[data-value="Hatake Kohei"].selected {
    background: #3b82f6;
    border-color: #3b82f6;
}

.option-btn[data-value="Hatake Kohei"]:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.option-btn[data-value="Ai Matsuzaki"].selected {
    background: #ec4899;
    border-color: #ec4899;
}

.option-btn[data-value="Ai Matsuzaki"]:hover {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
}

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

    header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
    }

    .file-upload-label {
        padding: 1.25rem;
    }

    .interview-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Stack option buttons on mobile */
    .option-buttons {
        flex-direction: column;
    }

    .option-btn {
        min-width: auto;
    }
}

/* Accessibility: Focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

textarea:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.file-upload-label:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
}

/* Accessibility: Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Accessibility: Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .pulse {
        animation: none;
    }

    .step.active {
        animation: none;
    }
}
