* {
    /* border: 1px solid red !important; */
}

:root {
    --main-color: #43ff35;
    --color-brand-dark: #193142;
    --color-brand-gray: #595c5e;
    /* RGB values will be set dynamically by JavaScript */
    --main-color-rgb: 27, 34, 233;
    --light-bg-color: rgba(var(--main-color-rgb), 0.1);
    --medium-bg-color: rgba(var(--main-color-rgb), 0.2);
    --strong-bg-color: rgba(var(--main-color-rgb), 0.8);
}

/* Dark theme variables */
.dark-theme {
    --color-brand-dark: #1a202c;
    --color-brand-gray: #a0aec0;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e0;
    --border-color: #4a5568;
}

/* Light theme variables */
.light-theme {
    --color-brand-dark: #193142;
    --color-brand-gray: #595c5e;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --text-primary: #193142;
    --text-secondary: #595c5e;
    --border-color: #e2e8f0;
}

body {
    font-family: "Almarai", sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, direction 0.3s ease;
}

/* Language direction transitions */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="ltr"] {
    direction: ltr;
}

/* Smooth transitions for all elements when direction changes */
* {
    transition: margin 0.3s ease, padding 0.3s ease, text-align 0.3s ease;
}

/* Language dropdown styles */
.language-dropdown-container {
    position: relative;
}

.language-dropdown-container button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

#languageDropdown {
    animation: fadeIn 0.2s ease-out;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#languageDropdown button {
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#languageDropdown button:hover {
    background-color: #f9fafb;
    transform: translateX(-2px);
}

#languageDropdown button.active {
    background-color: rgba(var(--main-color-rgb), 0.1);
    color: var(--main-color);
}

/* User Profile Dropdown Styles */
.relative {
    position: relative;
}

#userDropdown {
    animation: fadeIn 0.2s ease-out;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#userDropdown a,
#userDropdown button {
    transition: all 0.2s ease;
    border-radius: 6px;
}

#userDropdown a:hover,
#userDropdown button:hover {
    background-color: #f8fafc;
    transform: translateX(-2px);
}

#userDropdown .border-t {
    border-color: #e5e7eb;
}

/* User Avatar Gradient */
.bg-gradient-to-r {
    background: linear-gradient(to right, var(--main-color), var(--color-brand-dark));
}

/* Dropdown arrow animation */
#languageDropdownArrow,
#userDropdownArrow {
    transition: transform 0.2s ease;
}

/* User Profile Section Transitions */
#authButtons,
#userProfileSection {
    transition: all 0.3s ease;
}

/* Notification Toast Styles */
.fixed.top-4.right-4 {
    max-width: 300px;
    word-wrap: break-word;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* RTL adjustments for dropdown */
html[dir="rtl"] #languageDropdown {
    right: 0;
    left: auto;
}

html[dir="rtl"] #languageDropdown button {
    text-align: right;
}

html[dir="rtl"] #languageDropdown button:hover {
    transform: translateX(2px);
}

/* Dark theme support for dropdown */
.dark-theme #languageDropdown {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.dark-theme #languageDropdown button {
    color: var(--text-secondary);
}

.dark-theme #languageDropdown button:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.dark-theme #languageDropdown button.active {
    background-color: rgba(var(--main-color-rgb), 0.2);
    color: var(--main-color);
}

/* Language switcher specific styles */
.language-switcher {
    transition: all 0.2s ease;
}

.language-switcher button {
    transition: all 0.2s ease;
}

.language-switcher button.active {
    background-color: #3b82f6;
    color: white;
}

.language-switcher button.inactive {
    background-color: #e5e7eb;
    color: #374151;
}

.language-switcher button.inactive:hover {
    background-color: #d1d5db;
}

.dark-theme body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.light-theme body {
    background-color: #f7fafc;
    color: var(--text-primary);
}

.font-fasthand {
    font-family: "Fasthand", cursive;
}

.font-almarai {
    font-family: "Almarai", sans-serif;
}

.font-poppins {
    font-family: "Poppins", sans-serif;
}

