/* all index.html CSS styles go here */
body {
    font-family: "Century Gothic", CenturyGothic, Geneva, AppleGothic, sans-serif;
    margin: 0;
    background-color: #121212;
    color: #e0e0e0;
    min-height: 100vh;
}
 
a {
    color: #4db6ac;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #80cbc4;
}

/* --- HEADER & DROPDOWN LAYOUT --- */
header {
    background-image: linear-gradient(to bottom, #1f1f1f, #0d0d0d);
    padding: 20px 0;
    border-bottom: 2px solid #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.header-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}
 
.header-title h1 {
    margin: 0;
    font-size: 2em;
    background-image: linear-gradient(45deg, #e0e0e0, #80cbc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
 
nav {
    display: flex;
    gap: 20px;
}

/* --- DROPDOWN STYLES --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: #333;
    color: white;
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #555;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.dropbtn:hover {
    background-color: #555;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #2a2a2a;
    min-width: 250px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.7);
    z-index: 10;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #444;
}

.dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    color: #e0e0e0;
}

.dropdown-content a:hover {
    background-color: #444;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- MAIN INDEX BOX --- */
.index-box {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    min-height: 500px; 
    
    background-color: #1f1f1f; 
    background-image: linear-gradient(
        to bottom right,
        rgba(31, 31, 31, 0.8), 
        rgba(50, 50, 50, 0.8) 
    );
    
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    border: 1px solid #333; 
}

/* --- ASSIGNMENT CONTROLS --- */
.assignment-controls {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333; 
}

.category-selector {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    background-color: #333;
    color: #e0e0e0;
    transition: all 0.2s;
}

.category-selector:hover {
    background-color: #555;
}

/* ACTIVE SELECTOR STYLING */
.category-selector.active {
    background-color: #4db6ac; 
    color: #121212;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* --- SCROLLABLE ASSIGNMENT LIST AREA --- */
.assignment-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 15px;
    will-change: scroll-position;
}
 
/* ASSIGNMENT CONTENT CONTAINERS */
.assignment-content {
    display: none; /* controlled by JS */
}
 
.assignment-content.active {
    display: block;
}

/* SCROLLBAR STYLING */
.assignment-list::-webkit-scrollbar,
.term-assignment-list::-webkit-scrollbar {
    width: 8px;
}

.assignment-list::-webkit-scrollbar-track,
.term-assignment-list::-webkit-scrollbar-track {
    background: #1f1f1f;
}

.assignment-list::-webkit-scrollbar-thumb,
.term-assignment-list::-webkit-scrollbar-thumb {
    background: #4db6ac;
    border-radius: 4px;
}

.assignment-list::-webkit-scrollbar-thumb:hover,
.term-assignment-list::-webkit-scrollbar-thumb:hover {
    background: #64d4c8;
}

/* --- LIST STYLES --- */
.index-box ul {
    list-style-type: none;
    padding: 0;
}

.index-box li {
    padding: 8px 0;
    border-bottom: 1px dashed #333;
}

.index-box li:last-child {
    border-bottom: none;
}
 
.index-box h4 {
    color: #ff6e40;
    margin-top: 0;
    border-bottom: 2px solid #ff6e40;
    padding-bottom: 5px;
    display: inline-block;
    margin-bottom: 15px;
}

/* --- NEW COLUMN LAYOUT --- */
.term-columns-wrapper {
    display: flex;
    gap: 20px;
}
 
.term-column {
    flex: 1;
    min-width: 0;
}

/* --- TABLE STYLES --- */
 
.term-assignment-list {
    max-height: 300px;
    overflow-y: auto;
    display: block;
    margin-bottom: 25px; 
    border: 1px solid #333;
    border-radius: 0 0 5px 5px;
}
 
.term-title {
    color: #121212;
    background-color: #4db6ac;
    padding: 10px 15px;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    border-radius: 5px 5px 0 0;
}

.assignment-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.assignment-table th, .assignment-table td {
    padding: 10px 5px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}
 
.assignment-table th {
    background-color: #2a2a2a;
    color: #80cbc4;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 5;
    text-transform: uppercase;
    font-size: 0.9em;
    border-bottom: 1px solid #444;
}
 
.assignment-table td {
    font-size: 0.95em;
}
 
.assignment-table a {
    word-break: break-word;
}
 
/* Util STYLES */
small, p { 
    display: block; 
    margin-top: 10px;
}

@media (max-width: 650px) {
    .term-columns-wrapper {
        flex-direction: column;
        gap: 0;
    }
    .term-assignment-list {
        max-height: 250px;
    }
    .term-title {
        margin-top: 15px;
        border-radius: 5px 5px 0 0;
    }

    .term-column:first-child .term-title {
        margin-top: 0;
    }
}
