* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: rgb(0, 91, 150);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

/* Sidebar Navigation */
#sidenavbar {
    position: fixed;
    left: 0;
    top: 0;
    width: 120px;
    height: 100vh;
    background: rgb(44, 44, 44);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.navitem {
    width: 80px;
    height: 80px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.navitem img {
    max-width: 50px;
    max-height: 50px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.navitem:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Active navigation indicator */
.nav-indicator {
    position: absolute;
    left: -5px;
    width: 5px;
    height: 60px;
    background: rgb(0, 150, 255);
    border-radius: 0 3px 3px 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

/* Main Content Area */
#maincontent {
    margin-left: 120px;
    min-height: 100vh;
    background: rgb(0, 76, 125);
    padding: 30px;
    transition: background-color 0.5s ease;
}

#classname {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

hr {
    border: none;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

/* Class Navigation Bar */
.classnav {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.classnav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.classnav ul li {
    display: flex;
    width: 100%;
}

.classnav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 15px 30px;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    text-align: center;
    font-weight: 500;
}

.classnav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.classnav a.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* Selection indicator for class nav */
.classnav-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: white;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px 3px 0 0;
}

/* Main Layout Container */
.content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Modules Section - Left/Middle (2/3 width) */
.classmodules {
    flex: 0 0 calc(66.666vw - 140px);
    max-width: calc(66.666vw - 140px);
}

.classmodules h2 {
    color: white;
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: 600;
}

.classunit {
    margin-bottom: 30px;
}

.classmodule {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.classmodule:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateX(5px);
}

.classmodule img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.classmodule h2 {
    flex: 1;
    font-size: 1.3em;
    margin: 0;
}

.classmodule button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    transition: transform 0.3s ease;
}

.classmodule.expanded button {
    transform: rotate(180deg);
}

.moduleitemscontainer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    padding-left: 20px;
}

.moduleitemscontainer.expanded {
    max-height: 1000px;
}

.moduleitem {
    display: block;
    text-decoration: none;
    margin-bottom: 10px;
}

.videoassignment,
.assignment,
.quizassignment {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.videoassignment {
    border-left-color: rgb(255, 100, 100);
}

.assignment {
    border-left-color: rgb(100, 255, 100);
}

.quizassignment {
    border-left-color: rgb(100, 150, 255);
}

.videoassignment:hover,
.assignment:hover,
.quizassignment:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(5px);
}

.videoassignment img,
.assignment img,
.quizassignment img {
    width: 35px;
    height: 35px;
    border-radius: 6px;
}

.videoassignment h2,
.assignment h2,
.quizassignment h2 {
    color: white;
    font-size: 1em;
    font-weight: 500;
    margin: 0;
}

/* Right Sidebar - Calendar and Resources (1/3 width) */
.classsidebar {
    flex: 0 0 calc(33.333vw - 130px);
    max-width: calc(33.333vw - 130px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Calendar Section (60% of sidebar) */
.calendar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    flex: 0 0 60%;
}

#calandercontainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendarweek {
    display: flex;
    gap: 8px;
}

.calenderday {
    flex: 1;
    aspect-ratio: 1;
    background: rgb(0, 56, 92);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.calenderday:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.calenderday.has-event {
    background: rgb(92, 0, 0);
}

.calenderday.today {
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Calendar Items */
.calendaritems {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.clanderevent {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s ease;
}

.clanderevent:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateX(3px);
}

.clanderevent img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    margin-bottom: 5px;
}

.eventname {
    color: white;
    font-size: 1em;
    font-weight: 600;
    margin: 0;
}

.eventtimeloc,
.eventhost {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    font-weight: 400;
    margin: 0;
}

/* Resources Section (40% of sidebar) */
.resourcesbar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
}

.resourcesbar h2 {
    color: white;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 600;
}

#resourcescontainer {
    overflow-y: auto;
    flex: 1;
}

.resourceitem {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.resourceitem:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(3px);
}

.resourceitem img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

.resourcename {
    flex: 1;
    color: white;
    font-size: 0.95em;
    font-weight: 500;
    margin: 0;
}

.resourcedate,
.resourcesize {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
    margin: 0;
}

.resourcestyle {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .classmodules {
        flex: 0 0 calc(60vw - 140px);
        max-width: calc(60vw - 140px);
    }
    
    .classsidebar {
        flex: 0 0 calc(40vw - 180px);
        max-width: calc(40vw - 180px);
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}