/* wish all the best to those affected by the Tai Po fire */
html {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
}

/* Common CSS for all pages */
:root {
    --oi-green: 55, 126, 34;
    --oi-green-mid: 90, 201, 55;
    --oi-green-light: 178, 230, 162;
    
    --white: 255, 255, 255;
    --black: 0, 0, 0;
    
    --background-colour: 255, 255, 255;
    --bg-primary: var(--background-colour);
    --bg-secondary: var(--white);
    --text-primary: var(--black);
    --text-secondary: 100, 100, 100;
    --accent: 255, 140, 0;
    --accent-light: 255, 180, 80;
    --border: 220, 220, 220;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --nav-bg: var(--oi-green);
    --nav-text: var(--white);
    --clock-bg: 0, 0, 0, 0.2;
    --clock-text: var(--white);
    --feature-icon: 255, 140, 0;
    --footer-bg: var(--oi-green);
    --footer-text: var(--white);
    --overdue-color: 220, 53, 69;
}

.theme-grey {
    --background-colour: 50, 50, 50;
    --bg-primary: var(--background-colour);
    --bg-secondary: 70, 70, 70;
    --text-primary: 255, 255, 255;
    --text-secondary: 200, 200, 200;
    --accent: 255, 165, 0;
    --accent-light: 255, 195, 90;
    --border: 90, 90, 90;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    --nav-bg: var(--oi-green);
    --nav-text: var(--white);
    --feature-icon: 255, 165, 0;
    --footer-bg: var(--oi-green);
    --footer-text: var(--white);
    --overdue-color: 220, 53, 69;
}

.theme-dark {
    --background-colour: 0, 0, 0;
    --bg-primary: var(--background-colour);
    --bg-secondary: 20, 20, 20;
    --text-primary: 255, 255, 255;
    --text-secondary: 180, 180, 180;
    --accent: 255, 165, 0;
    --accent-light: 255, 195, 90;
    --border: 50, 50, 50;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --nav-bg: var(--oi-green);
    --nav-text: var(--white);
    --feature-icon: 255, 165, 0;
    --footer-bg: var(--oi-green);
    --footer-text: var(--white);
    --overdue-color: 220, 53, 69;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: rgb(var(--bg-primary));
    color: rgb(var(--text-primary));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Theme icon styles */
#mode-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#light-icon, #dark-icon, #superdark-icon {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease, opacity 0.3s ease;
    filter: brightness(0) invert(1);
}

#light-icon {
    transform: rotate(0deg);
    opacity: 1;
}

#dark-icon {
    transform: rotate(-120deg);
    opacity: 0;
}

#superdark-icon {
    transform: rotate(120deg);
    opacity: 0;
}

/* Theme-specific icon styles */
.theme-grey #light-icon {
    transform: rotate(120deg);
    opacity: 1;
}

.theme-grey #dark-icon {
    transform: rotate(0deg);
    opacity: 1;
}

.theme-grey #superdark-icon {
    transform: rotate(-120deg);
    opacity: 0;
}

.theme-dark #light-icon {
    transform: rotate(-120deg);
    opacity: 0;
}

.theme-dark #dark-icon {
    transform: rotate(120deg);
    opacity: 1;
}

.theme-dark #superdark-icon {
    transform: rotate(0deg);
    opacity: 1;
}

.clock {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    padding: 0.4rem 0.6rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    color: rgb(255, 255, 255);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-size: 0.85rem;
    text-align: center;
    width: fit-content;
}

/* Header Styles */
#header-real {
    background-color: rgb(var(--nav-bg));
    color: rgb(var(--nav-text));
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

#logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    font-size: 1.5rem;
    cursor: pointer;
}

.theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-switch {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 2px;
}

.theme-btn {
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 5px 10px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.8rem;
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0 0;
    overflow-x: auto;
}

.a_button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    color: rgb(var(--nav-text));
    text-decoration: none;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.a_button:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-container {
    background-color: rgb(var(--bg-secondary));
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    border: 1px solid rgb(var(--border));
}

.welcome-container {
    background-color: rgb(var(--bg-secondary));
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    border: 1px solid rgb(var(--border));
}

h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: rgb(var(--accent));
}

/* Footer Styles */
#footer {
    background-color: rgb(var(--footer-bg));
    color: rgb(var(--footer-text));
    padding: 1rem;
    text-align: center;
    margin-top: auto;
}

#footer a {
    color: rgb(var(--footer-text));
    text-decoration: none;
}

@media (max-width: 768px) {
    #header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .theme-toggle-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .clock {
        margin-left: auto;
    }

    #nav {
        overflow-x: auto;
        width: 100%;
        padding-top: 0.75rem;
    }
}

