@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-dark: #050508;
    --glass-bg: rgba(15, 15, 22, 0.65);
    --glass-border: rgba(255, 91, 14, 0.12);
    --glass-border-hover: rgba(255, 91, 14, 0.35);
    --glass-focus: rgba(255, 91, 14, 0.2);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #ff5b0e;
    --accent-hover: #ff7836;
    --accent-glow: rgba(255, 91, 14, 0.25);
    --accent-gradient: linear-gradient(135deg, #ff5b0e, #ff8038);
    --dark-gradient: linear-gradient(180deg, #0d0d12, #050508);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 91, 14, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

body {
    background-color: var(--bg-dark);
    background-image: var(--dark-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

/* Custom selection */
::selection {
    background: rgba(255, 91, 14, 0.3);
    color: #fff;
}

/* Dynamic Floating Glow Blobs */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.45;
    animation: floatAnimation 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 91, 14, 0.25);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(245, 158, 11, 0.15);
    animation-delay: -5s;
    animation-duration: 25s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 450px;
    height: 450px;
    background: rgba(255, 91, 14, 0.1);
    animation-delay: -10s;
    animation-duration: 30s;
}

@keyframes floatAnimation {
    0% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(60px, -40px) scale(1.1);
    }
    66% {
        transform: translate(-40px, 50px) scale(0.9);
    }
    100% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

/* Premium Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.3s ease, 
                box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 16px 48px 0 rgba(255, 91, 14, 0.15), 
                0 0 1px 1px rgba(255, 91, 14, 0.2) inset, 
                0 8px 32px 0 rgba(0, 0, 0, 0.7);
}

/* Global Navigation Layout */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 91, 14, 0.15);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-section h1 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, var(--accent), #ffaa7a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 91, 14, 0.2);
}

.nav-logo {
    height: 3rem;
    border-radius: 50%;
    border: 2px solid var(--accent);
    padding: 2px;
    background: var(--bg-dark);
    box-shadow: 0 0 15px rgba(255, 91, 14, 0.3);
    transition: transform 0.5s ease;
}

.logo-section:hover .nav-logo {
    transform: rotate(360deg);
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: rgba(255, 91, 14, 0.08);
    border-color: rgba(255, 91, 14, 0.25);
    box-shadow: 0 4px 12px rgba(255, 91, 14, 0.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    padding: 8px;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--accent);
}

/* Main Container Space */
main {
    max-width: 1200px;
    margin: 110px auto 50px auto;
    padding: 0 24px;
    min-height: calc(100vh - 230px);
    position: relative;
    z-index: 1;
}

/* Section Header Typography */
.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, #ff8038 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Footer Styling */
footer {
    border-top: 1px solid rgba(255, 91, 14, 0.15);
    background: rgba(3, 3, 5, 0.95);
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

footer span {
    color: var(--accent);
    font-weight: 700;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Form inputs, select fields */
input, select, textarea {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 16px;
    outline: none;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    background: rgba(25, 25, 35, 0.85);
}

/* Global desktop-only default */
.desktop-only {
    display: inline;
}

/* Responsiveness adjustments */
@media (max-width: 968px) {
    .desktop-only {
        display: none !important;
    }
    
    /* Layout & Spacing */
    main {
        margin-top: 90px;
        padding: 0 16px;
        min-height: calc(100vh - 200px);
    }
    
    .glass-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    /* Section Headers */
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    /* Navigation Adjustments */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        flex-direction: column;
        background: rgba(5, 5, 8, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 16px;
        gap: 6px;
        border-bottom: 1px solid rgba(255, 91, 14, 0.2);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }
    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }
    .nav-links li {
        width: 100%;
    }
    .nav-links a {
        display: block;
        width: 100%;
        padding: 12px 16px;
    }
    .menu-toggle {
        display: block;
    }
    
    /* Grid Adjustments */
    .core-members {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
        gap: 16px !important;
    }
    .notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
        gap: 16px !important;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 16px !important;
    }
    
    /* Table Adjustments */
    th, td {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    /* Filter Selects */
    .filter-select {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    /* Notes card alignment */
    .note-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        text-align: center;
    }
    .note-card .download-btn {
        justify-content: center;
        width: 100%;
    }
    
    /* PYQ Selects stretching */
    .filter-wrapper {
        gap: 12px;
    }
    .filter-select {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }
    
    /* Lightbox modal responsiveness */
    .lightbox img {
        max-width: 95%;
        max-height: 70vh;
    }
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    /* Header layout */
    .nav-container {
        padding: 10px 16px;
    }
    .logo-section h1 {
        font-size: 0.95rem;
    }
    .nav-logo {
        height: 2.5rem;
    }
    
    /* Section headers */
    .section-title {
        font-size: 1.6rem;
    }
    
    /* About page core members vertical layout */
    .core-member {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 16px;
    }
    .core-member img {
        width: 80px;
        height: 80px;
    }
    
    /* Timeline adjustments to save horizontal space */
    .timeline::before {
        left: 15px;
    }
    .timeline-dot {
        left: 6px;
        top: 28px;
    }
    .timeline-event {
        padding-left: 32px;
        margin-bottom: 24px;
    }
    
    /* Quiz Box Action spacing */
    .action-row {
        flex-direction: column;
        gap: 12px;
    }
    .quiz-nav-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Modal container */
    .modal-content {
        width: calc(100% - 32px);
        margin: 16px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}