/* ===== LESSON.CSS - Gemeinsame Styles für Lektionsseiten (Klassen 5-13) ===== */

/* === BOXES === */
.intro-box {
    background: linear-gradient(135deg, #7c8de8 0%, #8b67b5 100%);
    color: white;
    padding: 35px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.2);
}

.intro-box h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.definition-box {
    background: linear-gradient(135deg, #f8f9ff 0%, #fdf8ff 100%);
    border: 2px solid #8b9fe8;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.example-box {
    background: #fff9e6;
    border-left: 5px solid #ffb347;
    padding: 25px;
    margin: 25px 0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.example-box strong {
    color: #e67700;
    font-weight: 600;
}

/* === FORMULAS === */
.formula {
    background: #fafbff;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.3em;
    text-align: center;
    margin: 20px 0;
    border: 2px solid #d0d5e8;
    font-family: 'Courier New', monospace;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    color: #2c3e50;
}

/* === GRIDS === */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.property-card {
    background: #fafbff;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #d5daf0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    border-color: #8b9fe8;
}

.property-card h3 {
    color: #6b5b95;
    margin-bottom: 15px;
    font-weight: 600;
}

.function-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.function-card {
    background: #fafbff;
    padding: 28px;
    border-radius: 14px;
    border: 2px solid #8b9fe8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.function-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.function-card h4 {
    color: #5568d3;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

/* === CALCULATOR === */
.calculator-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 30px;
    border-radius: 15px;
    color: white;
    margin: 30px 0;
}

.calculator-section h2 {
    color: white;
    border-bottom: none;
    margin-bottom: 20px;
}

.calculator-controls {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
}

.option-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.option-btn {
    padding: 12px 25px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
}

.option-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.option-btn.active {
    background: #667eea;
    color: white;
}

/* === INPUT === */
.input-group {
    margin: 20px 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid #d5daf0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #fafbff;
    color: #2c3e50;
}

.input-group input:focus, 
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* === BUTTONS === */
.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* === RESULTS === */
.result-box {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.result-box.show {
    display: block;
    animation: slideIn 0.5s;
}

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

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

/* === CANVAS === */
#graphCanvas {
    width: 100%;
    height: 500px;
    border: 2px solid #d5daf0;
    border-radius: 12px;
    background: #fafbff;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .intro-box { padding: 20px; }
    .calculator-controls { padding: 20px; }
    .option-selector { flex-direction: column; }
    .option-btn { width: 100%; }
    .function-types, .properties-grid { grid-template-columns: 1fr; }
    #graphCanvas { height: 400px; }
}

@media (max-width: 480px) {
    .intro-box h3 { font-size: 1.3em; }
    .formula { font-size: 1.1em; padding: 12px; }
    #graphCanvas { height: 350px; }
}
