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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #1e2a3a;
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.header p {
    margin-top: 0.5rem;
    opacity: 0.8;
}

.main-container {
    display: flex;
    flex: 1;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.sidebar {
    width: 280px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 1rem;
}

.sidebar h3 {
    color: #1e2a3a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin: 0.8rem 0;
}

.sidebar a {
    text-decoration: none;
    color: #2c5282;
    font-weight: 500;
    transition: 0.2s;
    display: block;
    padding: 0.4rem 0;
}

.sidebar a:hover {
    color: #3182ce;
    padding-left: 5px;
}

.content {
    flex: 1;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    padding: 2rem;
}

.activity-card {
    background: #f9fafb;
    border-left: 4px solid #3182ce;
    padding: 1.2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    transition: 0.2s;
}

.activity-card h2 {
    color: #1e2a3a;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-card button, .calc-btn, .reset-btn, .todo-add, .todo-item button {
    background: #3182ce;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin: 0.3rem 0.2rem;
    transition: 0.2s;
}

.activity-card button:hover, .calc-btn:hover, .reset-btn:hover {
    background: #2c5282;
    transform: scale(1.02);
}

input, .todo-input {
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    margin: 0.3rem 0;
    width: 200px;
}

.result-area {
    background: #e2e8f0;
    padding: 0.5rem;
    border-radius: 8px;
    margin-top: 0.8rem;
    font-family: monospace;
}

.grade-table {
    margin-top: 1rem;
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9rem;
}

.grade-table th, .grade-table td {
    border: 1px solid #cbd5e0;
    padding: 0.4rem;
    text-align: center;
}

.grade-table th {
    background: #e2e8f0;
}

.todo-list {
    margin-top: 1rem;
    list-style: none;
}

.todo-list li {
    background: #f1f5f9;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.todo-list li button {
    background: #e53e3e;
    padding: 0.3rem 0.7rem;
}

.todo-list li button:hover {
    background: #c53030;
}

.dark-mode-toggle {
    background: #4a5568;
}

footer {
    background: #1e2a3a;
    color: #a0aec0;
    text-align: center;
    padding: 1.2rem;
    margin-top: auto;
    font-size: 0.9rem;
}

@media (max-width: 800px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
    }
}