/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f5f7fa;
    min-height: 100vh;
}

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

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 2rem 0;
}

.screen.active {
    display: block;
}

/* Typography */
.title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.2;
}

.hook {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    margin-bottom: 2rem;
}

.intro {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.intro p {
    margin-bottom: 0.75rem;
}

.intro p:last-child {
    margin-bottom: 0;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: #3182ce;
    color: white;
}

.btn-primary:hover {
    background-color: #2c5282;
}

.btn-primary:focus {
    outline: 3px solid #63b3ed;
    outline-offset: 2px;
}

.btn-secondary {
    background-color: #718096;
    color: white;
    margin-bottom: 1rem;
}

.btn-secondary:hover {
    background-color: #4a5568;
}

.btn-secondary:focus {
    outline: 3px solid #a0aec0;
    outline-offset: 2px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: #3182ce;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 1.5rem;
}

/* Post Card */
.post-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    border-left: 4px solid #cbd5e0;
}

.post-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3748;
}

.post-content mark {
    background-color: #fef08a;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-weight: 500;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.option-btn {
    background: white;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.option-btn:hover {
    border-color: #3182ce;
    background-color: #ebf8ff;
}

.option-btn:focus {
    outline: 3px solid #63b3ed;
    outline-offset: 2px;
}

.option-btn.selected {
    border-color: #3182ce;
    background-color: #ebf8ff;
}

.option-btn.correct {
    border-color: #38a169;
    background-color: #f0fff4;
}

.option-btn.incorrect {
    border-color: #e53e3e;
    background-color: #fff5f5;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Feedback Panel */
.feedback-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.feedback-panel.hidden {
    display: none;
}

.feedback-result {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feedback-result.correct {
    color: #38a169;
}

.feedback-result.incorrect {
    color: #e53e3e;
}

.feedback-explanation {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feedback-explanation p {
    margin-bottom: 0.75rem;
}

.feedback-explanation p:last-child {
    margin-bottom: 0;
}

/* Results Screen */
.results-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    text-align: center;
}

.score-display {
    font-size: 2rem;
    font-weight: 700;
    color: #3182ce;
    text-align: center;
    margin-bottom: 2rem;
}

.results-message {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.results-message p {
    margin-bottom: 0.75rem;
}

.results-message p:last-child {
    margin-bottom: 0;
}

.recap-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

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

.pattern-item {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #3182ce;
}

.pattern-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.pattern-description {
    color: #4a5568;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.pattern-signal {
    color: #718096;
    font-size: 0.875rem;
    font-style: italic;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.share-message {
    background-color: #38a169;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
}

.share-message.hidden {
    display: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Tablet Styles */
@media (min-width: 640px) {
    .container {
        padding: 2rem;
    }

    .screen {
        padding: 3rem 0;
    }

    .title {
        font-size: 2.25rem;
    }

    .hook {
        font-size: 1.5rem;
    }

    .intro {
        padding: 2rem;
    }

    .post-card {
        padding: 2rem;
    }

    .feedback-panel {
        padding: 2rem;
    }

    .results-message {
        padding: 2rem;
    }

    .btn {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .results-actions {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }

    .results-actions .btn {
        width: auto;
        min-width: 200px;
    }

    .btn-secondary {
        margin-bottom: 0;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .container {
        padding: 2.5rem;
    }

    .title {
        font-size: 2.5rem;
    }

    .options-container {
        gap: 1rem;
    }

    .option-btn {
        padding: 1.25rem 1.5rem;
    }

    .post-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}
