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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

body:not(.landing-page) .container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Welcome Page */
.welcome-container {
    width: 100%;
    max-width: 600px;
}

.welcome-card {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.logo .subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.welcome-card h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.description {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.name-form {
    margin-top: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

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

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Quiz Pages */
.quiz-container {
    width: 100%;
    max-width: 800px;
    background: var(--bg-white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    margin: 2rem auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.user-greeting {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.instructions {
    color: var(--text-light);
    font-size: 1rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 5%;
}

/* Questions */
.questions-container {
    position: relative;
    min-height: 400px;
}

.question-card {
    display: none;
    animation: fadeIn 0.3s ease;
}

.question-card.active {
    display: block;
}

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

.question-number {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.question-text {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.4;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.option input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.question-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.question-nav button {
    flex: 1;
}

/* Lifestyle Quiz */
.lifestyle-form {
    text-align: left;
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bg-light);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.section-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-style: italic;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* Routine Lists */
.routine-container {
    margin-top: 1rem;
}

.routine-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 200px;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.routine-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: move;
    transition: all 0.3s ease;
    user-select: none;
}

.routine-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.routine-item.dragging {
    opacity: 0.5;
    border-color: var(--primary-color);
}

.drag-handle {
    margin-right: 1rem;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.form-actions {
    text-align: center;
    margin-top: 3rem;
}

/* Results Page */
.results-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
}

.results-card {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.stress-level-display {
    text-align: center;
    margin: 3rem 0;
}

.stress-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.stress-percentage {
    font-size: 3rem;
    font-weight: 700;
}

.stress-label {
    font-size: 1rem;
    opacity: 0.9;
}

.analysis-section {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.analysis-section h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.analysis-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.next-steps {
    margin-top: 3rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-light);
}

.next-steps h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.next-steps p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.next-steps .btn {
    margin: 0 0.5rem;
}

/* Report Page */
.report-container {
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    background: var(--bg-white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
}

.report-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bg-light);
}

.report-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.report-intro {
    color: var(--text-light);
    font-size: 1.1rem;
}

.report-content {
    margin-bottom: 3rem;
}

.report-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--bg-light);
}

.report-section:last-of-type {
    border-bottom: none;
}

.report-section h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-section p {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.routine-advice {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.report-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-light);
}

.closing-message {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-style: italic;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-overlay p {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .welcome-card,
    .quiz-container,
    .results-card,
    .report-container {
        padding: 2rem 1.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .quiz-header h1,
    .results-header h1,
    .report-header h1 {
        font-size: 1.8rem;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .stress-circle {
        width: 150px;
        height: 150px;
    }
    
    .stress-percentage {
        font-size: 2rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .question-nav {
        flex-direction: column;
    }
    
    .next-steps .btn {
        display: block;
        margin: 0.5rem 0;
    }
}

