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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    min-height: 600px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.menu-section {
    margin-bottom: 40px;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.menu-btn, .test-btn {
    padding: 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.menu-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.test-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.test-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #5a6268;
}

.problem-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.problem-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 5px solid #667eea;
}

.problem-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.problem-item h3 {
    color: #333;
    margin-bottom: 10px;
}

.test-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.test-info p {
    margin: 5px 0;
    font-size: 1.1em;
}

.proof-type-label {
    color: #667eea;
    font-weight: bold;
}

.problem-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
    min-height: 300px;
}

.problem-statement {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
}

.problem-statement h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.problem-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
}

.solution {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #28a745;
    display: none;
}

.solution.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.solution h3 {
    color: #28a745;
    margin-bottom: 15px;
}

.solution-text {
    font-size: 1.05em;
    line-height: 1.8;
    color: #333;
}

.solution-text p {
    margin-bottom: 15px;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.nav-btn {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

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

.nav-btn:not(:disabled):hover {
    transform: translateY(-2px);
}

.solution-btn {
    background: #28a745;
    color: white;
    flex-grow: 1;
}

.solution-btn:hover:not(:disabled) {
    background: #218838;
    box-shadow: 0 3px 15px rgba(40, 167, 69, 0.4);
}

.solution-btn.hide {
    background: #ffc107;
}

.solution-btn.hide:hover {
    background: #e0a800;
}

#prevBtn, #nextBtn {
    background: #667eea;
    color: white;
}

#prevBtn:hover:not(:disabled), #nextBtn:hover:not(:disabled) {
    background: #5568d3;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
}
