/* style.css - Complete CSS for the website */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lilex:ital,wght@0,100..700;1,100..700&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6a11cb;
    --secondary: #2575fc;
    --accent: #ff416c;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #00b09b;
    --warning: #ffc107;
    --chemistry: #4A90E2;
    --physics: #7B1FA2;
    --text-light: #ffffff;
    --text-dark: #333333;
    --metal: #FF6B6B;
    --nonmetal: #4ECDC4;
    --metalloid: #FFD166;
    --noble-gas: #118AB2;
    --alkali: #EF476F;
    --alkaline-earth: #FFD166;
    --transition-metal: #06D6A0;
    --lanthanide: #073B4C;
    --actinide: #7209B7;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Bar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 32, 39, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--accent);
    margin-right: 10px;
    font-size: 2rem;
}

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

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-links a:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-btn {
    display: inline-block;
    background: linear-gradient(to right, var(--accent), var(--warning));
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 65, 108, 0.4);
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 65, 108, 0.6);
}

/* Statistics Section */
.stats-section {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.section-title {
    text-align: center;
    color: var(--text-light);
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--accent), var(--warning));
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-box:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stat-box i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-light);
    display: block;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

.stat-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Labs Section */
.labs-section {
    padding: 100px 0;
}

.labs-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.lab-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lab-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.lab-card.physics {
    border-top: 5px solid var(--physics);
}

.lab-card.chemistry {
    border-top: 5px solid var(--chemistry);
}

.lab-header {
    padding: 30px;
    text-align: center;
    color: var(--text-light);
}

.lab-header h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.lab-header i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.lab-card.physics .lab-header i {
    color: var(--physics);
}

.lab-card.chemistry .lab-header i {
    color: var(--chemistry);
}

.lab-content {
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff6f6;
    font-family: Roboto Flex;
}

/* Chemistry Lab */
.chemistry-lab {
    color: var(--text-light);
}

.lab-controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.element-selector, .compound-creator {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}

.element-selector h4, .compound-creator h4 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--chemistry);
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.element-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-light);
    padding: 12px 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.element-btn:hover {
    background: rgba(74, 144, 226, 0.5);
    transform: scale(1.05);
}

.selected-elements {
    min-height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.selected-element {
    background: rgba(74, 144, 226, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.selected-element .remove-element {
    background: none;
    border: none;
    color: white;
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}

.compound-result {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
}

.compound-result h4 {
    margin-bottom: 15px;
    color: var(--chemistry);
}

#compoundFormula {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compound-name {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.create {
    background: linear-gradient(to right, var(--success), #96c93d);
    color: white;
}

.action-btn.reset {
    background: rgba(255, 65, 108, 0.8);
    color: white;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 3D Model Viewer */
.model-viewer {
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    position: relative;
}

#compoundModel {
    width: 100%;
    height: 100%;
}

.model-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.model-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.model-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Periodic Table Section */
.periodic-table-section {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.05);
}

.table-container {
    overflow-x: auto;
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
}

.periodic-table {
    border-collapse: separate;
    border-spacing: 4px;
    margin: 0 auto;
}

.periodic-table td {
    width: 60px;
    height: 60px;
    text-align: center;
    vertical-align: middle;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
}

.periodic-table td:hover {
    transform: scale(1.1);
    z-index: 5;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: white;
}

.periodic-table .element-symbol {
    font-size: 1.3rem;
    display: block;
}

.periodic-table .element-number {
    font-size: 0.8rem;
    position: absolute;
    top: 5px;
    left: 5px;
    opacity: 0.8;
}

.periodic-table .element-name {
    font-size: 0.6rem;
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;
    opacity: 0.8;
}

/* Element Modal */
.element-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.element-modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #0f2027, #203a43);
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    font-size: 1.8rem;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
    color: white;
    max-height: 70vh;
    overflow-y: auto;
}

.element-basic-info {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.element-symbol-large {
    font-size: 4rem;
    font-weight: 700;
    min-width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    margin-right: 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.element-details {
    flex: 1;
}

.element-details h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: white;
}

.element-details p {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.element-details span {
    color: white;
    font-weight: 600;
}

.element-properties {
    margin-bottom: 30px;
}

.element-properties h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--chemistry);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .properties-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.property {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.property-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.property-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.element-description, .element-uses {
    margin-bottom: 25px;
}

.element-description h3, .element-uses h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--chemistry);
}

.element-description p, .element-uses p {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.modal-footer {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-img {
    height: 200px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.project-content {
    padding: 25px;
}

.project-content h4 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.project-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tag {
    background: rgba(255, 65, 108, 0.2);
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Footer */
footer {
    background: rgba(15, 32, 39, 0.95);
    padding: 60px 0 30px;
    color: var(--text-light);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-5px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Chemical Background Elements */
.chemical-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.molecule {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: floatAround 20s linear infinite;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(calc(100vw - 100px), calc(100vh - 100px)) rotate(360deg);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 992px) {
    .stats-container, .labs-container, .projects-grid, .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .lab-controls {
        grid-template-columns: 1fr;
    }
    
    .element-symbol-large {
        font-size: 3rem;
        min-width: 90px;
        height: 90px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(15, 32, 39, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .stats-container, .projects-grid, .footer-content {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .labs-container {
        grid-template-columns: 1fr;
    }
    
    .elements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}