.recommender-container {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.header-section {
    margin-bottom: 20px;
}

.form-sections-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 992px) {
    .form-sections-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* User Profile section spans full width */
    .form-sections-grid .form-section:first-child {
        grid-column: 1 / -1;
    }
}

/* Each column gets a subtle inner card */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--section-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 22px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Horizontal inner layout for the full-width User Profile section */
.form-section-inner-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 992px) {
    .form-section-inner-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Section header with coloured icon tile */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.year-inputs {
    display: flex;
    gap: 12px;
}

/* Pacing & Complexity selects stack vertically to prevent text truncation */
.pacing-complexity-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 576px) {
    .year-inputs {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .recommender-container {
        padding: 12px 6px;
    }

    .form-section {
        padding: 16px 14px;
    }
}

.recommender-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    align-items: stretch;
    width: 100%;
}

@media (max-width: 480px) {
    .recommender-actions-row {
        flex-direction: column;
        gap: 10px;
    }
}

#refresh-btn {
    background-color: #6b7280;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.25);
}

#refresh-btn:hover {
    background-color: #4b5563;
    box-shadow: 0 6px 16px rgba(75, 85, 99, 0.35);
}

/* Sparse profile warning banner */
.sparse-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.sparse-banner a {
    color: #fbbf24;
    transition: color 0.2s ease;
}

.sparse-banner a:hover {
    color: #f59e0b;
}

/* Empty State Preview */
.recommender-empty-state {
    position: relative;
    padding: 40px 20px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-preview-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    width: 100%;
    filter: blur(6px) opacity(0.25);
    pointer-events: none;
    user-select: none;
}

.dummy-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 250px;
    height: 180px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dummy-image {
    height: 90px;
    background: var(--border);
    border-radius: 8px;
}

.dummy-title {
    height: 16px;
    background: var(--border);
    border-radius: 4px;
    width: 70%;
}

.dummy-tags {
    display: flex;
    gap: 8px;
}

.dummy-tags span {
    height: 12px;
    background: var(--border);
    border-radius: 3px;
    width: 40px;
}

.empty-state-overlay {
    position: absolute;
    z-index: 2;
    text-align: center;
    max-width: 500px;
    padding: 30px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.empty-state-overlay h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state-overlay p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .empty-state-overlay {
        padding: 20px 14px;
        width: 92%;
    }

    .empty-state-overlay h2 {
        font-size: 1.3rem;
    }

    .empty-state-overlay p {
        font-size: 0.85rem;
    }

    .recommender-empty-state {
        min-height: 220px;
        padding: 20px 10px;
    }
}

/* Wizard Modal Overlay */
.wizard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wizard-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 35px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.wizard-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.wizard-close-btn:hover {
    color: var(--text-main);
}

/* Wizard screens transition */
.wizard-screen {
    display: none;
}

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

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

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

/* Choice Path Grid */
.wizard-path-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 576px) {
    .wizard-path-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.wizard-path-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--text-main);
}

.wizard-path-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.1);
}

.path-icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.wizard-path-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.15rem;
    font-weight: 700;
}

.wizard-path-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Carousel Card Style */
.taste-card {
    max-width: 320px;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.taste-card-image-wrapper {
    height: 180px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
    box-sizing: border-box;
}

.taste-card-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.taste-card-info {
    padding: 18px;
    text-align: center;
}

.taste-card-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.game-mechanics-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.game-mechanics-tags span {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 20px;
    color: var(--text-muted);
}

/* Carousel Actions */
.taste-test-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.btn-rate {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.btn-rate.thumbs-up:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--success);
    color: var(--success);
}

.btn-rate.thumbs-down:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-rate.skip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* Custom Progress Bar */
.progress-bar-wrapper {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Personality Questions Option Cards */
.personality-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.personality-option-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.personality-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.personality-option-card:hover .option-content {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.personality-option-card input[type="radio"]:checked+.option-content {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.15);
}

.option-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.option-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.option-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

@media (max-width: 576px) {
    .wizard-modal {
        padding: 10px;
    }

    .wizard-modal-content {
        padding: 24px 16px;
        border-radius: 16px;
        max-height: 95vh;
    }

    .wizard-close-btn {
        top: 10px;
        right: 12px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .wizard-path-card {
        padding: 18px 14px;
    }

    .taste-card {
        max-width: 100%;
        width: 280px;
    }

    .taste-card-image-wrapper {
        height: 140px;
    }

    .taste-test-actions {
        gap: 8px;
        flex-wrap: wrap;
    }

    .btn-rate {
        padding: 10px 12px;
        font-size: 0.82rem;
        min-height: 44px;
        flex: 1 1 auto;
    }

    .personality-options-grid {
        gap: 8px;
    }

    .option-content {
        padding: 12px 14px;
        gap: 12px;
        min-height: 48px;
    }

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

    .option-title {
        font-size: 0.9rem;
    }

    .option-desc {
        font-size: 0.78rem;
    }
}

/* ==========================================
   WIZARD WRITE-IN & AUTOCOMPLETE STYLES
   ========================================== */
.wizard-writein-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.wizard-writein-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.wizard-writein-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.optional-badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.wizard-writein-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 36px 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wizard-writein-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.wizard-writein-input.locked {
    border-color: var(--success, #10b981);
    background: rgba(16, 185, 129, 0.06);
}

.autocomplete-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s ease;
}

.autocomplete-clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: var(--card-bg, #1a1c23);
    border: 1px solid var(--border);
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
    animation: fadeIn 0.15s ease-in-out;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.12s ease, color 0.12s ease;
}

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

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: rgba(124, 58, 237, 0.18);
    color: var(--primary, #a78bfa);
}

.autocomplete-item mark {
    background: transparent;
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.taste-test-writein-section {
    margin-top: 15px;
    margin-bottom: 20px;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    animation: fadeIn 0.3s ease;
}