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

:root {
    --primary-color: #4a7c59;
    --primary-hover: #3d6849;
    --secondary-color: #7a8a8e;
    --success-color: #4a7c59;
    --danger-color: #c44;
    --warning-color: #d4a537;
    --page-bg: #fafaf8;
    --light-bg: #f3f4f2;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-header: #1a1a1a;
    --border-color: #e2e2e0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --input-bg: #ffffff;
    --chat-agent-bg: #f3f4f2;
    --chat-user-bg: #e8ede9;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-color: #6b9e7a;
    --primary-hover: #5a8a69;
    --secondary-color: #8a9a9e;
    --page-bg: #171717;
    --light-bg: #1e1e1e;
    --card-bg: #222;
    --text-primary: #ddd;
    --text-secondary: #999;
    --text-header: #ddd;
    --border-color: #333;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    --input-bg: #2a2a2a;
    --chat-agent-bg: #1e1e1e;
    --chat-user-bg: #252b26;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--page-bg);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    color: var(--text-header);
    margin-bottom: 30px;
    padding: 20px;
    position: relative;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: var(--text-secondary);
}

/* Dark Mode Toggle */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-primary);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
}

.theme-toggle .icon {
    font-size: 1.2em;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s, background-color 0.3s;
    background-color: var(--input-bg);
    color: var(--text-primary);
}

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

select.form-control {
    cursor: pointer;
}

select.form-control option {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.help-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

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

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

.btn-secondary:hover {
    background: #5a6268;
}

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Info Section */
.info-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

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

/* Interview Screen */
.interview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.session-info {
    display: flex;
    gap: 15px;
}

.session-info span {
    padding: 6px 12px;
    background: var(--light-bg);
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
}

/* Chat Container */
.chat-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
}

/* Mobile-friendly interview screen layout */
#interview-screen {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
}

#interview-screen.active {
    display: flex;
}

#interview-screen .chat-container {
    flex: 1;
    min-height: 200px;
    height: auto;
}

#interview-screen .input-container {
    flex-shrink: 0;
}

#interview-screen .progress-section {
    flex-shrink: 0;
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 80%;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message.agent {
    background: var(--chat-agent-bg);
    margin-right: auto;
}

.message.user {
    background: var(--chat-user-bg);
    margin-left: auto;
}

