/* ================= GLOBAL ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f4f6f8;
    color: #222;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: 0.3s;
}

/* ================= HEADER ================= */
header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-align: center;
    padding: 25px 20px;
    font-size: 28px;
    font-weight: 600;
    border-bottom: 4px solid #0a58ca;
}

/* ================= CONTAINER ================= */
.container {
    display: flex;
    flex-wrap: nowrap;
    flex: 1;
}

/* ================= SIDEBAR ================= */
.sidebar {
    flex: 0 0 220px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-right: 2px solid #3e3f41;
    padding: 25px 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fbfcff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* ================= MAIN CONTENT ================= */
.content {
    flex: 1;
    padding: 30px;
    margin: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-height: 100vh;
}

.exercise-section {
    display: none;
    margin-top: 20px;
}

/* ================= ACTIVITY ROW ================= */
.activity-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* ================= ACTIVITY BOXES ================= */
.activity-group {
    flex: 1 1 220px;
    background-color: #fff;
    border-left: 6px solid #0d6efd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.activity-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(243,241,241,0.2);
}

.activity-group h3 {
    color: #0d6efd;
    margin-bottom: 15px;
    font-size: 18px;
}

/* ================= BUTTONS ================= */
.btn-gradient {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    filter: brightness(1.1);
}

/* ================= INPUTS ================= */
.activity-group input {
    padding: 8px;
    width: 90%;
    margin-top: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* ================= LISTS ================= */
.styled-list {
    list-style: disc inside;
    margin-top: 10px;
    width: 100%;
    color: #333;
}

.styled-list li {
    padding: 6px 0;
    border-bottom: 1px solid #dee2e6;
}

/* ================= IMAGES ================= */
.activity-group img {
    display: block;
    margin: 10px 0;
    border-radius: 8px;
    max-width: 100%;       /* responsive width */
    height: auto;          /* maintain aspect ratio */
    max-height: 200px;     /* prevents huge images from breaking layout */
    object-fit: cover;     /* crops large images nicely */
}

/* ================= RESULT SECTION ================= */
.result-section {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    background-color: #6a6a6b;
    border-left: 4px solid #0d6efd;
}

.result-section p {
    font-size: 16px;
    font-weight: 500;
}

/* ================= FOOTER ================= */
footer {
    width: 100%;
    background: linear-gradient(135deg, #1e3c72, #2a5298, #6a3093);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ================= DARK MODE ================= */
.dark-mode {
    background-color: #212529;
    color: #e9ecef;
}

.dark-mode .content {
    background-color: #343a40;
}

.dark-mode .activity-group {
    background-color: #495057;
    border-left-color: #ffc107;
    color: #f8f9fa;
}

.dark-mode .btn-gradient {
    background-color: #ffc107;
    color: #212529;
}

.dark-mode .btn-gradient:hover {
    background-color: #e0a800;
}

.dark-mode input {
    background-color: #495057;
    color: #fff;
    border: 1px solid #6c757d;
}

.dark-mode .sidebar {
    background-color: #343a40;
    border-color: #495057;
}

.dark-mode .sidebar ul li a {
    color: #f8f9fa;
}

.dark-mode .sidebar ul li a:hover {
    background-color: #ffc107;
    color: #212529;
}

/* ================= STUDENT PROFILE ================= */
.profile-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.profile-info {
    flex: 1;
}

.profile-image {
    margin-left: 40px;
}

.student-profile .profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #0d6efd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar, .content {
        flex: 1 1 100%;
        margin: 0;
    }
    .activity-group input,
    .activity-group .btn-gradient {
        flex: 1 1 100%;
        width: 100%;
    }
}