.portrait-hide {
    display: inline;
}

@media (max-width: 480px) {
    .portrait-hide {
        display: none;
    }
    
    .clock {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    .theme-switch {
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .theme-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

/* 404 Page Specific Styles */
#code404 {
    display: flex;
    background-color: rgba(var(--oi-green-light), 0.5);
    column-gap: 0.5em;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
}

#code404 > span {
    transition: opacity 0.25s ease, transform 0.25s ease;
    width: 0.75em;
    text-align: center;
    color: rgb(var(--oi-green));
}

.page-not-found {
    font-size: 1.5rem;
    color: rgb(var(--text-primary));
    text-align: center;
}

/* 404 Page Main Content Specific Styles */
.page-404 main {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-size: 2em;
    font-weight: bold;
    row-gap: 0.5em;
}

@media (max-width: 768px) {
    .page-404 main {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .page-404 main {
        font-size: 1.2em;
    }
}

/* Announcements Page Specific Styles */
.announcement-item {
    padding: 1.5rem;
    border-bottom: 1px solid rgb(var(--border));
    margin-bottom: 1rem;
    scroll-margin-top: 80px;
    transition: background-color 0.3s ease;
}

.announcement-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.announcement-date {
    color: rgb(var(--accent));
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.announcement-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: rgb(var(--feature-icon));
}

.announcement-body {
    color: rgb(var(--text-primary));
    line-height: 1.6;
}

.announcement-item.targeted {
    background-color: rgba(var(--accent), 0.15) !important;
    border-left: 4px solid rgb(var(--accent)) !important;
    padding-left: calc(1.5rem - 4px);
    animation: highlightFade 2s ease-in-out;
}

@keyframes highlightFade {
    0% { background-color: rgba(var(--accent), 0.3); }
    100% { background-color: rgba(var(--accent), 0.15); }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.pagination-button {
    padding: 0.5rem 1rem;
    background-color: rgb(var(--accent));
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pagination-button:hover:not(:disabled) {
    background-color: rgb(var(--accent-light));
}

.pagination-button:disabled {
    background-color: rgb(var(--text-secondary));
    cursor: not-allowed;
}

.page-input {
    width: 50px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid rgb(var(--border));
    border-radius: 4px;
}

.page-info {
    color: rgb(var(--text-secondary));
}

.announcement-link {
    margin-top: 1rem;
    display: inline-block;
    color: rgb(var(--accent));
    text-decoration: none;
    font-weight: bold;
}

.announcement-link:hover {
    text-decoration: underline;
}

/* Calendar Page Specific Styles */
.holiday {
    color: red !important;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.calendar-nav button {
    padding: 0.5rem 1rem;
    background-color: rgb(var(--accent));
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.calendar-nav button:hover:not(:disabled) {
    background-color: rgb(var(--accent-light));
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.filter-toggle label {
    color: rgb(var(--text-primary));
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-toggle input {
    width: auto;
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    table-layout: fixed;
}

th, td {
    border: 1px solid rgb(var(--border));
    padding: 10px;
    text-align: center;
    height: 100px;
    vertical-align: top;
    position: relative;
}

th {
    background-color: rgba(var(--oi-green-light), 0.3);
    font-weight: bold;
    color: rgb(var(--text-primary));
    height: 40px;
}

td {
    cursor: pointer;
    color: rgb(var(--text-primary));
    overflow: hidden;
}

td:hover {
    background-color: rgba(var(--oi-green-light), 0.2);
}

.current-day {
    background-color: rgba(var(--oi-green-light), 0.4);
    font-weight: bold;
}

.other-month {
    color: rgb(var(--text-secondary));
    opacity: 0.6;
}

.calendar-event {
    background-color: rgb(var(--oi-green));
    color: white;
    font-size: 0.75em;
    padding: 2px 4px;
    border-radius: 3px;
    margin-top: 2px;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
}

.calendar-announcement {
    background-color: rgb(var(--accent));
    color: white;
    font-size: 0.75em;
    padding: 2px 4px;
    border-radius: 3px;
    margin-top: 2px;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
}

.calendar-todo {
    background-color: rgb(var(--accent));
    color: white;
    font-size: 0.75em;
    padding: 2px 4px;
    border-radius: 3px;
    margin-top: 2px;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
}

.day-number {
    font-weight: bold;
    text-align: right;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: rgb(var(--bg-secondary));
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgb(var(--border));
    box-shadow: var(--card-shadow);
    position: relative;
}

.modal-content h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: left;
    color: rgb(var(--text-primary));
}

.event-list {
    margin-top: 15px;
    margin-bottom: 15px;
}

.event-item {
    padding: 10px;
    border-bottom: 1px solid rgb(var(--border));
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.event-item:hover {
    background-color: rgba(var(--oi-green-light), 0.2);
}

.event-title {
    font-weight: bold;
    color: rgb(var(--feature-icon));
}

.event-time {
    color: rgb(var(--text-secondary));
    font-size: 0.9em;
}

.event-description {
    color: rgb(var(--text-primary));
    margin-top: 5px;
    font-size: 0.9em;
}

.announcement-item {
    padding: 10px;
    border-bottom: 1px solid rgb(var(--border));
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.announcement-item:hover {
    background-color: rgba(var(--accent-light), 0.1);
}

.announcement-title {
    font-weight: bold;
    color: rgb(var(--accent));
}

.announcement-date {
    color: rgb(var(--text-secondary));
    font-size: 0.9em;
}

.todo-item {
    padding: 10px;
    border-bottom: 1px solid rgb(var(--border));
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.todo-item:hover {
    background-color: rgba(var(--accent-light), 0.1);
}

.todo-title {
    font-weight: bold;
    color: rgb(var(--accent));
}

.todo-date {
    color: rgb(var(--text-secondary));
    font-size: 0.9em;
}

.event-link {
    margin-top: 1rem;
    display: inline-block;
    color: rgb(var(--accent));
    text-decoration: none;
    font-weight: bold;
}

.event-link:hover {
    text-decoration: underline;
}

.todo-link {
    margin-top: 0.5rem;
    display: inline-block;
    color: rgb(var(--accent));
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

.todo-link:hover {
    text-decoration: underline;
}

/* Credits Page Specific Styles */
.credits-section {
    margin-bottom: 2.5rem;
}

.credits-section:last-child {
    margin-bottom: 0;
}

.credits-section h3 {
    color: rgb(var(--feature-icon));
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgb(var(--border));
}

.credits-item {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.credits-item:last-child {
    margin-bottom: 0;
}

.credits-item h4 {
    color: rgb(var(--accent));
    margin-bottom: 0.5rem;
}

.credits-item p {
    color: rgb(var(--text-primary));
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

.credits-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: rgb(var(--feature-icon));
    font-size: 1.5rem;
    line-height: 1;
}

/* Home Page Specific Styles */
.welcome-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
    color: rgb(var(--text-secondary));
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 2rem 0;
    gap: 1.5rem;
}

.feature-button {
    background-color: rgb(var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 8px;
    width: 220px;
    text-align: center;
    transition: transform 0.2s ease;
    border: 1px solid rgb(var(--border));
    box-shadow: var(--card-shadow);
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    display: block;
    flex: 0 1 auto;
}

.feature-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-button i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: rgb(var(--feature-icon));
}

.feature-button h3 {
    color: rgb(var(--feature-icon));
    margin-bottom: 0.5rem;
}

.feature-button p {
    color: rgb(var(--text-secondary));
    font-size: 0.9rem;
    line-height: 1.4;
}

.content-sections {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.upcoming-events {
    padding: 1.5rem;
    background-color: rgb(var(--bg-secondary));
    border-radius: 8px;
    border: 1px solid rgb(var(--border));
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.upcoming-events h3 {
    color: rgb(var(--feature-icon));
    margin-bottom: 1rem;
    text-align: center;
}

.upcoming-events .event-item {
    padding: 0.75rem;
    border-bottom: 1px solid rgb(var(--border));
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease;
}

.upcoming-events .event-item:hover {
    background-color: rgba(var(--accent-light), 0.05);
}

.upcoming-events .event-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.upcoming-events .event-date {
    color: rgb(var(--accent));
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.upcoming-events .event-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: rgb(var(--feature-icon));
    font-size: 1.1rem;
}

.upcoming-events .event-item p {
    color: rgb(var(--text-primary));
    line-height: 1.5;
}

.announcements {
    padding: 1.5rem;
    background-color: rgb(var(--bg-secondary));
    border-radius: 8px;
    border: 1px solid rgb(var(--border));
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.announcements h3 {
    color: rgb(var(--feature-icon));
    margin-bottom: 1rem;
    text-align: center;
}

.announcement-item {
    padding: 0.75rem;
    border-bottom: 1px solid rgb(var(--border));
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease;
}

.announcement-item:hover {
    background-color: rgba(var(--accent-light), 0.05);
}

.announcement-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.announcement-date {
    color: rgb(var(--accent));
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.announcement-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: rgb(var(--feature-icon));
    font-size: 1.1rem;
}

.announcement-item p {
    color: rgb(var(--text-primary));
    line-height: 1.5;
}

.urgent-todos {
    padding: 1.5rem;
    background-color: rgb(var(--bg-secondary));
    border-radius: 8px;
    border: 1px solid rgb(var(--border));
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.urgent-todos h3 {
    color: rgb(var(--feature-icon));
    margin-bottom: 1rem;
    text-align: center;
}

.urgent-todos .todo-item {
    padding: 0.75rem;
    border-bottom: 1px solid rgb(var(--border));
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease;
}

.urgent-todos .todo-item:hover {
    background-color: rgba(var(--accent-light), 0.05);
}

.urgent-todos .todo-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.urgent-todos .overdue-todo {
    border-left: 4px solid rgb(var(--overdue-color));
    background-color: rgba(var(--overdue-color), 0.03);
}

.urgent-todos .todo-date {
    color: rgb(var(--accent));
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.urgent-todos .overdue-deadline {
    color: rgb(var(--overdue-color));
}

.urgent-todos .todo-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: rgb(var(--feature-icon));
    font-size: 1.1rem;
}

.urgent-todos .todo-item p {
    color: rgb(var(--text-primary));
    line-height: 1.5;
}

.suffix {
    color: rgb(var(--text-secondary));
    font-size: 0.8em;
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgb(var(--border)), transparent);
    margin: 20px 0;
}

.view-all {
    display: block;
    text-align: center;
    margin-top: auto;
    padding-top: 1rem;
    color: rgb(var(--accent));
    text-decoration: none;
    font-weight: bold;
}

.view-all:hover {
    text-decoration: underline;
}

/* Todo Page Specific Styles */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: rgb(var(--text-primary));
    font-weight: 500;
}

.class-number-input {
    padding: 0.5rem;
    border: 1px solid rgb(var(--border));
    border-radius: 4px;
    width: 80px;
    background-color: rgb(var(--bg-secondary));
    color: rgb(var(--text-primary));
}

.filter-button {
    padding: 0.5rem 1rem;
    background-color: rgb(var(--accent));
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-button:hover {
    background-color: rgb(var(--accent-light));
}

.section-header {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgb(var(--accent));
    color: rgb(var(--accent));
}

.overdue-header {
    border-bottom: 2px solid rgb(var(--overdue-color));
    color: rgb(var(--overdue-color));
}

.completed-header {
    border-bottom: 2px solid rgb(var(--text-secondary));
    color: rgb(var(--text-secondary));
}

.task-item {
    padding: 1.5rem;
    border: 1px solid rgb(var(--border));
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: rgb(var(--bg-secondary));
    box-shadow: var(--card-shadow);
    scroll-margin-top: 80px;
    transition: background-color 0.3s ease;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.task-title {
    font-size: 1.3rem;
    color: rgb(var(--feature-icon));
    margin-bottom: 0.5rem;
}

.task-deadline {
    color: rgb(var(--accent));
    font-weight: bold;
    font-size: 0.9rem;
}

.overdue-deadline {
    color: rgb(var(--overdue-color));
}

.task-body {
    color: rgb(var(--text-primary));
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.pending-students {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgb(var(--border));
}

.pending-title {
    font-weight: bold;
    color: rgb(var(--text-secondary));
    margin-bottom: 0.5rem;
}

.student-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.student-number {
    background-color: rgba(var(--accent), 0.1);
    color: rgb(var(--accent));
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 2.2rem;
    text-align: center;
}

.overdue-student-number {
    background-color: rgba(var(--overdue-color), 0.1);
    color: rgb(var(--overdue-color));
    min-width: 2.2rem;
    text-align: center;
}

.no-tasks {
    text-align: center;
    color: rgb(var(--text-secondary));
    padding: 2rem;
    font-style: italic;
}

.status-upcoming {
    border-left: 4px solid rgb(var(--oi-green));
}

.status-overdue {
    border-left: 4px solid rgb(var(--overdue-color));
}

.status-completed {
    border-left: 4px solid rgb(var(--text-secondary));
    opacity: 0.7;
}

.task-link {
    margin: 0.5rem 0 1rem 0;
    display: inline-block;
    color: rgb(var(--accent));
    text-decoration: none;
    font-weight: bold;
}

.task-link:hover {
    text-decoration: underline;
}

.task-link i {
    margin-right: 0.5rem;
}

.task-item.targeted {
    background-color: rgba(var(--accent), 0.15) !important;
    border-left: 4px solid rgb(var(--accent)) !important;
    padding-left: calc(1.5rem - 4px);
    animation: highlightFade 2s ease-in-out;
}

/* Resources Page Specific Styles */
.financial-section {
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .feature-button {
        width: 200px;
    }
    
    .content-sections {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .features {
        justify-content: center;
    }
    
    .feature-button {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .feature-button {
        width: 45%;
        min-width: 160px;
    }
    
    .content-sections {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .feature-button {
        width: 100%;
        max-width: 280px;
    }
}