/* Chemistry & Laboratory Theme - Premium Design */
:root {
    --primary-dark: #0d1b2a;
    --primary-blue: #1a237e;
    --primary-purple: #4a148c;
    --accent-teal: #006064;
    --accent-cyan: #00838f;
    --accent-light: #00acc1;
    --accent-gold: #ffb300;
    --text-light: #e0e0e0;
    --text-white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #1a237e 0%, #4a148c 50%, #006064 100%);
    --gradient-accent: linear-gradient(135deg, #00838f 0%, #00acc1 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.85);
    z-index: -1;
}

/* Top Navigation Menu */
.top-nav {
    background: rgba(26, 35, 126, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: relative;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-light);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-light);
    background: rgba(0, 172, 193, 0.2);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: var(--accent-light);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: all 0.3s ease;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    background: var(--gradient-primary);
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: url('elements-decorative.png') no-repeat center;
    background-size: contain;
    opacity: 0.1;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-white);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Content Sections */
.content-section {
    background: rgba(26, 35, 126, 0.3);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 172, 193, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 172, 193, 0.3);
}

.content-section h2 {
    color: var(--accent-light);
    margin-bottom: 1rem;
    font-size: 2rem;
    border-bottom: 2px solid var(--accent-teal);
    padding-bottom: 0.5rem;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.image-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: scale(1.05);
}

.image-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.image-item .image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: var(--text-white);
    padding: 1rem;
    font-size: 0.9rem;
}

/* Chemical Elements Display */
.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.element-card {
    background: var(--gradient-accent);
    border-radius: 50%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.element-card:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 172, 193, 0.5);
}

.element-symbol {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-white);
}

.element-number {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Footer */
footer {
    background: rgba(26, 35, 126, 0.95);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 2px solid var(--accent-teal);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(26, 35, 126, 0.98);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: 2rem 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    .elements-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .nav-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .elements-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-teal);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-light);
}

