* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --success: #10b981;
    --border-radius: 12px;
}

body.dark-mode {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --accent-color: #fbbf24;
    --text-dark: #f3f4f6;
    --text-light: #d1d5db;
    --bg-light: #1f2937;
    --white: #111827;
    --success: #34d399;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
}

/* Logo in navbar */
.nav-brand .nav-logo {
    height: 38px;
    width: auto;
    vertical-align: middle;
    border-radius: 6px;
    margin-right: 0.5rem;
}

.nav-brand .brand-text { display: inline-block; vertical-align: middle; }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.moon-icon {
    display: none;
}

body.dark-mode .sun-icon {
    display: none;
}

body.dark-mode .moon-icon {
    display: inline;
}

.birthday-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.birthday-content {
    text-align: center;
    z-index: 10;
    animation: fadeInUp 1s ease;
}

.birthday-image-container {
    margin-bottom: 2rem;
    animation: zoomIn 1s ease;
}

.birthday-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--white);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    animation: float 3s ease-in-out infinite;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.birthday-title {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 1rem;
    animation: bounceIn 1.2s ease;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.birthday-name {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    animation: slideInRight 1.5s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.birthday-emoji {
    font-size: 3rem;
    animation: pulse 2s infinite;
}

.wishes-section,
.videos-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.wishes-container {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.wishes-container::-webkit-scrollbar {
    width: 8px;
}

.wishes-container::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

.wishes-container::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.wishes-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.wish-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.6s ease;
}

.wish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.wish-name {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.wish-message {
    color: var(--text-light);
    font-style: italic;
}

.videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.video-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    animation: fadeIn 0.8s ease;
}

.video-card:hover {
    transform: scale(1.02);
}

.video-wrapper {
    position: relative;
    padding-bottom: 70%;
    height: 0;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-title {
    padding: 1rem;
    font-weight: bold;
    color: var(--text-dark);
}

.page-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.announcements-grid {
    display: grid;
    gap: 1.5rem;
}

.announcement-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.3s ease;
    position: relative;
}

.announcement-card.urgent {
    border-left-color: #ef4444;
}

.announcement-card:hover {
    transform: translateX(5px);
}

.announcement-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ef4444;
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.announcement-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.announcement-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.timetable-wrapper {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.timetable {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.timetable th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.timetable td {
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.time-slot {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--primary-color);
}

.class-cell {
    background: var(--white);
    transition: background 0.3s ease;
}

.class-cell:hover {
    background: #eff6ff;
}

.class-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.class-room {
    color: var(--text-light);
    font-size: 0.9rem;
}

.class-cell.break {
    background: #fef3c7;
    text-align: center;
    font-weight: 600;
    color: var(--accent-color);
}

.class-cell.lunch {
    background: #dcfce7;
    text-align: center;
    font-weight: 600;
    color: var(--success);
}

.class-cell.empty {
    background: var(--bg-light);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.notes-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notes-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.notes-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.notes-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.3rem;
}

.notes-list {
    list-style: none;
}

.notes-list li {
    margin-bottom: 0.8rem;
}

.notes-list a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
}

.notes-list a:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }

    .hamburger {
        display: flex;
        order: 2;
    }

    .theme-toggle {
        order: 3;
    }

    .nav-menu {
        order: 4;
        width: 100%;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        gap: 0;
        margin-top: 0;
    }

    .nav-menu.active {
        max-height: 300px;
        margin-top: 1rem;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 1rem;
    }
    
    .birthday-image {
        width: 150px;
        height: 150px;
    }

    .birthday-title {
        font-size: 2.5rem;
    }
    
    .birthday-name {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .videos-container {
        grid-template-columns: 1fr;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

/* About page specific styles */
.about-hero {
    background: linear-gradient(180deg, rgba(59,130,246,0.95) 0%, rgba(99,102,241,0.95) 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

.about-hero .about-hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.about-hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.about-hero .lead {
    color: rgba(255,255,255,0.95);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    padding: 0.65rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(59,130,246,0.18);
}

.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,0.95);
    padding: 0.65rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.12);
}

.about-container {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 2rem;
}

.download-section .download-card {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 2rem;
    align-items: center;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    margin-bottom: 2rem;
}

.download-card h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.download-btn {
    display: inline-block;
    background: linear-gradient(90deg,var(--primary-color),var(--secondary-color));
    color: var(--white);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
}

.btn-link {
    margin-left: 0.75rem;
    color: var(--secondary-color);
    text-decoration: none;
}

.team-section .team-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 2rem;
}

.profile-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(2,6,23,0.06);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    object-fit: cover;
    border: 4px solid rgba(99,102,241,0.08);
    margin-bottom: 0.75rem;
}

.profile-name {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.profile-role {
    color: var(--text-light);
    font-size: 0.95rem;
}

.section-subtitle { 
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.exec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.exec-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--white);
    padding: 0.9rem;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(2,6,23,0.04);
}

.exec-avatar {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(180deg,var(--secondary-color),var(--primary-color));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
}

.exec-name {
    font-weight: 700;
    color: var(--text-dark);
}

.exec-person {
    color: var(--text-light);
}

.past-exco {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.past-card {
    min-width: 260px;
    background: var(--white);
    padding: 0.9rem;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(2,6,23,0.04);
}

/* Small screens */
@media (max-width: 720px) {
    .download-section .download-card { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
}

/* Homepage hero with gears */
.home-hero {
    position: relative;
    min-height: 56vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: linear-gradient(180deg, #0f172a, #1f2937);
    color: var(--white);
    overflow: hidden;
}

.home-hero .gears {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0.12;
}

.gear { transform-origin: center; }
.gear-1 { animation: spin 18s linear infinite; }
.gear-2 { animation: spin-rev 28s linear infinite; }
.gear-3 { animation: spin 14s linear infinite; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spin-rev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

.hero-content { position: relative; z-index: 5; text-align: center; max-width: 900px; }
.hero-content h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero-content .hero-sub { margin-bottom: 1rem; color: rgba(255,255,255,0.85); }
.hero-cta { display:flex; gap: 1rem; justify-content:center; }

/* Background video styling */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: auto;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    filter: saturate(0.45) contrast(0.9) brightness(0.6);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2,6,23,0.35), rgba(2,6,23,0.5));
    z-index: 2;
}

/* Respect prefers-reduced-motion: hide/pause background video */
@media (prefers-reduced-motion: reduce) {
    .hero-video { display: none; }
    .home-hero { background: linear-gradient(180deg, #0f172a, #1f2937); }
}

/* Carousel */
.carousel-section { max-width: 1100px; margin: 2rem auto; padding: 0 1rem; position: relative; }
.carousel { position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 10px 30px rgba(2,6,23,0.08); }
.carousel-track { display: flex; transition: transform 0.5s ease; }
.carousel-slide { min-width: 100%; position: relative; }
.carousel-slide img { width: 100%; height: 420px; object-fit: cover; display: block; }
.carousel-caption { position: absolute; left: 1rem; bottom: 1rem; background: rgba(0,0,0,0.5); color: #fff; padding: 0.6rem 0.9rem; border-radius: 8px; max-width: 60%; }
.carousel-controls { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.9rem; }
.carousel-controls button { background: var(--white); border: none; padding: 0.5rem 0.8rem; border-radius: 8px; cursor: pointer; box-shadow: 0 6px 14px rgba(2,6,23,0.06); }

/* Features */
.features-section { max-width: 1100px; margin: 2rem auto; padding: 0 1rem 3rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1rem; }
.feature-card { background: var(--white); padding: 1.25rem; border-radius: 12px; box-shadow: 0 8px 30px rgba(2,6,23,0.06); }

@media (max-width: 720px) {
    .hero-content h1 { font-size: 1.7rem; }
    .carousel-slide img { height: 220px; }
}

/* Ensure hero heading is readable in dark-mode (force white text) */
body.dark-mode .home-hero h1,
body.dark-mode .home-hero .hero-sub {
    color: #ffffff;
}

/* Modern site footer */
.site-footer {
    background: linear-gradient(180deg,var(--primary-color),var(--secondary-color));
    color: var(--white);
    padding: 2.5rem 1rem;
}
.site-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    align-items: start;
}
.site-footer .footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.site-footer .footer-brand .nav-brand { font-size: 1.25rem; font-weight: 700; color: var(--white); }
.site-footer p { color: rgba(255,255,255,0.9); }
.site-footer h4 { margin-bottom: 0.5rem; color: rgba(255,255,255,0.95); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: rgba(255,255,255,0.95); text-decoration: none; display: inline-block; margin-bottom: 0.45rem; }
.site-footer a:hover { text-decoration: underline; }

.social-icons { display:flex; gap:0.5rem; margin-top:0.25rem; }
.social-icons a { width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; background: rgba(255,255,255,0.08); }
.social-icons svg { width:20px; height:20px; fill: white; }

.site-footer .footer-bottom { max-width:1200px; margin: 1.5rem auto 0; padding-top:1rem; border-top: 1px solid rgba(255,255,255,0.08); text-align:center; color: rgba(255,255,255,0.85); font-size:0.95rem; }

@media (max-width:520px) {
    .site-footer .footer-container { grid-template-columns: 1fr; }
    .social-icons a { width:36px; height:36px; }
}
