* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
}

/* ===== THEME BACKGROUNDS ===== */
.theme-dark {
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 50%, #0f0f1e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #ffffff;
}

.theme-light {
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 50%, #f0f4f8 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #1a202c;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Theme Text Colors */
.theme-dark .text-primary { color: #ffffff; }
.theme-light .text-primary { color: #1a202c; }
.theme-dark .text-secondary { color: #d1d5db; }
.theme-light .text-secondary { color: #4b5563; }

/* Glass Effect */
.theme-dark .glass-effect {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(10px);
}

.theme-light .glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.theme-light nav {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* ===== LIGHT MODE TIMELINE FIX ===== */
.theme-light .timeline-item h3 {
    color: #1a202c !important;
}

.theme-light .timeline-item .text-white\/90 {
    color: #4b5563 !important;
}

.theme-light .timeline-item .glass-effect {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ===== TOGGLE SWITCH STYLES ===== */
.theme-toggle-container {
    position: relative;
    width: 64px;
    height: 34px;
    border-radius: 17px;
    background: linear-gradient(135deg, #1f1f1f, #2a2a2a);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.4s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(168, 85, 247, 0.6);
    overflow: hidden;
}

.theme-light .theme-toggle-container {
    background: linear-gradient(135deg, #e8e8e8, #f8f8f8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Hover glow effect */
.theme-toggle-container:hover {
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

/* Slider */
.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 3px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9e7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.45s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 3px 6px rgba(5, 160, 250, 0.3);
}

/* Position for dark mode */
.theme-toggle-slider.dark {
    left: 33px;
    top: 2px;
    background: #1f2937;
}

/* Icons inside slider */
.theme-toggle-slider img {
    width: 18px;
    height: 18px;
    position: absolute;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.theme-toggle-slider img.active {
    opacity: 1;
}

/* Optional subtle pulse */
.theme-toggle-container:hover .theme-toggle-slider {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

/* ===== MOBILE MENU STYLES ===== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-light .mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    z-index: 39;
    animation: slideDown 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-light .mobile-menu {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-links button {
    width: 100%;
    text-align: left;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-size: 1rem;
    font-weight: 500;
}

.mobile-menu-links button:hover {
    background: rgba(168, 85, 247, 0.2);
}

/* Falling Stars Animation - Only for Dark Mode */
@keyframes fall {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(-50px);
        opacity: 0;
    }
}

.falling-star {
    position: fixed;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: fall linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* Hide falling stars in light mode */
.theme-light .falling-star {
    display: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1a2e; }
.theme-light ::-webkit-scrollbar-track { background: #e2e8f0; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a855f7, #ec4899);
    border-radius: 4px;
}

html { scroll-behavior: smooth; }

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #c2a605, #a3a388, #0984f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    padding: 0.2em 0;
}

.gradient-member {
    background: linear-gradient(to right, #dddcdf, #3196d1, #9fdae6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    padding: 0.2em 0;
}

/* Hover Effects */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.4);
}

/* Modal Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFloat {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-10px);
    }
}

.modal-overlay { animation: fadeIn 0.3s ease; }
.modal-content { 
    animation: slideUp 0.4s ease, modalFloat 3s ease-in-out 0.4s infinite;
}

/* Modal Header Gradients */
.modal-header-wali {
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 25%, #9dd8d0 50%, #4a4a4a 75%, #1a1a1a 100%);
    background-size: 400% 400%;
    animation: gradient-rotate 8s ease infinite;
}

.modal-header-pengurus {
    background: linear-gradient(135deg, #6ff0e5 0%, #1606a7 25%, #30cfd0 50%, #c471ed 75%, #fa709a 100%);
    background-size: 400% 400%;
    animation: gradient-rotate 6s ease infinite;
}

.modal-header-anggota {
    background: linear-gradient(135deg, #ef4444 0%, #79a74f 25%, #94b116 50%, #5d3780 75%, #a85050 100%);
    background-size: 400% 400%;
    animation: gradient-rotate 7s ease infinite;
}

/* Image Zoom Effect */
.image-zoom {
    overflow: hidden;
    transition: transform 0.3s ease;
}

.image-zoom img {
    transition: transform 0.3s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Animated Gradient for Cards */
@keyframes gradient-rotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-card-gradient-wali {
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 25%, #9dd8d0 50%, #4a4a4a 75%, #1a1a1a 100%);
    background-size: 400% 400%;
    animation: gradient-rotate 8s ease infinite;
}
.animated-card-gradient-pengurus {
    background: linear-gradient(135deg, #6ff0e5 0%, #1606a7 25%, #30cfd0 50%, #c471ed 75%, #fa709a 100%);
    background-size: 400% 400%;
    animation: gradient-rotate 7s ease infinite;
}

.animated-card-gradient-anggota {
    background: linear-gradient(135deg, #ef4444 0%, #79a74f 25%, #94b116 50%, #5d3780 75%, #a85050 100%);
    background-size: 400% 400%;
    animation: gradient-rotate 9s ease infinite;
}

/* Pulse Glow */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(236, 72, 153, 0.8);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Slide In Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* Animated Text Gradient */
.animated-gradient {
    background: linear-gradient(270deg, #c2a605, #a3a388, #0984f7);
    background-size: 400% 400%;
    animation: gradient-rotate 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Page Transition - Different animations per page */
.page-transition {
    min-height: calc(100vh - 200px);
    position: relative;
    opacity: 1;
}

/* Home - Fade In */
.page-transition.page-home.transitioning {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* About - Slide from Right */
.page-transition.page-about.transitioning {
    animation: slideFromRight 0.8s ease-out;
}

@keyframes slideFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Members (Structure) - Slide from Bottom */
.page-transition.page-members.transitioning {
    animation: slideFromBottom 0.8s ease-out;
}

@keyframes slideFromBottom {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery - Slide from Bottom */
.page-transition.page-gallery.transitioning {
    animation: slideFromBottom 0.8s ease-out;
}

/* Timeline Card Animation */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(80px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-card {
    animation: slideUpFade 0.8s ease-out;
    animation-fill-mode: both;
}

.timeline-card > div:first-child {
    transition: transform 0.4s ease-in-out;
}

.timeline-card:hover > div:first-child {
    transform: scale(1.1);
}

.timeline-card:nth-child(1) { animation-delay: 0.1s; }
.timeline-card:nth-child(2) { animation-delay: 0.3s; }
.timeline-card:nth-child(3) { animation-delay: 0.5s; }
.timeline-card:nth-child(4) { animation-delay: 0.7s; }

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem !important; }
    
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Hide desktop nav */
    .desktop-nav {
        display: none !important;
    }
    
    /* Member cards mobile - 2 columns with smaller size */
    .members-grid-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .member-card-mobile {
        width: 100% !important;
        padding: 1rem !important;
    }
    
    .member-card-mobile .member-image {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .member-card-mobile h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .member-card-mobile p {
        font-size: 0.75rem !important;
    }
    
    /* Wali Kelas mobile - centered */
    .wali-card-mobile {
        width: 100% !important;
        max-width: 280px;
        margin: 0 auto 2rem auto;
    }
}

/* ===== NIGHT SKY BACKGROUND ANIMATION WITH AURORA ===== */
.theme-dark .night-sky {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, #1b1d4e 0%, #0b0c23 70%);
    overflow: hidden;
    z-index: 0;               
    pointer-events: none;     
}

/* Stars */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle 4s infinite ease-in-out;
    transform-origin: center;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* Shooting Stars (trail) */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0));
    border-radius: 2px;
    opacity: 0.95;
    transform: rotate(25deg);
    animation: shoot linear infinite;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

@keyframes shoot {
    0% {
        transform: translate(0, 0) rotate(25deg);
        opacity: 1;
        width: 2px;
    }
    60% {
        opacity: 1;
        width: 140px;
    }
    100% {
        transform: translate(700px, 350px) rotate(25deg);
        opacity: 0;
        width: 0;
    }
}

/* Aurora effect */
.aurora-layer {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 30% 70%, rgba(0, 255, 255, 0.18), transparent 55%),
      radial-gradient(circle at 70% 40%, rgba(153, 102, 255, 0.12), transparent 55%),
      radial-gradient(circle at 50% 90%, rgba(0, 200, 255, 0.08), transparent 60%);
    animation: auroraShift 20s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}

@keyframes auroraShift {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.7; }
    50%     { transform: translateY(-28px) scale(1.05); opacity: 1; }
}

/* Soft fog at bottom */
.fog-layer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(to top, rgba(8, 10, 20, 0.85), transparent);
    filter: blur(5px);
    pointer-events: none;
}

/* Hide night sky in light mode */
.theme-light .night-sky {
    display: none;
}

/* ===== LIGHT MODE SUNRISE–SUNSET ANIMATION ===== */
.theme-light .sunrise-sunset {
    position: fixed;
    inset: 0;
    background: linear-gradient(90deg, #a8e6ff 0%, #ffd9b3 25%, #ffb6c1 50%, #a8e6ff 100%);
    background-size: 400% 400%;
    animation: sunriseCycle 60s linear infinite;
    z-index: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

/* smooth fade when switching theme */
.theme-dark .sunrise-sunset {
    opacity: 0;
}

@keyframes sunriseCycle {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}