/* ================= Reset & Base ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f1115;
    color: #e0e0e0;
    transition: 0.3s;
    line-height: 1.6;
}

/* ================= Header ================= */
header {
    background: linear-gradient(90deg, #1f1f2e, #2c2c44);
    color: #fff;
    text-align: center;
    padding: 25px 20px;
    font-size: 26px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    letter-spacing: 1px;
    border-bottom: 2px solid #00bfff;
    transition: 0.3s;
}

/* ================= Container ================= */
.container {
    display: flex;
    flex-wrap: nowrap;
    min-height: 100vh;
    transition: 0.3s;
}

/* ================= Sidebar ================= */
.sidebar {
    flex: 0 0 250px;
    background: linear-gradient(180deg, #2c2c44, #1f1f2e);
    color: #fff;
    padding: 25px 20px;
    border-right: 2px solid #00bfff;
    transition: 0.3s;
    box-shadow: 3px 0 8px rgba(0,0,0,0.5);
}

.sidebar h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #00bfff;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    color: #fff;
    background-color: #00bfff;
}

/* ================= Main Content ================= */
.content {
    flex: 1;
    padding: 30px;
    background-color: #1c1c2c;
    color: #fff;
    transition: 0.3s;
    border-radius: 12px;
    margin: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.exercise-section {
    display: none;
    margin-top: 20px;
}

/* ================= Activity Groups ================= */
.activity-group {
    background: linear-gradient(145deg, #1f1f2e, #252539);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.activity-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

.activity-group h3 {
    color: #00bfff;
    margin-bottom: 15px;
    font-size: 20px;
}

.activity-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.activity-buttons input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #1f1f2e;
    color: #fff;
    font-size: 15px;
    flex: 1;
    margin-bottom: 10px;
}

.activity-buttons input:focus {
    outline: none;
    border-color: #00bfff;
    box-shadow: 0 0 5px #00bfff;
}

/* ================= Modern Buttons ================= */
.btn-gradient {
    position: relative;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #00bfff, #0077ff);
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 191, 255, 0.6);
}

.btn-gradient:active {
    transform: scale(0.96);
    box-shadow: 0 3px 8px rgba(0, 191, 255, 0.4);
}

.btn-gradient::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: rgba(255,255,255,0.3);
    transform: skewX(-25deg);
    transition: 0.6s;
}

.btn-gradient:hover::before {
    left: 125%;
}

/* ================= Lists ================= */
.styled-list {
    list-style: disc inside;
    margin-top: 10px;
    color: #fff;
}

.styled-list li {
    padding: 6px 0;
    border-bottom: 1px solid #444;
}

/* ================= Images ================= */
.activity-group img {
    display: block;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ================= Result Section ================= */
.result-section {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    background-color: #1a1a2e;
    border-left: 4px solid #00bfff;
}

.result-section p {
    font-size: 18px;
    font-weight: 600;
    margin: 5px 0;
}

/* ================= Footer ================= */
footer {
    background: linear-gradient(90deg, #1f1f2e, #2c2c44);
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 2px solid #00bfff;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.3);
}

/* ================= Dark Mode ================= */
.dark-mode {
    background-color: #111;
    color: #ddd;
}

.dark-button {
    background-color: #333 !important;
    color: #0a0a0a !important;
    border: 1px solid #555 !important;
    box-shadow: none !important;
}

.dark-button:hover {
    background-color: #555 !important;
    transform: translateY(-2px);
}

.dark-input {
    background-color: #222 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

.dark-sidebar {
    background-color: #1c1c2c !important;
    border-color: #444 !important;
}

/* ================= Responsive ================= */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar, .content {
        flex: 1 1 100%;
        margin: 0;
    }
    .activity-buttons input,
    .activity-buttons button {
        flex: 1 1 100%;
    }
}

/* ================= Exercise 4 Grade Calculator ================= */
.grade-calculator {
    background: linear-gradient(145deg, #1f1f2e, #252539);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    transition: transform 0.3s, box-shadow 0.3s;
}

.grade-calculator:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.7);
}

.grade-calculator label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
    font-size: 16px;
}

.grade-calculator input[type="number"] {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #555;
    background-color: #1f1f2e;
    color: #fff;
    font-size: 16px;
    margin-bottom: 10px;
    transition: 0.3s;
}

.grade-calculator input[type="number"]:focus {
    outline: none;
    border-color: #00bfff;
    box-shadow: 0 0 6px #00bfff;
}

.grade-calculator .btn-calc {
    padding: 12px 20px;
    margin-top: 10px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #00bfff, #009acd);
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.grade-calculator .btn-calc:hover {
    background: linear-gradient(90deg, #009acd, #0077a3);
    transform: translateY(-2px);
}