/* Header/Navbar theme styles - Now inside hero */
.header-container {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.dark-theme .header-container {
    background-color: rgba(26, 32, 44, 0.85);
    border: 1px solid rgba(74, 85, 104, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.light-theme .header-container {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark-theme .course-selection-section,
.dark-theme .academic-classes-section {
    background-color: var(--bg-secondary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.light-theme .course-selection-section,
.light-theme .academic-classes-section {
    background-color: white;
    /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); */
}

/* Theme switcher button styles */
.theme-switcher {
    position: relative;
    width: 60px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    padding: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dark-theme .theme-switcher {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-color: var(--main-color);
}

.theme-switcher-toggle {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    transform: translateX(-22px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-theme .theme-switcher-toggle {
    transform: translateX(0px);
    background: #1a202c;
}

.theme-switcher svg {
    width: 14px;
    height: 14px;
    transition: all 0.3s ease;
}

.theme-icon-sun {
    color: #f6ad55;
    opacity: 1;
}

.theme-icon-moon {
    color: #90cdf4;
    opacity: 0;
}

.dark-theme .theme-icon-sun {
    opacity: 0;
}

.dark-theme .theme-icon-moon {
    opacity: 1;
}

/* Mobile theme switcher */
.mobile-theme-button {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.mobile-theme-button:hover {
    background: var(--main-color);
    color: white;
}

/* Footer specific styles */
.footer-container {
    background-color: var(--color-brand-dark);
}

.vclasses-logo {
    width: 210px;
    height: auto;
    aspect-ratio: 97/91;
}

.social-link:hover .w-19 {
    transform: scale(1.1);
}

.atom-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

/* Mobile screens - show only logo and hamburger menu */
@media (max-width: 640px) {
    .header-nav {
        padding: 0.25rem;
    }

    .header-container {
        padding: 0.5rem;
        min-height: 52px;
    }

    /* Hide icon buttons and action buttons on mobile */
    .icon-buttons-section,
    .action-buttons-mobile {
        display: none !important;
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block !important;
    }

    .nav-logo {
        max-width: 110px;
    }

    .theme-switcher {
        width: 50px;
        height: 28px;
    }

    .theme-switcher-toggle {
        width: 20px;
        height: 20px;
    }

    .dark-theme .theme-switcher-toggle {
        transform: translateX(0px);
    }



    /* Footer responsive styles */
    .text-section {
        flex-direction: column;
        gap: 1rem;
    }

    .atom-icon {
        width: 28px;
        height: 28px;
    }

    .arabic-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Social icons mobile adjustments - overridden by new responsive system */
    .social-icons {
        gap: 1rem !important;
        flex-wrap: wrap;
        justify-content: center;
    }

    .vclasses-logo {
        width: 160px;
    }
}

/* Mobile menu styles */
.mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    background-color: var(--bg-primary);
}

.mobile-menu.open {
    transform: translateY(0);
}

.dark-theme .mobile-menu {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.hamburger-line {
    transition: all 0.3s ease;
    background-color: var(--main-color);
}

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

.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

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

/* Mobile menu navigation links styles */
.nav-link {
    border: 1px solid transparent;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.nav-link:hover {
    border-color: var(--main-color);
    box-shadow: 0 4px 12px rgba(233, 27, 27, 0.1);
    background-color: var(--main-color);
    color: white;
}

.mobile-menu-btn:hover {
    transform: translateY(-2px);
}

.mobile-menu-btn:active {
    transform: translateY(0);
}

/* Add ripple effect for mobile menu items */
.nav-link:active {
    background: var(--light-bg-color);
}

.bg-orange-50 {
    background-color: var(--light-bg-color) !important;
}

/* Additional dynamic background classes */
.bg-main-light {
    background-color: var(--light-bg-color) !important;
}

.bg-main-medium {
    background-color: var(--medium-bg-color) !important;
}

.bg-main-strong {
    background-color: var(--strong-bg-color) !important;
}

.chemistry-success-image {
    fill: var(--main-color) !important;
}

/* Dark theme specific section backgrounds */
.dark-theme .hero-section {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.dark-theme .features-section {
    background-color: var(--bg-primary);
}

.dark-theme .feature-card {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Text color adjustments for dark theme */
.dark-theme .text-brand-dark {
    color: var(--text-primary) !important;
}

.dark-theme .text-brand-gray {
    color: var(--text-secondary) !important;
}

/* Hero section dark theme improvements */
.dark-theme .hero-section {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
}

.dark-theme .hero-section .bg-gradient-to-br {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
}

.dark-theme .hero-section .bg-white\/40 {
    background: rgba(26, 32, 44, 0.8) !important;
}

.dark-theme .hero-section h1 .text-brand-dark {
    color: #e2e8f0 !important;
}

.dark-theme .hero-section p.text-brand-gray {
    color: #cbd5e0 !important;
}

/* Enhanced dark mode hero text visibility */
.hero-text-primary {
    color: var(--color-brand-dark);
    transition: color 0.3s ease;
}

.dark-theme .hero-text-primary {
    color: #e2e8f0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text-secondary {
    color: var(--color-brand-gray);
    transition: color 0.3s ease;
}

.dark-theme .hero-text-secondary {
    color: #cbd5e0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hero background container adaptive styling */
.hero-bg-container {
    background: linear-gradient(to bottom right, #f7fafc 0%, #edf2f7 100%);
    transition: all 0.3s ease;
}

.dark-theme .hero-bg-container {
    background: linear-gradient(to bottom right, #2d3748 0%, #1a202c 100%);
}

/* Hero background image adaptive styling */
.hero-background-image {
    opacity: 0.9;
    filter: brightness(1.1) contrast(1.05);
    transition: all 0.3s ease;
}

.dark-theme .hero-background-image {
    opacity: 0.8;
    filter: brightness(0.8) contrast(1.1) sepia(0.05);
}

/* Hero overlay improvements for dark theme */
.hero-overlay {
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.3s ease;
}

.dark-theme .hero-overlay {
    background: rgba(26, 32, 44, 0.3) !important;
}

@media (min-width: 640px) {
    .hero-overlay {
        background: rgba(255, 255, 255, 0.3);
    }

    .dark-theme .hero-overlay {
        background: rgba(26, 32, 44, 0.25) !important;
    }
}

@media (min-width: 1024px) {
    .hero-overlay {
        background: rgba(255, 255, 255, 0.2);
    }

    .dark-theme .hero-overlay {
        background: rgba(26, 32, 44, 0.2) !important;
    }
}

/* ===== COMPREHENSIVE ANIMATION SYSTEM ===== */

/* Core Animation Keyframes */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes floatGentle {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes rotateGentle {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes orbitalRotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounceHover {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

/* Text Animation Keyframes */
@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRotate {
    0% {
        opacity: 0;
        transform: rotate(-15deg) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Text Animation Classes */
.animated-text {
    transition: all 0.3s ease;
}

.animated-icon {
    transition: all 0.3s ease;
}

/* Animation application classes */
.slide-in-up {
    animation: slideInUp 1s ease-out 0.5s forwards;
}

.fade-in-rotate-1 {
    animation: fadeInRotate 1s ease-out 1s forwards;
}

.fade-in-rotate-2 {
    animation: fadeInRotate 1s ease-out 1.2s forwards;
}

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

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

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

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(233, 27, 27, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(233, 27, 27, 0.6), 0 0 30px rgba(233, 27, 27, 0.4);
    }
}

/* Chemistry Success Section Animations */
.chemistry-molecule-1 {
    animation: chemistryFloat1 15s ease-in-out infinite;
    transform-origin: center;
}

.chemistry-molecule-2 {
    animation: chemistryFloat2 18s ease-in-out infinite;
    transform-origin: center;
}

.floating-atoms {
    animation: atomicDrift 12s linear infinite;
}

.reaction-arrows {
    animation: reactionPulse 8s ease-in-out infinite;
}

.energy-waves {
    animation: energyFlow 20s linear infinite;
}

/* Keyframe Animations for Chemistry Elements */
@keyframes chemistryFloat1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(15px, -10px) rotate(90deg);
    }

    50% {
        transform: translate(10px, 15px) rotate(180deg);
    }

    75% {
        transform: translate(-5px, 5px) rotate(270deg);
    }
}

@keyframes chemistryFloat2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-12px, 8px) rotate(120deg);
    }

    66% {
        transform: translate(8px, -12px) rotate(240deg);
    }
}

@keyframes atomicDrift {
    0% {
        transform: translateX(0px);
    }

    50% {
        transform: translateX(20px);
    }

    100% {
        transform: translateX(0px);
    }
}

@keyframes reactionPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes energyFlow {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        transform: translateX(100px);
        opacity: 0;
    }
}

/* Molecular bond animations */
@keyframes bondPulse {

    0%,
    100% {
        stroke-width: 2;
        opacity: 0.5;
    }

    50% {
        stroke-width: 4;
        opacity: 0.8;
    }
}

/* Enhance existing animations for chemistry theme */
.chemistry-success-section {
    position: relative;
    overflow: hidden;
}

.chemistry-success-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(67, 255, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(25, 49, 66, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: chemicalReaction 25s ease-in-out infinite;
}

@keyframes chemicalReaction {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1) rotate(180deg);
        opacity: 0.8;
    }
}

/* SVG-Specific Animations */
.chemistry-flask-icon {
    animation: flaskRotateScale 10s ease-in-out infinite, rotateGentle 8s linear infinite, floatGentle 3s ease-in-out infinite;
    transform-origin: center center;
}

.chemistry-flask-icon:hover {
    animation: flaskRotateScaleFast 2s ease-in-out infinite, rotateGentle 2s linear infinite, float 1s ease-in-out infinite;
}

.atom-icon {
    animation: atomRotateScale 8s ease-in-out infinite, orbitalRotation 6s linear infinite, pulse 4s ease-in-out infinite;
    transform-origin: center center;
}

.atom-icon:hover {
    animation: atomRotateScaleFast 2s ease-in-out infinite, orbitalRotation 2s linear infinite, pulse 1s ease-in-out infinite;
}

.science-icon {
    transition: all 0.3s ease;
    animation: floatGentle 4s ease-in-out infinite;
}

.science-icon:hover {
    animation: bounceHover 0.6s ease, floatGentle 4s ease-in-out infinite;
    transform: scale(1.1);
}

.nav-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(233, 27, 27, 0.3));
}

.arrow-icon {
    animation: shake 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.arrow-icon:hover {
    animation: shake 0.5s ease-in-out infinite;
    transform: translateX(5px);
}

/* Section Entrance Animations */
.hero-section {
    animation: fadeIn 1s ease-out;
}

.hero-content {
    animation: slideInLeft 1s ease-out 0.3s both;
}

.hero-profile {
    animation: slideInRight 1s ease-out 0.6s both;
}

.hero-buttons {
    animation: slideInUp 1s ease-out 0.9s both;
}

.features-section .feature-card {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.8s ease-out forwards;
}

.features-section .feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.features-section .feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.features-section .feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.features-section .feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

.course-selection-section {
    animation: slideInUp 1s ease-out;
}

.course-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.course-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); */
}

.academic-classes-section .class-card {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.6s ease-out forwards;
}

.academic-classes-section .class-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.academic-classes-section .class-card:nth-child(even) {
    animation-delay: 0.2s;
}

.footer-container {
    animation: slideInUp 1s ease-out;
}

/* SVG Path Drawing Animation */
.lines-svg {
    pointer-events: none;
    transition: transform 0.3s ease;
}

.lines-svg:hover {
    transform: scale(1.02);
}

.lines-svg path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    opacity: 0;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    stroke-width: 1.5;
    animation: drawPathCSS 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* CSS-only animation as fallback */
@keyframes drawPathCSS {
    0% {
        stroke-dashoffset: 2000;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Responsive stroke width */
@media (max-width: 768px) {
    .lines-svg path {
        stroke-width: 1;
    }
}

/* === HEXAGON GRID BACKGROUND STYLES === */

/* Container for the background SVG */
#svg-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Place it behind the content */
    opacity: 0.4;
    /* Opacity for the background effect */
    pointer-events: none;
    /* Prevent interaction with background */
    animation: background-float 20s ease-in-out infinite;
}

#chemistry-svg {
    width: 100%;
    height: 100%;
}

/* --- SVG Element Styles --- */

/* Style for the hexagon fills that will be highlighted */
.hexagon-fill {
    fill: white;
    stroke: none;
    opacity: 0;
    /* Start invisible */
    animation: highlight 6s ease-in-out infinite, fill-breathe 8s ease-in-out infinite;
    transform-origin: center;
}

/* Style for the hexagon lines (strokes) */
.hexagon-path {
    fill: none;
    stroke: url(#sw-gradient);
    stroke-width: 2.5;
    /* Increased for better proportion */
    stroke-linecap: round;
    stroke-dasharray: 900;
    /* Adjusted for new larger size */
    stroke-dashoffset: 900;
    animation: draw-line-infinite 4s ease-in-out infinite;
}

/* Glowing nodes removed per user request */

/* Update SVG gradient dynamically to match theme */
#chemistry-svg #sw-gradient stop:first-child {
    stop-color: var(--main-color);
}

#chemistry-svg #sw-gradient stop:last-child {
    stop-color: var(--main-color);
    stop-opacity: 0.7;
}

/* --- Keyframe Animations --- */

/* Animation to "draw" the lines of the hexagons */
@keyframes draw-line {
    to {
        stroke-dashoffset: 0;
    }
}

/* Infinite drawing animation for continuous effect */
@keyframes draw-line-infinite {
    0% {
        stroke-dashoffset: 900;
        opacity: 0.3;
    }

    25% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    75% {
        stroke-dashoffset: -900;
        opacity: 0.7;
    }

    100% {
        stroke-dashoffset: -1800;
        opacity: 0.3;
    }
}

/* Node glow animation removed per user request */

/* Animation for the randomly highlighted cells */
@keyframes highlight {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 0.7;
        /* White fill becomes visible */
    }
}

/* Infinite floating animation for background container */
@keyframes background-float {

    0%,
    100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.4;
    }

    25% {
        transform: translateY(-10px) translateX(5px) scale(1.01);
        opacity: 0.5;
    }

    50% {
        transform: translateY(0px) translateX(10px) scale(1);
        opacity: 0.4;
    }

    75% {
        transform: translateY(10px) translateX(5px) scale(0.99);
        opacity: 0.35;
    }
}

/* Node orbit animation removed per user request */

/* Breathing animation for hexagon fills */
@keyframes fill-breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Dark theme adjustments for hexagon grid */
.dark-theme .hexagon-path {
    stroke: var(--main-color);
    opacity: 0.6;
}

.dark-theme .hexagon-fill {
    fill: rgba(255, 255, 255, 0.1);
}

.dark-theme #svg-background-container {
    opacity: 0.3;
}

/* Mobile optimization for hexagon grid */
@media (max-width: 768px) {
    #svg-background-container {
        opacity: 0.3;
    }

    .hexagon-path {
        stroke-width: 1;
    }
}

/* Course Selection Section Background Pattern */
.course-selection-bg-pattern {
    position: relative;
    background:
        radial-gradient(circle at 25% 25%, rgba(var(--main-color-rgb), 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(var(--main-color-rgb), 0.05) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(var(--main-color-rgb), 0.02) 30%, rgba(var(--main-color-rgb), 0.02) 70%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(var(--main-color-rgb), 0.02) 30%, rgba(var(--main-color-rgb), 0.02) 70%, transparent 70%);
    background-size: 120px 120px, 120px 120px, 40px 40px, 40px 40px;
    background-position: 0 0, 60px 60px, 0 0, 20px 20px;
    animation: patternDriftSlow 25s ease-in-out infinite, patternPulseSoft 15s ease-in-out infinite;
}

.course-selection-bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 8px,
            rgba(var(--main-color-rgb), 0.01) 8px,
            rgba(var(--main-color-rgb), 0.01) 16px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 8px,
            rgba(var(--main-color-rgb), 0.01) 8px,
            rgba(var(--main-color-rgb), 0.01) 16px
        );
    pointer-events: none;
    z-index: 1;
    animation: gridFloatGentle 20s ease-in-out infinite;
    opacity: 0.6;
}

.course-selection-bg-pattern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(var(--main-color-rgb), 0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(var(--main-color-rgb), 0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 10%, rgba(var(--main-color-rgb), 0.02) 0%, transparent 30%),
        radial-gradient(ellipse at 10% 90%, rgba(var(--main-color-rgb), 0.02) 0%, transparent 30%);
    background-size: 200px 150px, 180px 160px, 100px 80px, 120px 90px;
    pointer-events: none;
    z-index: 1;
    animation: floatingOrbs 30s ease-in-out infinite;
}

.course-selection-bg-pattern > div {
    position: relative;
    z-index: 2;
}

/* Smooth slow animation keyframes */
@keyframes patternDriftSlow {
    0%, 100% {
        background-position: 0 0, 60px 60px, 0 0, 20px 20px;
        transform: translateX(0) translateY(0);
    }
    25% {
        background-position: 10px 5px, 70px 65px, 5px 3px, 25px 23px;
        transform: translateX(2px) translateY(1px);
    }
    50% {
        background-position: 15px 10px, 75px 70px, 8px 6px, 28px 26px;
        transform: translateX(3px) translateY(2px);
    }
    75% {
        background-position: 8px 12px, 68px 72px, 4px 8px, 24px 28px;
        transform: translateX(1px) translateY(3px);
    }
}

@keyframes patternPulseSoft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes gridFloatGentle {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    33% {
        transform: translateX(2px) translateY(-1px) rotate(0.2deg);
        opacity: 0.4;
    }
    66% {
        transform: translateX(-1px) translateY(2px) rotate(-0.1deg);
        opacity: 0.7;
    }
}

@keyframes floatingOrbs {
    0%, 100% {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translateX(5px) translateY(-3px) scale(1.02);
        opacity: 0.6;
    }
    50% {
        transform: translateX(3px) translateY(4px) scale(0.98);
        opacity: 0.9;
    }
    75% {
        transform: translateX(-2px) translateY(2px) scale(1.01);
        opacity: 0.7;
    }
}

/* Dark theme adjustments for course selection pattern */
.dark-theme .course-selection-bg-pattern {
    background:
        radial-gradient(circle at 25% 25%, rgba(var(--main-color-rgb), 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(var(--main-color-rgb), 0.08) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(var(--main-color-rgb), 0.03) 30%, rgba(var(--main-color-rgb), 0.03) 70%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(var(--main-color-rgb), 0.03) 30%, rgba(var(--main-color-rgb), 0.03) 70%, transparent 70%);
}

.dark-theme .course-selection-bg-pattern::after {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(var(--main-color-rgb), 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(var(--main-color-rgb), 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 10%, rgba(var(--main-color-rgb), 0.04) 0%, transparent 30%),
        radial-gradient(ellipse at 10% 90%, rgba(var(--main-color-rgb), 0.04) 0%, transparent 30%);
}

/* Reduced motion accessibility support */
@media (prefers-reduced-motion: reduce) {
    #svg-background-container {
        animation: none;
    }

    .hexagon-path {
        animation: none;
        stroke-dashoffset: 0;
        opacity: 0.7;
    }

    .hexagon-fill {
        animation: none;
        opacity: 0.3;
    }
}

/* Individual path animation delays */
.lines-svg path:nth-child(1) {
    animation-delay: 0.2s;
}

.lines-svg path:nth-child(2) {
    animation-delay: 0.5s;
}

.lines-svg path:nth-child(3) {
    animation-delay: 0.8s;
}

.lines-svg path:nth-child(4) {
    animation-delay: 1.1s;
}

.lines-svg path:nth-child(5) {
    animation-delay: 1.4s;
}

.lines-svg path:nth-child(6) {
    animation-delay: 1.7s;
}

.lines-svg path:nth-child(7) {
    animation-delay: 2.0s;
}

.lines-svg path:nth-child(8) {
    animation-delay: 2.3s;
}

/* Glow effect for completed paths */
.lines-svg path.drawn {
    filter: drop-shadow(0 0 8px var(--main-color));
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% {
        filter: drop-shadow(0 0 8px var(--main-color));
        opacity: 0.8;
    }

    100% {
        filter: drop-shadow(0 0 15px var(--main-color));
        opacity: 1;
    }
}

/* Loading animation for better UX */
.lines-svg.loading path {
    stroke: #ddd;
    opacity: 0.3;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .lines-svg path {
        transition: none !important;
        animation: none !important;
    }

    .lines-svg:hover {
        transform: none !important;
    }

    .lines-svg path.drawn {
        animation: none !important;
        filter: drop-shadow(0 0 8px var(--main-color));
    }
}

.social-icon {
    animation: floatGentle 3s ease-in-out infinite;
    transition: all 0.3s ease;
    border-radius: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    cursor: pointer;
}

/* Social Icons Responsive Sizes */
.social-icon {
    /* Default mobile size (320px+) */
    width: 48px !important;
    height: 48px !important;
}

/* Small mobile (480px+) */
@media (min-width: 480px) {
    .social-icon {
        width: 52px !important;
        height: 52px !important;
    }
}

/* Large mobile / Small tablet (640px+) */
@media (min-width: 640px) {
    .social-icon {
        width: 56px !important;
        height: 56px !important;
    }
}

/* Tablet (768px+) */
@media (min-width: 768px) {
    .social-icon {
        width: 64px !important;
        height: 64px !important;
    }
}

/* Large tablet / Small desktop (1024px+) */
@media (min-width: 1024px) {
    .social-icon {
        width: 72px !important;
        height: 72px !important;
    }
}

/* Desktop (1280px+) */
@media (min-width: 1280px) {
    .social-icon {
        width: 80px !important;
        height: 80px !important;
    }
}

.social-icon:nth-child(1) {
    animation-delay: 0s;
}

.social-icon:nth-child(2) {
    animation-delay: 0.5s;
}

.social-icon:nth-child(3) {
    animation-delay: 1s;
}

.social-icon:hover {
    transform: scale(1.15) translateY(-8px);
    animation: float 1s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

/* Social Links */
.social-link {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 16px;
    padding: 8px;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.social-link:focus {
    outline: 2px solid var(--main-color);
    outline-offset: 2px;
}

/* Social Icons Container */
.social-icons {
    /* Default mobile spacing */
    gap: 1rem !important;
}

/* Small mobile (480px+) */
@media (min-width: 480px) {
    .social-icons {
        gap: 1.25rem !important;
    }
}

/* Large mobile / Small tablet (640px+) */
@media (min-width: 640px) {
    .social-icons {
        gap: 1.5rem !important;
    }
}

/* Tablet (768px+) */
@media (min-width: 768px) {
    .social-icons {
        gap: 2rem !important;
    }
}

/* Large tablet / Small desktop (1024px+) */
@media (min-width: 1024px) {
    .social-icons {
        gap: 2.5rem !important;
    }
}

/* Desktop (1280px+) */
@media (min-width: 1280px) {
    .social-icons {
        gap: 2.75rem !important;
    }
}

/* Extra small devices (phones, 320px and up) */
@media (max-width: 480px) {
    .social-icons {
        gap: 0.75rem !important;
        padding: 1rem 0;
    }

    .social-icon {
        width: 44px !important;
        height: 44px !important;
    }

    .social-link {
        padding: 6px;
    }

    .social-link:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .social-icon {
        animation: none !important;
    }

    .social-icon:hover {
        animation: none !important;
        transform: scale(1.05) !important;
    }
}

/* Enhanced 3D Effects */
.card-3d {
    perspective: 1000px;
}

.card-3d-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(10deg) rotateX(5deg);
}

/* Mobile Optimization */
@media (max-width: 768px) {

    .chemistry-flask-icon,
    .atom-icon,
    .science-icon {
        animation-duration: 6s;
    }

    .hero-content,
    .hero-profile,
    .hero-buttons {
        animation-duration: 0.8s;
    }

    .course-card:hover {
        transform: translateY(-5px);
    }
}

/* Intersection Observer Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Glow Effects */
.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--main-color), transparent, var(--main-color));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.glow-effect:hover::before {
    opacity: 0.3;
    animation: glowPulse 2s ease-in-out infinite;
}

/* Custom Animation Delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Mobile App Download Section Styles - Enhanced with Animations */
.mobile-app-figma-section {
    min-height: 520px;
    position: relative;
    overflow: hidden;
}

.dark-theme .mobile-app-figma-section {
    /* Keep the same background for dark theme to maintain design integrity */
}

/* Advanced Animation Keyframes for Mobile App Section */
@keyframes animate-float-slow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(5deg);
    }

    50% {
        transform: translateY(-10px) rotate(0deg);
    }

    75% {
        transform: translateY(-30px) rotate(-5deg);
    }
}

@keyframes animate-float-reverse {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(15px) rotate(-3deg);
    }

    50% {
        transform: translateY(5px) rotate(0deg);
    }

    75% {
        transform: translateY(25px) rotate(3deg);
    }
}

