body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #eef2f7;
    transition: background 0.3s ease;
}

body.dark {
    background: #121212;
    color: #ffffff;
}

body.dark .card {
    background: #1e1e1e;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

body.dark .sidebar { 
    background: #1a1a1a; 
}

body.dark input { 
    background: #333; 
    color: white; 
    border: 1px solid #444; 
}

.header, .footer { 
    background: #2c3e50; 
    color: white; 
    padding: 20px; 
    text-align: center; 
}

.layout {
    display: flex;
    flex-direction: row-reverse;
    min-height: 100vh;
}

.sidebar { 
    width: 220px; 
    background: #34495e; 
    padding: 20px; 
}

.sidebar h2 { 
    color: white; 
    margin-bottom: 20px; 
}

.sidebar a {
    display: block;
    padding: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    background: #3498db;
    color: white;
    border-radius: 6px;
    transition: 0.3s;
}

.sidebar a:hover { 
    background: #2980b9; 
    transform: translateX(5px); 
}

.content { 
    flex: 1; 
    padding: 40px; 
}

.section { 
    margin-bottom: 60px; 
}

.grid, .exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

button {
    padding: 10px;
    border: none;
    background: #3498db;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

button:hover { 
    filter: brightness(1.1); 
}

input { 
    padding: 8px; 
    margin-top: 5px; 
    width: calc(100% - 18px); 
    border: 1px solid #ddd; 
    border-radius: 4px; 
}

.grade-calc-container { 
    max-width: 400px; 
}

.input-group { 
    margin-bottom: 15px; 
}

.reset-btn { 
    background: #e74c3c; 
}

.result-display { 
    margin-top: 20px; 
    padding: 10px; 
    background: rgba(52, 152, 219, 0.1); 
    border-radius: 8px; 
}


.about-box {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.about-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3498db;
}

.about-info {
    flex: 1;
    min-width: 250px;
}

body.dark .about-img {
    border: 3px solid #fff;
}

.section {
    display: none;
}

.section.active {
    display: block;
}