body {
    background-color: #0f0f0f; /* Deep dark background */
    color: #e0e0e0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    line-height: 1.6;
    transition: background-color 0.4s ease; /* Smooth for the Color Changer task */
}

.navbar {
    background: linear-gradient(135deg, #e87707, #08000f);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.main-layout {
    display: flex;
    padding: 30px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Sidebar & Interactive Menu --- */
.sidebar {
    width: 280px;
    background-color: #1a1a1a; 
    padding: 25px;
    border-radius: 15px;
    height: fit-content;
}

.activity-menu {
    list-style: none;
    padding: 0;
}

.activity-item {
    background: #252525;
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
    color: #eee;
}

.activity-item:hover {
    background: #2a2a2a;
    border-color: #edf4ed;
    transform: translateX(5px);
}

/* --- The Number Grid --- */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 15px;
    animation: slideIn 0.4s ease-out;
}

.activity-grid button {
    background: #111;
    color: #e7f2e7;
    border: 1px solid #333;
    padding: 10px 0;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.activity-grid button:hover {
    background: #e3ebe3;
    color: #000;
    box-shadow: 0 0 15px rgba(240, 145, 30, 0.3);
    transform: scale(1.15);
}

.menu-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.content {
    flex-grow: 1;
}

.terminal {
    background: #000;
    border: 1px solid #222;
    border-radius: 15px;
    padding: 20px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.7);
    min-height: 120px;
    margin-bottom: 25px;
    color: #ebf5f0; 
    font-family: 'Fira Code', 'Courier New', monospace;
    white-space: pre-wrap;
}

/* --- EXERCISE 4: GRADE CALCULATOR STYLES --- */
.calculator-container h3 {
    margin-top: 0;
    color: #e87707;
    font-size: 1.2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.calculator-container label {
    display: inline-block;
    width: 100px;
    font-size: 0.85rem;
    color: #888;
}

.calculator-container strong {
    color: #4fc3f7;
    font-size: 1.1rem;
}

/* ------------------------------------------ */

.code-font {
    color: #4fc3f7; /* Tech Blue */
    font-size: 0.9rem;
}

.label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555;
    margin-bottom: 10px;
    display: block;
}

.action-btn {
    background: #e9eee9;
    color: #000;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    margin-right: 10px; /* Space between Calc and Reset */
    transition: 0.3s ease;
}

.action-btn:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 12px rgba(232, 119, 7, 0.4);
}

input {
    background: #111;
    border: 1px solid #333;
    color: #eaf3ea;
    padding: 10px;
    border-radius: 6px;
    outline: none;
    margin-bottom: 5px;
}

input:focus {
    border-color: #e87707; /* Matches Navbar theme */
}

/* --- 6. Special Effects & Animations --- */
.dark-mode-active {
    background-color: #ffffff !important;
    color: #000000 !important;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}