@keyframes animate-float-gentle {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }

    33% {
        transform: translateY(-8px) translateX(5px);
    }

    66% {
        transform: translateY(8px) translateX(-5px);
    }
}

@keyframes animate-orbit {
    0% {
        transform: rotate(0deg) translateX(30px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateX(30px) rotate(-360deg);
    }
}

@keyframes animate-orbit-reverse {
    0% {
        transform: rotate(0deg) translateX(40px) rotate(0deg);
    }

    100% {
        transform: rotate(-360deg) translateX(40px) rotate(360deg);
    }
}

@keyframes animate-spin-slow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes animate-spin-reverse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

@keyframes animate-bounce-gentle {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translateY(0px);
    }

    40%,
    43% {
        transform: translateY(-8px);
    }

    70% {
        transform: translateY(-4px);
    }

    90% {
        transform: translateY(-2px);
    }
}

@keyframes animate-morph-blob {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: translate3d(0, 0, 0) rotate(0deg);
    }

    20% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: translate3d(-5px, -10px, 0) rotate(20deg);
    }

    40% {
        border-radius: 70% 30% 40% 60% / 40% 70% 60% 30%;
        transform: translate3d(5px, 5px, 0) rotate(-10deg);
    }

    60% {
        border-radius: 40% 70% 60% 30% / 70% 40% 50% 70%;
        transform: translate3d(-3px, 8px, 0) rotate(30deg);
    }

    80% {
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
        transform: translate3d(3px, -5px, 0) rotate(-5deg);
    }
}

