:root {
    --ncu-primary: #003366;
    --ncu-secondary: #8a2be2;
    --ncu-light-gray: #f8f9fa;
    --ncu-text: #333;
    --ncu-text-light: #f1f1f1;
}

/* Blue Theme */
[data-theme="blue"] {
    --ncu-primary: #1e3a8a;
    --ncu-secondary: #3b82f6;
    --ncu-light-gray: #eff6ff;
    --ncu-text: #1e293b;
    --ncu-text-light: #f1f5f9;
}

/* Green Theme */
[data-theme="green"] {
    --ncu-primary: #166534;
    --ncu-secondary: #22c55e;
    --ncu-light-gray: #f0fdf4;
    --ncu-text: #1f2937;
    --ncu-text-light: #f9fafb;
}

/* Purple Theme */
[data-theme="purple"] {
    --ncu-primary: #581c87;
    --ncu-secondary: #a855f7;
    --ncu-light-gray: #faf5ff;
    --ncu-text: #1f2937;
    --ncu-text-light: #f9fafb;
}

/* Orange Theme */
[data-theme="orange"] {
    --ncu-primary: #9a3412;
    --ncu-secondary: #f97316;
    --ncu-light-gray: #fff7ed;
    --ncu-text: #1f2937;
    --ncu-text-light: #f9fafb;
}

