* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.theory-card, .practice-card, .test-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.theory-card h2, .practice-card h2, .test-card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.theory-card h3, .practice-card h3, .test-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.example-box {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
}

.example-box h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Температурная шкала */
.temp-scale {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.temp-positive {
    background: #ff6b6b;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
}

.temp-zero {
    background: #feca57;
    color: #333;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
}

.temp-negative {
    background: #48dbfb;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
}

/* Денежные примеры */
.money-example {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.money-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.money-item.positive {
    border-left: 4px solid #2ecc71;
}

.money-item.negative {
    border-left: 4px solid #e74c3c;
}

.money-item .icon {
    font-size: 1.5rem;
}

.money-item .number {
    font-weight: bold;
    font-size: 1.2rem;
    margin-left: auto;
}

.money-item.positive .number {
    color: #2ecc71;
}

.money-item.negative .number {
    color: #e74c3c;
}

/* Здание */
.building {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 20px 0;
}

.floor {
    background: #ddd;
    padding: 8px 15px;
    border-radius: 5px;
    min-width: 120px;
    text-align: center;
    font-weight: bold;
}

.floor.ground {
    background: #feca57;
    color: #333;
}

.floor.basement {
    background: #95a5a6;
    color: white;
}

/* Интерактивные элементы */
.practice-exercise {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
}

.practice-exercise h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.interactive-demo, .money-calculator, .floor-calculator {
    margin: 20px 0;
}

.temp-slider {
    margin: 20px 0;
}

.temp-slider input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    margin: 10px 0;
}

.temp-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.temp-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
}

.money-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.money-input label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.money-input input {
    border: none;
    text-align: right;
    font-weight: bold;
    color: #667eea;
    background: transparent;
}

.floor-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
}

.action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.result {
    margin: 15px 0;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    min-height: 20px;
}

.result.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Тест */
.test-question {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.test-question h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.options label:hover {
    background: #f8f9ff;
}

.options input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.test-results {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.test-results.hidden {
    display: none;
}

#scoreDisplay {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
}

#scoreDisplay.excellent {
    background: #d4edda;
    color: #155724;
}

#scoreDisplay.good {
    background: #fff3cd;
    color: #856404;
}

#scoreDisplay.poor {
    background: #f8d7da;
    color: #721c24;
}

#answersReview {
    margin: 20px 0;
}

.answer-item {
    padding: 10px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.answer-item.correct {
    background: #d4edda;
    border-left-color: #28a745;
}

.answer-item.incorrect {
    background: #f8d7da;
    border-left-color: #dc3545;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .theory-card, .practice-card, .test-card {
        padding: 20px;
    }
    
    .money-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .money-item .number {
        margin-left: 0;
    }
} 