/* Apply animations to elements */
.animate-float-slow {
    animation: animate-float-slow 8s ease-in-out infinite;
}

.animate-float-reverse {
    animation: animate-float-reverse 6s ease-in-out infinite;
}

.animate-float-gentle {
    animation: animate-float-gentle 4s ease-in-out infinite;
}

.animate-orbit {
    animation: animate-orbit 12s linear infinite;
}

.animate-orbit-reverse {
    animation: animate-orbit-reverse 15s linear infinite;
}

.animate-spin-slow {
    animation: animate-spin-slow 20s linear infinite;
}

.animate-spin-reverse {
    animation: animate-spin-reverse 25s linear infinite;
}

.animate-bounce-gentle {
    animation: animate-bounce-gentle 2s ease-in-out infinite;
}

.animate-morph-blob {
    animation: animate-morph-blob 10s ease-in-out infinite;
}

/* SVG Pattern Animations */
.blob-animated {
    animation: animate-morph-blob 8s ease-in-out infinite;
    will-change: transform;
}

.blob-animated:nth-child(even) {
    animation-delay: -2s;
}

.blob-animated:nth-child(odd) {
    animation-delay: -4s;
}

/* Download button styles matching Figma design */
.figma-download-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.figma-download-btn:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
}

.figma-download-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Responsive adjustments for Figma mobile app section */
@media (max-width: 1024px) {
    .mobile-app-figma-section .w-\[480px\] {
        width: 400px !important;
    }

    .mobile-app-figma-section .text-\[57px\] {
        font-size: 45px !important;
    }
}

