* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f9fafb;
    color: #1f2937;
    padding-top: 60px;
    padding-left: 20px;
    padding-right: 20px;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    margin: 40px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.introsection,
.AboutSection {
    text-align: center;
    background-color: #e0f2fe;
}

.featuressection ul,
.updatessection ul,
.ContactSection {
    list-style-type: disc;
    padding-left: 20px;
}

.featuressection li,
.updatessection li,
.ContactSection {
    margin-bottom: 10px;
}

.howsection {
    background-color: #fef9c3;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 60px;
}

/* NAV */
.nav-bar {
    background-color: rgba(0, 0, 0, 0.85);
    position: fixed;
    padding: 10px 20px;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}

.nav-bar ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
}

.nav-bar li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-bar li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* PROFILE */
#profile {
    width: 100%;
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.profile-picture {
    display: inline-block;
    position: relative;
    margin-bottom: 30px;
}

.profile-picture img {
    width: 120px;
    height: 120px;
    border-radius: 60px;
    background-color: #e5e7eb;
    object-fit: cover;
    display: block;
}

#edit-profile-pic {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    font-size: 13px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.username {
    color: #6b7280;
    font-size: 20px;
    margin-top: 40px;
}

.profile-stats {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin: 40px 0px;
    gap: 20px;
    flex-wrap: wrap;
}

.stat {
    flex: 1;
    min-width: 200px;
    background-color: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
}

.stat h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #374151;
}

.stat p {
    font-size: 12px;
    font-weight: bold;
    color: #111827;
}

.progress-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0%;
    background-color: #10b981;
}

.profile-details {
    background-color: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.profile-details h2 {
    margin-bottom: 10px;
    font-size: 17px;
}

.profile-details p {
    color: #4b5563;
    margin-bottom: 15px;
}

#edit-bio {
    padding: 6px 12px;
    font-size: 15px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.profile-actions {
    text-align: center;
    margin-top: 20px;
}

#change-username {
    padding: 6px 12px;
    font-size: 15px;
    background-color: #f59e0b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* LOGIN & SIGNUP PAGES */
#login-section,
#signup-section {
    width: 100%;
    margin: 60px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 400px;
}

form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

form button {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

form button:hover {
    background-color: #1d4ed8;
}

#signup,
#login {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
}

#signup:hover,
#login:hover {
    text-decoration: underline;
}

/* TASKS */
#task-management {
    width: 100%;
    margin: 40px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#task-management h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1f2937;
}

.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

select {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: #f9fafb;
    color: #1f2937;
    flex: 1;
    min-width: 150px;
}

#task-list {
    min-height: 100px;
    padding: 10px;
    background-color: #f3f4f6;
    border-radius: 6px;
    margin-bottom: 20px;
}

#openModalBtn {
    padding: 6px 12px;
    font-size: 15px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#openModalBtn:hover {
    background-color: #0b16e5;
}

.task-item {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.task-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.task-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.edit-btn,
.delete-btn {
    padding: 4px 6px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    transition: background-color 0.2s ease;
}

.edit-btn {
    background-color: #3b82f6;
}

.edit-btn:hover {
    background-color: #2563eb;
}

.delete-btn {
    background-color: #ef4444;
}

.delete-btn:hover {
    background-color: #dc2626;
}

.completed-btn {
    margin-left: auto;
    padding: 6px 12px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    background-color: #10b981;
    transition: background-color 0.2s ease;
}

.completed-btn:hover {
    background-color: #059669;
}

/* ADMIN */
.admin-container {
    width: 100%;
    margin: 60px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-header {
    font-size: 24px;
    margin-bottom: 30px;
    color: #1f2937;
    text-align: center;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.user-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e5e7eb;
}

.user-detail {
    font-size: 14px;
    color: #4b5563;
    margin: 4px 0;
}

.truncate-url {
    font-size: 13px;
    color: #3b82f6;
    word-break: break-all;
    margin-bottom: 12px;
}

.role-badge {
    display: inline-block;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
    text-transform: capitalize;
}

.role-admin {
    background-color: #f87171;
    color: white;
}

.role-student {
    background-color: #60a5fa;
    color: white;
}

.user-actions {
    margin-top: auto;
    text-align: right;
}

.edit-user-container {
    width: 100%;
    margin: 60px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 500px;
}

.edit-user-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1f2937;
}

.edit-user-container form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #374151;
}

.edit-user-container form input,
.edit-user-container form textarea,
.edit-user-container form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: #f9fafb;
}

.edit-user-container form button {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.edit-user-container form button:hover {
    background-color: #2563eb;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .container {
        max-width: 900px;
    }

    .profile-stats,
    .filters,
    .task-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .task-controls {
        justify-content: flex-start;
    }

    .completed-btn {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    body {
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 70px;
    }

    .nav-bar ul {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .nav-bar li {
        width: 100%;
        text-align: center;
    }

    .nav-bar li a {
        display: block;
        width: 100%;
    }

    .profile-picture img {
        width: 100px;
        height: 100px;
    }

    .stat,
    .profile-details,
    .user-card,
    .edit-user-container,
    #task-management,
    #login-section,
    #signup-section,
    #profile,
    .admin-container {
        padding: 15px;
    }

    .edit-btn,
    .delete-btn,
    .completed-btn {
        font-size: 13px;
        padding: 6px 10px;
    }

    .filters select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    body {
        padding-top: 80px;
    }

    .profile-picture img {
        width: 80px;
        height: 80px;
    }

    #edit-profile-pic {
        bottom: -25px;
        font-size: 12px;
        padding: 4px 8px;
    }

    .username {
        font-size: 18px;
        margin-top: 30px;
    }

    .stat {
        min-width: 100%;
    }

    .user-grid {
        grid-template-columns: 1fr;
    }

    .admin-header,
    .edit-user-container h2,
    #task-management h1 {
        font-size: 20px;
    }

    form input,
    form button,
    .edit-user-container form input,
    .edit-user-container form textarea,
    .edit-user-container form select {
        font-size: 13px;
    }

    .user-avatar {
        width: 48px;
        height: 48px;
    }

    .user-detail,
    .truncate-url,
    .role-badge {
        font-size: 12px;
    }

    section {
        margin: 20px auto;
        padding: 15px;
    }
}