/* Facebook Quiz - Mobile-First Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    line-height: 1.34;
    overflow-x: hidden;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hidden {
    display: none !important;
}

.container {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin: 0 auto;
}

/* Loading Screen */
.loading-content {
    text-align: center;
    color: #1877f2;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e4e6ea;
    border-top: 4px solid #1877f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quiz Header */
.quiz-header {
    text-align: center;
    margin-bottom: 24px;
}

.quiz-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1c1e21;
    margin-bottom: 8px;
}

.quiz-header p {
    font-size: 16px;
    color: #65676b;
    line-height: 1.5;
}

/* Quiz Info */
.quiz-info {
    background: #f7f8fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: #65676b;
}

.info-value {
    font-weight: 700;
    color: #1c1e21;
}

/* Friend Score Challenge */
.friend-score {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.friend-challenge h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.friend-challenge p {
    margin-bottom: 4px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 12px;
}

.btn:last-child {
    margin-bottom: 0;
}

.btn-primary {
    background-color: #1877f2;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #166fe5;
}

.btn-primary:disabled {
    background-color: #e4e6ea;
    color: #bcc0c4;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #e4e6ea;
    color: #1c1e21;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #d8dadf;
}

.btn-secondary:disabled {
    background-color: #f7f8fa;
    color: #bcc0c4;
    cursor: not-allowed;
}

.btn-share {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    color: white;
    font-size: 18px;
    padding: 16px 24px;
}

.btn-share:hover {
    background: linear-gradient(135deg, #166fe5, #1e88e5);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 32px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e4e6ea;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1877f2, #42a5f5);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #65676b;
    font-weight: 600;
}

/* Question Container */
.question-container {
    margin-bottom: 32px;
}

.question-container h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1c1e21;
    margin-bottom: 24px;
    line-height: 1.4;
}

/* Answer Options */
.answers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    background: #f7f8fa;
    border: 2px solid #e4e6ea;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    text-align: left;
}

.answer-option:hover {
    background: #e7f3ff;
    border-color: #1877f2;
}

.answer-option.selected {
    background: #e7f3ff;
    border-color: #1877f2;
    color: #1877f2;
    font-weight: 600;
}

.answer-option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.answer-option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Quiz Navigation */
.quiz-navigation {
    display: flex;
    gap: 12px;
}

.quiz-navigation .btn {
    margin-bottom: 0;
    flex: 1;
}

/* Results Screen */
.results-header {
    text-align: center;
    margin-bottom: 32px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.score-number {
    color: white;
    font-weight: 700;
    text-align: center;
}

.score-number span:first-child {
    font-size: 36px;
    display: block;
    line-height: 1;
}

.score-total {
    font-size: 18px;
    opacity: 0.8;
}

.results-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1c1e21;
    margin-bottom: 8px;
}

.results-header p {
    font-size: 16px;
    color: #65676b;
}

/* Results Details */
.results-details {
    background: #f7f8fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-label {
    font-weight: 600;
    color: #65676b;
}

.result-value {
    font-weight: 700;
    color: #1c1e21;
    font-size: 18px;
}

/* Share Section */
.share-section {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f7f8fa, #e7f3ff);
    border-radius: 12px;
    border: 1px solid #e4e6ea;
}

.share-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
    margin-bottom: 8px;
}

.share-section p {
    color: #65676b;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
        padding: 32px;
    }
    
    .quiz-header h1 {
        font-size: 28px;
    }
    
    .question-container h2 {
        font-size: 22px;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
    }
    
    .score-number span:first-child {
        font-size: 42px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 700px;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 767px) {
    .answer-option {
        padding: 20px 16px;
        font-size: 16px;
    }
    
    .btn {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .quiz-navigation {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 16px 0 0;
        margin: 24px -24px -24px;
        border-top: 1px solid #e4e6ea;
    }
}

/* Animation for screen transitions */
.screen {
    animation: fadeIn 0.3s ease-in-out;
}

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