@media (max-width: 768px) {
    .mobile-app-figma-section .w-\[400px\] {
        width: 300px !important;
    }

    .mobile-app-figma-section .text-\[45px\] {
        font-size: 32px !important;
    }

    .mobile-app-figma-section .w-\[153px\] {
        width: 140px !important;
    }

    .mobile-app-figma-section .h-\[51px\] {
        height: 45px !important;
    }

    .mobile-app-figma-section .text-\[14px\] {
        font-size: 12px !important;
    }

    .mobile-app-figma-section .text-\[10px\] {
        font-size: 9px !important;
    }
}

@media (max-width: 640px) {
    .mobile-app-figma-section .w-\[300px\] {
        width: 250px !important;
    }

    .mobile-app-figma-section .text-\[32px\] {
        font-size: 24px !important;
    }

    .mobile-app-figma-section .w-\[140px\] {
        width: 130px !important;
    }

    .mobile-app-figma-section .h-\[45px\] {
        height: 40px !important;
    }

    /* Stack download buttons vertically on mobile */
    .mobile-app-figma-section .flex-wrap {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

/* Dark theme adjustments */
.dark-theme .mobile-app-figma-section h2 {
    color: #000 !important;
    /* Keep black text as per Figma design */
}

/* Blur effect optimizations for performance */
.mobile-app-figma-section [class*="blur-"] {
    will-change: transform;
    backface-visibility: hidden;
}

/* Animation for download buttons */
.figma-download-btn .bg-black {
    transition: all 0.3s ease;
    background: #000;
}

.figma-download-btn:hover .bg-black {
    background: #1a1a1a;
}

/* Phone mockup organic shapes animation */
@keyframes morph-blob {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(-15deg) scale(1);
    }

    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: rotate(-5deg) scale(1.05);
    }

    50% {
        border-radius: 70% 30% 40% 60% / 40% 70% 60% 30%;
        transform: rotate(5deg) scale(0.95);
    }

    75% {
        border-radius: 40% 70% 60% 30% / 70% 40% 50% 70%;
        transform: rotate(10deg) scale(1.02);
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(-15deg) scale(1);
    }
}

