:root {
    --primary-color: #4a6bff;
    --secondary-color: #2c3e50;
    --accent-color: #3498db;
    --light-bg: #f9f9f9;
    --dark-text: #333;
    --light-text: #fff;
    --border-color: #e0e0e0;
    --transition-speed: 0.3s;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
}


/* Loading Spinner */

.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(2px);
}

.spinner {
    width: 70px;
    height: 70px;
    border: 8px solid rgba(74, 107, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    border-right-color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    animation: spin 1.2s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 8px solid transparent;
    border-radius: 50%;
    border-top-color: rgba(74, 107, 255, 0.2);
    animation: spin 1.5s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.loading-text {
    margin-top: 20px;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}


/* Container Styles */

.container-notice-board {
    padding: 30px;
    max-width: 1200px;
    margin: 40px auto;
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

.container-notice-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #d5d6db;
}


/* Header Styles */

.head-notice-board {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    animation: fadeInDown 0.8s ease-out;
}

.head-notice-board::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}


/* Year Selector */

.year-selector {
    position: relative;
    margin: 20px 0;
    display: flex;
    justify-content: flex-end;
}

.year-selector input {
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: white;
    color: var(--secondary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-align: center;
}

.year-selector input:hover {
    border-color: var(--accent-color);
}

.year-selector::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
    font-size: 0.8rem;
}


/* Table Container */

.table-container {
    gap: 20px;
}


/* Table Styles */

.notice-table {
    border-collapse: collapse;
    margin: 20px auto;
    font-size: 16px;
    font-family: poppins;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.notice-table thead tr {
    background-color: #4972ed;
    color: #ffffff;
}

.notice-table th,
.notice-table td {
    font-size: 14px;
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.notice-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
    /* alternate row color */
}

.notice-table tbody tr:hover {
    background-color: #dce6f7;
    /* hover effect */
}

.notice-table td:first-child {
    font-weight: bold;
}

.notice-table caption {
    caption-side: top;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #003366;
}


/* Calendar Styles */

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s;
    position: relative;
}


/* Close button */

.close-calendar {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}

.close-calendar:hover {
    color: red;
}

.calendar-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.prevMonth-button,
.currentMonthYear,
.nextMonth-button {
    width: 33.3%;
}

.prevMonth-button {
    padding-left: 1.5rem;
}

.nextMonth-button {
    padding-right: 1.5rem;
}

#nextMonth {
    float: right
}

#currentMonthYear {
    margin: 0 !important;
    text-align: center;
}

.calendar-header button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-weekdays {
    display: contents;
    font-weight: bold;
    text-align: center;
}

.calendar-weekdays div {
    padding: 5px;
    text-align: center;
}

.calendar-days {
    display: contents;
}

.calendar-days div {
    padding: 8px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
}

.calendar-days div:hover {
    background-color: var(--accent-color);
    color: white;
}

.calendar-days .current-day {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.calendar-days .other-month {
    color: #ccc;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Updated Sidebar Styles */

.sidebar-years {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    animation: fadeInUp 0.8s ease-out 0.4s both;
    display: flex;
    gap: 20px;
}

.sidebar-years span {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-align: center;
}


/* Triangle Arrow Styles */

.triangle-up {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid white;
    margin: 0 auto;
}

.triangle-down {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid white;
    margin: 0 auto;
}


/* Updated Scroll Button Styles */

.scroll-up,
.scroll-down {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 5px;
    cursor: pointer;
    font-size: 0;
    transition: all var(--transition-speed) ease;
    border-radius: 4px;
    margin: 2px 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.scroll-up:hover,
.scroll-down:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.scroll-up:active,
.scroll-down:active {
    transform: scale(0.95);
}


/* Rest of your existing styles remain the same */

.scroll-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.years-list,
.months-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
    scroll-behavior: smooth;
}

.years-column,
.months-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}


/* Updated Sidebar Layout */


/* Scrollbar styling */

.years-list::-webkit-scrollbar,
.months-list::-webkit-scrollbar {
    width: 6px;
}

.years-list::-webkit-scrollbar-track,
.months-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.years-list::-webkit-scrollbar-thumb,
.months-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.years-list::-webkit-scrollbar-thumb:hover,
.months-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.years-list a,
.months-list a {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: var(--dark-text);
    border-radius: 20px;
    transition: all var(--transition-speed) ease;
    font-size: 0.9rem;
    text-align: center;
}

.years-list a:hover,
.months-list a:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.years-list a.active,
.months-list a.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(209, 0, 0, 0.2);
}

#noticeTable td:nth-child(1) {
    width: 16%;
}

#noticeTableBody td ul {
    margin: 0 !important;
    padding: 0 0 0 20px !important;
}


/* Animations */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Responsive Design */

@media (max-width: 992px) {
    .container-notice-board {
        padding: 20px;
    }
    .head-notice-board {
        font-size: 1.8rem;
    }
    .notice-table th,
    .notice-table td {
        padding: 15px;
    }
    .year-selector::after {
        content: "▼";
        position: absolute;
        right: 29px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary-color);
        pointer-events: none;
        font-size: 0.8rem;
    }
    .modal-content {
        min-width: 100%;
        margin: 0 auto;
        width: 95% !important;
        top: 31%;
    }
}

@media (max-width: 768px) {
    .table-container {
        flex-direction: column;
    }
    .notice-table,
    .sidebar-years {
        width: 100%;
    }
    .container-notice-board {
        margin: 20px auto;
        padding: 15px;
    }
    .head-notice-board {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    .notice-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .year-selector {
        justify-content: center;
        margin: 15px 0;
    }
    .years-list a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .head-notice-board {
        font-size: 1.3rem;
    }
    .notice-table th,
    .notice-table td {
        padding: 12px;
        font-size: 0.9rem;
    }
    .notice-table ul li {
        padding-left: 20px;
        font-size: 0.9rem;
    }
    .years-list {
        grid-template-columns: 1fr;
    }
    .years-list a {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}


/* Dark Mode Support */

@media (prefers-color-scheme: dark) {
     :root {
        --light-bg: #1a1a1a;
        --dark-text: #f0f0f0;
        --light-text: #f0f0f0;
        --border-color: #444;
        --secondary-color: #3a4a5d;
    }
    .container-notice-board,
    .sidebar-years {
        background-color: #2d2d2d;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    .loading-spinner {
        background: rgba(30, 30, 30, 0.8);
    }
}