/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #F5F5F7;
    color: #1d1d1f;
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Container principal */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background: #F5F5F7;
}

/* Main content */
.app-main {
    width: 100%;
}

/* Quiz Container */
.quiz-container {
    background: #F5F5F7;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    max-width: 100%;
    margin: 0;
}

/* Apple Logo */
.apple-logo {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* Progress Section */
.progress-section {
    margin-bottom: 30px;
}

.progress-bar {
    overflow: hidden; 
    position: relative; 
    border-radius: 9999px; 
    width: 100%; 
    height: 0.4rem; 
}

.gray-bar-progress {
    display: block; 
    width: 100%; 
    height: 100%; 
    background-color: #1B1B1D; 
}

.progress-bar-blue {
    display: block; 
    position: absolute; 
    top: 0; 
    left: 0; 
    z-index: 10; 
    width: 0; 
    height: 100%; 
    background-color: #0171E3; 
    transition: width 0.3s ease;
}

/* Question Section */
.question-section {
    margin-bottom: 30px;
    text-align: left;
}

.question-title {
    font-size: 20px;
    font-weight: 500;
    color: #1B1B1D;
    line-height: 1.3;
    margin-bottom: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.question-highlight {
    color: #636368;
}

/* Options Grid - Cards minimalistas estilo Apple - SEMPRE 2x2 */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
    justify-items: start;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.option-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-align: left;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: 100px;
    justify-content: flex-start;
    width: 100%;
    max-width: 300px;
}

.option-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #007aff;
}

.option-card.selected {
    border-color: #007aff;
    background: #f0f8ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.option-card.correct {
    border-color: #34c759;
    background: #f0fdf4;
}

.option-card.incorrect {
    border-color: #ff3b30;
    background: #fff5f5;
}

.option-card.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Card Icon */
.card-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

/* Card Text */
.card-text {
    font-size: 1rem;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.4;
    text-align: left;
}

/* Texto normal - sem cores especiais */

/* Input Container */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.input-description {
    font-size: 0.9rem;
    color: #86868b;
    line-height: 1.4;
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #d1d1d6;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: white;
    color: #1d1d1f;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.confirm-button {
    width: 100%;
    padding: 16px 32px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-button:hover {
    background: #0056cc;
    transform: translateY(-1px);
}

.confirm-button:active {
    transform: translateY(0);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.action-btn.primary {
    background: #007aff;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.action-btn.primary:hover:not(:disabled) {
    background: #0056cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.action-btn.secondary {
    background: #f2f2f7;
    color: #1d1d1f;
    border: 1px solid #d1d1d6;
}

.action-btn.secondary:hover {
    background: #e5e5ea;
    transform: translateY(-1px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Container */
.results-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.results-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 30px;
}

.results-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5ea;
}

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

.summary-label {
    font-weight: 600;
    color: #86868b;
}

.summary-value {
    font-weight: 700;
    color: #1d1d1f;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.quiz-container, .results-container {
    animation: fadeIn 0.5s ease-out;
}

.question-section {
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.question-section.slide-out {
    animation: slideOut 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.question-section.slide-in {
    animation: slideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Feedback visual */
.feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.feedback.correct {
    background: #34c759;
}

.feedback.incorrect {
    background: #ff3b30;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estados de loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animação do spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast container */
.toast-container {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

/* Responsive Design - Mantém 2x2 sempre */
@media (max-width: 768px) {
    .app-container {
        padding: 16px;
    }
    
    .quiz-container, .results-container {
        padding: 0;
        border-radius: 0;
    }
    
    .question-title {
        font-size: 1.3rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .option-card {
        padding: 16px;
        min-height: 90px;
        max-width: 100%;
    }
    
    .card-icon {
        font-size: 1.2rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 12px;
    }
    
    .question-title {
        font-size: 1.2rem;
    }
    
    .option-card {
        padding: 14px;
        min-height: 80px;
    }
    
    .card-icon {
        font-size: 1.1rem;
    }
    
    .card-text {
        font-size: 0.85rem;
    }
    
    /* Mantém 2x2 mesmo em mobile pequeno */
    .options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}