.message-label {
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.message-content {
    line-height: 1.5;
}

/* Input Container */
.input-container {
    display: flex;
    gap: 10px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.input-container textarea {
    flex: 1;
    resize: none;
}

/* Progress Section */
.progress-section {
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.progress-info {
    display: flex;
    justify-content: space-around;
    font-size: 0.95em;
}

/* Results Screen */
.results-content {
    margin: 20px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.stat-label {
    font-weight: 600;
}

.feedback-section {
    margin-top: 20px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: block;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.question-item {
    padding: 15px;
    margin-bottom: 10px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.question-category {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 5px;
}

.question-text {
    font-size: 1em;
    line-height: 1.5;
}

.tip-item {
    padding: 15px;
    margin-bottom: 10px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
}

[data-theme="dark"] .tip-item {
    background: #2a2a1a;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(74, 144, 226, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

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

/* ==============================================
   RESPONSIVE DESIGN - Mobile First Approach
   ============================================== */

/* Touch-friendly defaults */
button,
.btn,
.type-card,
.interviewer-card,
.language-card,
.mode-card,
.chip {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Ensure minimum touch target size (44px recommended by Apple/Google) */
.btn,
.chip,
.type-card,
.interviewer-card,
.language-card,
.mode-card {
    min-height: 44px;
}

/* Prevent iOS zoom on input focus (must be 16px or larger) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    font-size: 16px;
}

/* Smooth scrolling for touch devices */
.scroll-container {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Fix for iOS input in fixed containers */
@supports (-webkit-touch-callout: none) {
    .input-container {
        position: relative;
        z-index: 1;
    }
}

/* Safe area for notched phones (iPhone X+) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* =============================================
   MOBILE PHONES (up to 480px)
   ============================================= */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
    }

    header {
        padding: 15px 10px;
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 1.4em;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .theme-toggle {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.8em;
    }

    /* Cards - Full width stacked */
    .interview-type-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .type-card {
        padding: 15px 12px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 12px;
    }

    .type-card .type-icon {
        font-size: 1.8em;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .type-card .type-name {
        font-size: 1em;
        margin-bottom: 2px;
    }

    .type-card .type-desc {
        font-size: 0.75em;
    }

    /* Interviewer cards */
    .interviewer-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .interviewer-card {
        padding: 15px;
    }

    .interviewer-avatar {
        font-size: 2em;
    }

    .interviewer-quote {
        font-size: 0.8em;
        padding: 8px;
    }

    /* Language cards - horizontal scroll or stacked */
    .language-grid {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .language-card {
        flex-shrink: 0;
        padding: 20px 25px;
        min-width: 100px;
    }

    .language-icon {
        font-size: 2em;
    }

    .language-name {
        font-size: 0.9em;
    }

    /* Mode cards */
    .mode-grid {
        flex-direction: column;
        gap: 10px;
    }

    .mode-card {
        width: 100%;
        padding: 18px 20px;
    }

    .mode-icon {
        font-size: 2em;
    }

    /* Chips */
    .suggestion-chips {
        flex-direction: column;
    }

    .chip {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.9em;
    }

    /* Section content */
    .section-number {
        font-size: 2em;
    }

    .section-content h2 {
        font-size: 1.2em;
        margin-bottom: 20px;
    }

    .question-section {
        min-height: auto;
        padding: 40px 15px;
    }

    /* Form elements */
    .form-control {
        padding: 14px;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    textarea.form-control {
        min-height: 100px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 1em;
        width: 100%;
    }

    .btn-large {
        padding: 16px 24px;
        font-size: 1.1em;
    }

    /* Chat interface */
    .chat-container {
        height: 300px;
        padding: 15px;
    }

    .message {
        max-width: 90%;
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .input-container {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .input-container .btn {
        width: 100%;
    }

    /* Interview header */
    .interview-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .session-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .session-info span {
        font-size: 0.8em;
        padding: 4px 10px;
    }

    /* Progress section */
    .progress-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    /* Section checkboxes */
    .checkbox-group {
        padding: 12px;
    }

    .section-option {
        padding: 14px 10px;
    }

    .section-title {
        font-size: 0.9em;
    }

    .section-desc {
        font-size: 0.75em;
    }

    /* Final section */
    .section-final {
        padding: 25px 15px;
    }

    .ready-summary {
        font-size: 0.95em;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
        max-height: 85vh;
    }
}

/* =============================================
   LARGE PHONES / SMALL TABLETS (481px - 768px)
   ============================================= */
@media (min-width: 481px) and (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1em;
    }

    .theme-toggle {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    /* 2-column grid for type cards */
    .interview-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .type-card {
        padding: 18px 15px;
    }

    /* 2-column grid for interviewer cards */
    .interviewer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Horizontal language cards */
    .language-grid {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    .language-card {
        padding: 25px 30px;
    }

    /* Mode cards side by side */
    .mode-grid {
        flex-direction: row;
        justify-content: center;
    }

    .mode-card {
        flex: 1;
        max-width: 200px;
    }

    /* Chips 2 per row */
    .suggestion-chips {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .chip {
        width: 100%;
    }

    .section-content h2 {
        font-size: 1.4em;
    }

    .question-section {
        min-height: 60vh;
        padding: 50px 20px;
    }

    /* Chat */
    .input-container {
        flex-direction: row;
    }

    .input-container .btn {
        width: auto;
    }
}

/* =============================================
   TABLETS / iPad (769px - 1024px)
   ============================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 800px;
    }

    header h1 {
        font-size: 2.2em;
    }

    /* 3 columns for type cards on tablet */
    .interview-type-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    /* 3 columns for interviewer cards */
    .interviewer-grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .interviewer-card {
        padding: 20px;
    }

    /* Horizontal language cards */
    .language-grid {
        gap: 20px;
    }

    .language-card {
        padding: 28px 35px;
    }

    .question-section {
        min-height: 65vh;
        padding: 60px 30px;
    }

    .section-content h2 {
        font-size: 1.5em;
    }

    /* 2x2 chips grid */
    .suggestion-chips {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* =============================================
   LAPTOPS AND DESKTOPS (1025px+)
   ============================================= */
@media (min-width: 1025px) {
    .container {
        max-width: 900px;
    }

    /* 5 columns for type cards */
    .interview-type-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* 3 columns for interviewer */
    .interviewer-grid-3 {
        grid-template-columns: repeat(3, 1fr);
        max-width: 800px;
        margin: 0 auto;
    }

    .question-section {
        min-height: 70vh;
    }

    /* Horizontal chips */
    .suggestion-chips {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .chip {
        width: auto;
    }
}

/* =============================================
   LARGE DESKTOPS (1200px+)
   ============================================= */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
    }

    header h1 {
        font-size: 2.8em;
    }

    .section-content h2 {
        font-size: 1.8em;
    }
}

/* =============================================
   LANDSCAPE ORIENTATION (Mobile)
   ============================================= */
@media (max-height: 500px) and (orientation: landscape) {
    .question-section {
        min-height: auto;
        padding: 30px 20px;
    }

    header {
        margin-bottom: 15px;
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .section-number {
        font-size: 1.5em;
    }

    .interview-type-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .interviewer-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================
   HIGH DPI / RETINA DISPLAYS
   ============================================= */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .type-card,
    .interviewer-card,
    .language-card,
    .mode-card {
        border-width: 2px;
    }
}

/* =============================================
   REDUCED MOTION (Accessibility)
   ============================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-container {
        scroll-behavior: auto;
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {

    .theme-toggle,
    .scroll-progress-container,
    #end-btn,
    #send-btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .question-section {
        min-height: auto;
        page-break-inside: avoid;
    }
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.checkbox-group label:hover {
    background-color: rgba(74, 144, 226, 0.1);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

/* Section Options */
.section-option {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.section-option:hover {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

.section-option input[type="checkbox"] {
    margin-top: 2px;
}

.section-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.section-desc {
    font-size: 0.8em;
    color: var(--text-secondary);
}

/* Interviewer Selection Grid */
.interviewer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.interviewer-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
    .interviewer-grid {
        grid-template-columns: 1fr;
    }
    .interviewer-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Scenario Cards (Section 4) */
.scenario-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .scenario-cards {
        grid-template-columns: 1fr;
    }
}

.scenario-card {
    cursor: pointer;
    display: block;
}

.scenario-card input[type="checkbox"] {
    display: none;
}

.scenario-card-inner {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s ease;
}

.scenario-card:hover .scenario-card-inner {
    border-color: var(--primary-color);
}

.scenario-card input[type="checkbox"]:checked + .scenario-card-inner {
    border-color: var(--primary-color);
    background: rgba(74, 124, 89, 0.08);
}

[data-theme="dark"] .scenario-card input[type="checkbox"]:checked + .scenario-card-inner {
    background: rgba(74, 124, 89, 0.15);
}

.scenario-card-title {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.scenario-card-desc {
    font-size: 0.8em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.interviewer-card {
    background: var(--light-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.interviewer-card:hover {
    border-color: var(--primary-color);
}

.interviewer-card.selected {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

[data-theme="dark"] .interviewer-card.selected {
    background: var(--light-bg);
}

.interviewer-avatar {
    font-size: 3em;
    margin-bottom: 10px;
}

.interviewer-stars {
    color: #ffd700;
    font-size: 1.2em;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.interviewer-name {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.interviewer-trait {
    font-size: 0.9em;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.interviewer-quote {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.4;
    padding: 10px;
    background: var(--input-bg);
    border-radius: 8px;
}

/* Scenario Suggestions */
.scenario-suggestions {
    margin-top: 12px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.suggestions-label {
    display: block;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    color: var(--text-primary);
}

.chip:hover {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

.chip:active {
    transform: translateY(0);
}

.chip.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Wizard Slides */
.wizard-card {
    overflow: hidden;
    position: relative;
    padding-top: 50px;
}

.wizard-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.wizard-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.wizard-dots .dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 20px;
    height: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
    transition: background 0.4s;
}

.wizard-dots .dot:last-child::after {
    display: none;
}

.wizard-dots .dot.active {
    background: var(--primary-color);
    transform: scale(1.4);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.2);
}

.wizard-dots .dot.completed {
    background: var(--success-color);
}

.wizard-dots .dot.completed::after {
    background: var(--success-color);
}

.wizard-dots .dot:hover:not(.active) {
    transform: scale(1.2);
    background: var(--primary-color);
    opacity: 0.7;
}

.slides-container {
    position: relative;
    overflow: hidden;
}

.slides-container {
    position: relative;
    min-height: 400px;
    perspective: 1000px;
}

.slide {
    display: none;
    position: relative;
}

.slide.active {
    display: block;
    animation: rollIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Rolling out - content rolls up and fades into distance */
.slide.roll-out {
    display: block;
    animation: rollOut 0.6s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

/* Rolling in - content emerges from below with depth */
.slide.roll-in {
    display: block;
    animation: rollIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reverse - rolling back up */
.slide.roll-out-reverse {
    display: block;
    animation: rollOutReverse 0.6s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.slide.roll-in-reverse {
    display: block;
    animation: rollInReverse 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rollOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes rollIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes rollOutReverse {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes rollInReverse {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Staggered reveal for child elements */
.slide.active .type-card,
.slide.active .interviewer-card,
.slide.active .language-card,
.slide.active .mode-card {
    animation: revealItem 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.slide.active .type-card:nth-child(1),
.slide.active .interviewer-card:nth-child(1),
.slide.active .language-card:nth-child(1),
.slide.active .mode-card:nth-child(1) {
    animation-delay: 0.1s;
}

.slide.active .type-card:nth-child(2),
.slide.active .interviewer-card:nth-child(2),
.slide.active .language-card:nth-child(2),
.slide.active .mode-card:nth-child(2) {
    animation-delay: 0.15s;
}

.slide.active .type-card:nth-child(3),
.slide.active .interviewer-card:nth-child(3),
.slide.active .language-card:nth-child(3) {
    animation-delay: 0.2s;
}

.slide.active .type-card:nth-child(4),
.slide.active .interviewer-card:nth-child(4) {
    animation-delay: 0.25s;
}

.slide.active .type-card:nth-child(5) {
    animation-delay: 0.3s;
}

@keyframes revealItem {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Slide title reveal */
.slide.active h2 {
    animation: fadeIn 0.3s ease-in;
}

.slide h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 1.5em;
}

/* Interview Type Grid */
.interview-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.type-card {
    background: var(--light-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.type-card:hover {
    border-color: var(--primary-color);
}

.type-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.type-card.selected .type-desc {
    color: rgba(255, 255, 255, 0.8);
}

.type-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.type-card.disabled .type-desc {
    font-style: italic;
}

.type-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.type-name {
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 5px;
}

.type-desc {
    font-size: 0.8em;
    color: var(--text-secondary);
}

/* Language Grid */
.language-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.language-card {
    background: var(--light-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 140px;
}

.language-card:hover {
    border-color: var(--primary-color);
}

.language-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.language-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.language-name {
    font-weight: 700;
    font-size: 1.1em;
}

/* Mode Grid */
.mode-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.mode-card {
    background: var(--light-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 25px 35px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 180px;
}

.mode-card:hover {
    border-color: var(--primary-color);
}

.mode-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.mode-card.selected .mode-desc {
    color: rgba(255, 255, 255, 0.8);
}

.mode-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.mode-name {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.mode-desc {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.mode-rec {
    font-size: 0.75em;
    color: var(--primary-color);
    font-style: italic;
    margin-top: 6px;
}

/* Back Button */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 0.9em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.back-btn span {
    font-size: 1.2em;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1em;
    width: 100%;
    margin-top: 20px;
}

.continue-btn {
    margin-top: 15px;
    width: 100%;
}

/* =====================================================
   Continuous Scroll Layout
   ===================================================== */

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scroll-progress-bar {
    height: 100%;
    width: 20%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 0 3px 3px 0;
}

/* Scroll Container */
.scroll-container {
    scroll-behavior: smooth;
}

/* Question Sections */
.question-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
}

.question-section:last-child {
    min-height: 50vh;
}

.section-content {
    max-width: 800px;
    width: 100%;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.question-section.active .section-content,
.question-section.in-view .section-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Section Number Badge */
.section-number {
    display: inline-block;
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.4;
    margin-bottom: 10px;
}

.question-section.active .section-number,
.question-section.in-view .section-number {
    opacity: 0.5;
}

.section-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 1.6em;
    line-height: 1.3;
}

/* Final Section */
.section-final {
    text-align: center;
    padding: 40px;
    background: var(--light-bg);
    border-radius: 16px;
    border: 2px solid var(--border-color);
}

.section-final h2 {
    margin-bottom: 20px;
}

.ready-summary {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-bottom: 25px;
    line-height: 1.6;
}

.custom-focus-preview {
    margin-top: 15px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    font-style: italic;
    color: var(--text-primary);
    text-align: left;
    font-size: 0.95em;
    box-shadow: var(--shadow);
}

/* Staggered reveal animation for cards in active section */
.question-section.active .type-card,
.question-section.active .interviewer-card,
.question-section.active .language-card,
.question-section.active .mode-card,
.question-section.in-view .type-card,
.question-section.in-view .interviewer-card,
.question-section.in-view .language-card,
.question-section.in-view .mode-card {
    animation: revealCard 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.question-section.active .type-card:nth-child(1),
.question-section.in-view .type-card:nth-child(1) {
    animation-delay: 0.05s;
}

.question-section.active .type-card:nth-child(2),
.question-section.in-view .type-card:nth-child(2) {
    animation-delay: 0.1s;
}

.question-section.active .type-card:nth-child(3),
.question-section.in-view .type-card:nth-child(3) {
    animation-delay: 0.15s;
}

.question-section.active .type-card:nth-child(4),
.question-section.in-view .type-card:nth-child(4) {
    animation-delay: 0.2s;
}

.question-section.active .type-card:nth-child(5),
.question-section.in-view .type-card:nth-child(5) {
    animation-delay: 0.25s;
}

.question-section.active .interviewer-card:nth-child(1),
.question-section.in-view .interviewer-card:nth-child(1) {
    animation-delay: 0.05s;
}

.question-section.active .interviewer-card:nth-child(2),
.question-section.in-view .interviewer-card:nth-child(2) {
    animation-delay: 0.1s;
}

.question-section.active .interviewer-card:nth-child(3),
.question-section.in-view .interviewer-card:nth-child(3) {
    animation-delay: 0.15s;
}

.question-section.active .interviewer-card:nth-child(4),
.question-section.in-view .interviewer-card:nth-child(4) {
    animation-delay: 0.2s;
}

.question-section.active .language-card:nth-child(1),
.question-section.in-view .language-card:nth-child(1) {
    animation-delay: 0.05s;
}

.question-section.active .language-card:nth-child(2),
.question-section.in-view .language-card:nth-child(2) {
    animation-delay: 0.1s;
}

.question-section.active .language-card:nth-child(3),
.question-section.in-view .language-card:nth-child(3) {
    animation-delay: 0.15s;
}

.question-section.active .mode-card:nth-child(1),
.question-section.in-view .mode-card:nth-child(1) {
    animation-delay: 0.05s;
}

.question-section.active .mode-card:nth-child(2),
.question-section.in-view .mode-card:nth-child(2) {
    animation-delay: 0.1s;
}

@keyframes revealCard {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive adjustments for continuous scroll - handled in main responsive section above */