/* 🎨 MODERN PHYSICS LAB PORTAL - ADVANCED DESIGN */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Vibrant Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #14b8a6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Gradients */
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-6: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --gradient-7: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-8: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    
    /* Neon Colors */
    --neon-blue: #00f3ff;
    --neon-pink: #ff006e;
    --neon-green: #39ff14;
    --neon-purple: #bc13fe;
    
    /* Dark Mode */
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-border: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* 🌟 ANIMATED BACKGROUND */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 110, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 243, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(188, 19, 254, 0.3) 0%, transparent 50%);
    animation: bgMove 20s ease-in-out infinite;
}

@keyframes bgMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, -50px); }
}

/* 🎯 FLOATING PARTICLES */
.particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

/* 🚀 NAVIGATION - GLASSMORPHISM */
nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

nav a {
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-3);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* 🎨 HERO SECTION - EPIC */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #00f3ff 50%, #ff006e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 80px rgba(0, 243, 255, 0.5);
    animation: titleGlow 3s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.hero-subtitle {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* 🔥 GLOWING BUTTON */
.glow-button {
    position: relative;
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 50px rgba(102, 126, 234, 0.8), 0 0 80px rgba(102, 126, 234, 0.4); }
}

.glow-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.glow-button:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 0 50px rgba(102, 126, 234, 0.8), 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 🎴 CATEGORY CARDS - 3D EFFECT */
.category-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    overflow: hidden;
    transform-style: preserve-3d;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-20px) rotateX(5deg) rotateY(5deg) scale(1.05);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 50px rgba(102, 126, 234, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: iconFloat 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.category-card:hover .category-icon {
    animation: iconSpin 0.6s ease-in-out;
}

@keyframes iconSpin {
    0% { transform: rotateY(0); }
    100% { transform: rotateY(360deg); }
}

/* 🧪 LAB CARDS - MODERN DESIGN */
.lab-card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lab-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.lab-card:hover::before {
    left: 100%;
}

.lab-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(102, 126, 234, 0.3);
}

.lab-header {
    padding: 2rem;
    background: var(--gradient-1);
    color: white;
    position: relative;
    overflow: hidden;
}

.lab-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: headerPulse 4s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.lab-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.lab-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.3rem;
    animation: badgePop 0.5s ease-out;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.badge-school {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.badge-undergraduate {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.badge-advanced {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

/* 🎬 LAUNCH BUTTON */
.launch-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.launch-btn::before {
    content: '🚀';
    position: absolute;
    left: -30px;
    transition: left 0.3s ease;
}

.launch-btn:hover::before {
    left: 20px;
}

.launch-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* ⭐ BOOKMARK BUTTON */
.bookmark-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.bookmark-btn:hover {
    transform: scale(1.2) rotate(10deg);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.bookmark-btn.active {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    animation: bookmarkBounce 0.5s ease;
}

@keyframes bookmarkBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* 🔍 SEARCH BAR - FUTURISTIC */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 
        0 0 30px rgba(0, 243, 255, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.8rem 2rem;
    background: var(--gradient-3);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

/* 📊 STATS SECTION */
.stats-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stats-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--neon-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 🌙 DARK MODE */
.dark body {
    background: var(--dark-bg);
}

.dark .category-card,
.dark .lab-card {
    background: var(--dark-card);
    border-color: var(--dark-border);
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
}

/* ✨ LOADING ANIMATION */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 🎆 SCROLL ANIMATIONS */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 🎨 GRADIENT TEXT */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 🌟 NEON GLOW */
.neon-glow {
    text-shadow: 
        0 0 10px var(--neon-blue),
        0 0 20px var(--neon-blue),
        0 0 30px var(--neon-blue);
}

/* 🎬 IFRAME CONTAINER - FULL SIZE */
.iframe-container {
    position: relative;
    width: 100%;
    min-height: 80vh;
    height: 80vh;
    border-radius: 20px;
    overflow: hidden;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .iframe-container {
        min-height: 60vh;
        height: 60vh;
    }
}

/* 🎨 SELECT ELEMENTS STYLING */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

select option {
    background: #1e293b;
    color: white;
    padding: 0.5rem;
}

select option:hover,
select option:focus,
select option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Language selector specific */
#langSwitch option {
    background: #1e293b;
    color: white;
}

/* Category filter specific */
#categoryFilter option {
    background: #1e293b;
    color: white;
}