/* Phone container hover effect */
.phone-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-container:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Responsive phone adjustments */
@media (max-width: 640px) {
    .phone-container:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Reduced Motion Support */

/* ===== ENHANCED ATOM AND CHEMISTRY FLASK ANIMATIONS ===== */

/* Enhanced Atom Icon Animations */
@keyframes atomRotateScale {
    0% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(90deg) scale(1.1);
    }

    50% {
        transform: rotate(180deg) scale(0.9);
    }

    75% {
        transform: rotate(270deg) scale(1.15);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes atomRotateScaleFast {
    0% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(90deg) scale(1.2);
    }

    50% {
        transform: rotate(180deg) scale(0.8);
    }

    75% {
        transform: rotate(270deg) scale(1.25);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Enhanced Chemistry Flask Icon Animations */
@keyframes flaskRotateScale {
    0% {
        transform: rotate(0deg) scale(1);
    }

    20% {
        transform: rotate(72deg) scale(1.05);
    }

    40% {
        transform: rotate(144deg) scale(0.95);
    }

    60% {
        transform: rotate(216deg) scale(1.1);
    }

    80% {
        transform: rotate(288deg) scale(0.98);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes flaskRotateScaleFast {
    0% {
        transform: rotate(0deg) scale(1);
    }

    20% {
        transform: rotate(72deg) scale(1.15);
    }

    40% {
        transform: rotate(144deg) scale(0.85);
    }

    60% {
        transform: rotate(216deg) scale(1.2);
    }

    80% {
        transform: rotate(288deg) scale(0.9);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}
