/* Cinematch Survey - Styles */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Landing Page */
.hero {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-description {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
}

.features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.feature {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Survey Container */
.survey-container {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    margin: 0 auto;
}

.survey-container h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.therapeutic-options {
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.therapeutic-options label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: normal;
    cursor: pointer;
}

.therapeutic-options input[type="checkbox"] {
    margin-right: 0.5rem;
}

.help-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #6d28d9;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Questions */
.question-container {
    min-height: 300px;
}

.question-text {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.options-container {
    display: grid;
    gap: 1rem;
}

.option-card {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-white);
}

.option-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    transform: translateX(5px);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.option-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.option-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Results */
.results-container {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.profile-summary {
    display: inline-block;
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    border-radius: 15px;
    text-align: left;
}

.archetype-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.confidence-score {
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* Recommendation Cards */
.movie-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.movie-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.movie-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.movie-poster {
    width: 150px;
    height: 225px;
    background: var(--bg-light);
    border-radius: 10px;
    object-fit: cover;
    position: relative;
}

.movie-info {
    flex: 1;
}

.movie-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.movie-year {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.movie-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.score-badge {
    padding: 0.25rem 0.75rem;
    background: var(--success-color);
    color: white;
    border-radius: 15px;
    font-weight: 600;
}

.movie-plot {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.movie-explanation {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: var(--text-secondary);
}

.feedback-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.feedback-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.feedback-btn:hover {
    border-color: var(--primary-color);
}

.feedback-btn.right {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

.feedback-btn.wrong {
    border-color: #ef4444;
    background: #ef4444;
    color: white;
}

/* Chat CTA */
.chat-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: 15px;
    margin: 3rem 0;
}

.chat-cta h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.chat-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Actions */
.actions {
    text-align: center;
    margin-top: 2rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .survey-container,
    .results-container {
        padding: 2rem 1.5rem;
    }

    .movie-card {
        grid-template-columns: 1fr;
    }

    .movie-poster {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .features {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .btn-large {
        width: 100%;
    }

    .question-text {
        font-size: 1.35rem;
    }
}