/* Dark Theme */
[data-theme="dark"] {
    --ncu-primary: #f8fafc;
    --ncu-secondary: #60a5fa;
    --ncu-light-gray: #1e293b;
    --ncu-text: #f1f5f9;
    --ncu-text-light: #0f172a;
}

    /* Dark theme specific adjustments */
    [data-theme="dark"] body {
        background-color: #0f172a;
        color: var(--ncu-text);
    }

    [data-theme="dark"] .navbar {
        background-color: rgba(15, 23, 42, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

        [data-theme="dark"] .navbar.scrolled {
            background-color: #1e293b;
        }

    [data-theme="dark"] .quick-link-card {
        background: #1e293b;
        border: 1px solid #334155;
    }

        [data-theme="dark"] .quick-link-card:hover {
            background-color: #334155;
        }

    [data-theme="dark"] .news-table {
        background-color: #1e293b;
    }

        [data-theme="dark"] .news-table tbody tr:hover {
            background-color: #334155;
        }

    [data-theme="dark"] .update-card {
        background: #1e293b;
        border: 1px solid #334155;
    }

    [data-theme="dark"] .footer {
        background-color: #0f172a;
    }

body {
    font-family: "Noto Sans TC", "Poppins", sans-serif;
    background-color: #ffffff;
    color: var(--ncu-text);
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Selector */
.theme-selector {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1050;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    border: 1px solid #e0e0e0;
}

[data-theme="dark"] .theme-selector {
    background: #1e293b;
    border: 1px solid #334155;
}

.theme-selector h6 {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--ncu-primary);
    text-align: center;
}

.theme-option {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    margin: 5px;
    transition: transform 0.2s, border-color 0.2s;
    display: inline-block;
}

    .theme-option:hover {
        transform: scale(1.1);
    }

    .theme-option.active {
        border-color: #fff;
        box-shadow: 0 0 0 2px var(--ncu-secondary);
    }

.theme-default {
    background: linear-gradient(45deg, #003366, #8a2be2);
}

.theme-blue {
    background: linear-gradient(45deg, #1e3a8a, #3b82f6);
}

.theme-green {
    background: linear-gradient(45deg, #166534, #22c55e);
}

.theme-purple {
    background: linear-gradient(45deg, #581c87, #a855f7);
}

.theme-orange {
    background: linear-gradient(45deg, #9a3412, #f97316);
}

.theme-dark {
    background: linear-gradient(45deg, #0f172a, #60a5fa);
}

/* Navigation */
.navbar {
    transition: background-color 0.4s ease-out;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

    .navbar.scrolled {
        background-color: #ffffff;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

.navbar-brand {
    font-weight: 700;
    color: var(--ncu-primary);
}

.nav-link {
    font-weight: 500;
    color: var(--ncu-primary);
    transition: color 0.3s;
}

    .nav-link:hover,
    .nav-link.active {
        color: var(--ncu-secondary);
    }

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--ncu-text-light);
    background: url("https://images.unsplash.com/photo-1586944697929-3a3f69505790?q=80&w=2070&auto=format&fit=crop") no-repeat center center;
    background-size: cover;
}

    .hero::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient( 45deg, rgba(0, 51, 102, 0.7), rgba(138, 43, 226, 0.5) );
    }

[data-theme="blue"] .hero::after {
    background: linear-gradient(45deg, rgba(30, 58, 138, 0.7), rgba(59, 130, 246, 0.5));
}

[data-theme="green"] .hero::after {
    background: linear-gradient(45deg, rgba(22, 101, 52, 0.7), rgba(34, 197, 94, 0.5));
}

[data-theme="purple"] .hero::after {
    background: linear-gradient(45deg, rgba(88, 28, 135, 0.7), rgba(168, 85, 247, 0.5));
}

[data-theme="orange"] .hero::after {
    background: linear-gradient(45deg, rgba(154, 52, 18, 0.7), rgba(249, 115, 22, 0.5));
}

[data-theme="dark"] .hero::after {
    background: linear-gradient(45deg, rgba(15, 23, 42, 0.8), rgba(96, 165, 250, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeIn 1.5s ease-in-out;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.5rem;
    font-weight: 400;
}

/* Animations */
.typing-effect {
    border-right: 0.15em solid orange;
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: 0.1em;
    animation: typing 3.5s steps(30, end) forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }

    50% {
        border-color: orange;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Title */
.section-title {
    font-weight: 700;
    color: var(--ncu-primary);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 10px;
}

    .section-title::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 4px;
        background: var(--ncu-secondary);
        border-radius: 2px;
    }

/* Quick Links */
.quick-link-card {
    background: var(--ncu-light-gray);
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

    .quick-link-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        background-color: #fff;
    }

    .quick-link-card i {
        font-size: 3rem;
        color: var(--ncu-secondary);
        margin-bottom: 1rem;
        transition: transform 0.3s ease;
    }

    .quick-link-card:hover i {
        transform: scale(1.1);
    }

    .quick-link-card h5 {
        font-weight: 700;
        color: var(--ncu-primary);
    }

/* News Table */
.news-table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

    .news-table thead {
        background-color: var(--ncu-primary);
        color: var(--ncu-text-light);
    }

    .news-table th {
        font-weight: 500;
    }

    .news-table tbody tr {
        transition: background-color 0.3s;
    }

        .news-table tbody tr:hover {
            background-color: #eef2f7;
        }

    .news-table td a {
        text-decoration: none;
        color: var(--ncu-text);
        font-weight: 500;
        transition: color 0.3s;
    }

        .news-table td a:hover {
            color: var(--ncu-secondary);
        }

.pagination .page-link {
    color: var(--ncu-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--ncu-primary);
    border-color: var(--ncu-primary);
    color: white;
}

.pagination .page-link:hover {
    color: var(--ncu-secondary);
    background-color: var(--ncu-light-gray);
    border-color: var(--ncu-secondary);
}

/* Dark theme pagination adjustments */
[data-theme="dark"] .pagination .page-link {
    background-color: #1e293b;
    border-color: #334155;
    color: var(--ncu-text);
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--ncu-secondary);
    border-color: var(--ncu-secondary);
    color: #0f172a;
}

[data-theme="dark"] .pagination .page-link:hover {
    background-color: #334155;
    border-color: var(--ncu-secondary);
    color: var(--ncu-secondary);
}

/* Weekly Updates */
.updates-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--ncu-primary);
    font-weight: 600;
}

    .updates-tabs .nav-link.active {
        border-color: var(--ncu-secondary);
        color: var(--ncu-secondary);
        background: none;
    }

.update-card {
    background: #fff;
    border: 1px solid #eee;
    border-left: 5px solid var(--ncu-secondary);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Instagram Section */
.instagram-card {
    background: linear-gradient( 45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100% );
    color: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
}

    .instagram-card h3 {
        font-weight: 700;
    }

    .instagram-card .btn-light {
        font-weight: 600;
        padding: 0.75rem 2rem;
        border-radius: 50px;
        transition: transform 0.3s, box-shadow 0.3s;
    }

        .instagram-card .btn-light:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

/* Footer */
.footer {
    background-color: var(--ncu-primary);
    color: var(--ncu-text-light);
    padding-top: 4rem;
    padding-bottom: 2rem;
}

    .footer h5 {
        color: #fff;
        font-weight: 700;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
    }

    .footer p,
    .footer a {
        color: #ccc;
        text-decoration: none;
        transition: color 0.3s;
    }

        .footer a:hover {
            color: #fff;
            text-decoration: underline;
        }

    .footer .hotline-card {
        background-color: rgba(255, 255, 255, 0.1);
        padding: 1.2rem;
        border-radius: 10px;
        text-align: center;
        border-left: 4px solid var(--ncu-secondary);
        transition: background-color 0.3s ease;
    }

        .footer .hotline-card:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }

        .footer .hotline-card i {
            margin-right: 0.5rem;
            color: var(--ncu-secondary);
        }

    .footer .service-hours .d-flex {
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

        .footer .service-hours .d-flex:last-child {
            border-bottom: none;
        }

    .footer ul.list-unstyled li {
        transition: transform 0.2s ease;
    }

        .footer ul.list-unstyled li:hover {
            transform: translateX(5px);
        }

    .footer hr {
        border-color: rgba(255, 255, 255, 0.2);
        margin: 2rem 0 1.5rem 0;
    }

    .footer .text-muted {
        color: rgba(255, 255, 255, 0.6) !important;
    }

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--ncu-text);
    transition: all 0.3s ease;
}

    .dropdown-item:hover {
        background-color: var(--ncu-light-gray);
        color: var(--ncu-secondary);
        transform: translateX(5px);
    }

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid #eee;
}

.dropdown-item span {
    font-weight: 700;
    color: var(--ncu-primary);
    background-color: var(--ncu-light-gray);
}
/* Flip Card */



.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-link-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flip-link-front {
    transform: rotateY(0deg);
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .theme-selector {
        right: 10px;
        padding: 10px;
    }

    .theme-option {
        width: 30px;
        height: 30px;
        margin: 3px;
    }
}
