/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

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

body {
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
    background-color: #f0f0f0;
    color: #333;
}

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

header {
    position: absolute;
    width: 100%;
    background: rgba(255, 255, 255, 0.212);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    color: #ffffff;
    padding: 1rem;
    z-index: 2;
}

h1 {
    position: relative;
    font-size: 2rem;
}

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

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul li {
    font-size: 17px;
    margin-right: 1rem;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
}

nav ul li a:hover {
    color: #fffebd;
    text-decoration: underline;
    transition: 1s;
}

main {
    padding: 2rem 0;
}

footer {
    position: relative;
    width: 100%;
    bottom: 0;
    background: rgba(255, 255, 255, 0.212);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    color: #000000;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgb(127, 127, 127);
}

/* Responsive Navbar */
#menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

#menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    #menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

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

    .logo img {
        width: 100px;
        height: 100px;
    }

    nav {
        width: 100%;
    }

    nav ul {
        display: none;
        flex-direction: column;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0.5rem 0;
    }
}

/* Hero Section Fix */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.hero video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.9;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 80%;
    text-align: center;
}

.hero-content h1 {
    font-size: 10vw;
    margin: 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.hero-content span {
    color: #ff0000;
}

.hero-content p {
    font-size: 2rem;
    margin-top: 0.5em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media screen and (max-width: 1200px) {
    .hero-content h1 {
        font-size: 25vw;
    }

    .hero-content p {
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 768px) {
    .hero-content h1 {
        font-size: 25vw;
    }

    .hero-content p {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 25vw;
    }

    .hero-content p {
        font-size: 1.2rem;
    }
}

/* Features Section with 3D Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.feature {
    background-color: #f4f4f4;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, scale 0.3s ease;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
}

.feature:hover {
    transform: translateY(-15px) rotateX(15deg) rotateY(15deg) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.icon {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.feature h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.feature p {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.feature:hover h3 {
    color: #007BFF;
    transform: translateY(-5px);
}

.feature:hover p {
    color: #555;
    transform: translateY(-5px);
}

/* Grid Utilities */
.grid {
    display: grid;
    gap: 1rem;
}

/* Periodic Table & Tabs Section */
.periodic-table {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.element {
    text-align: center;
}

.element-symbol {
    font-size: 1.5rem;
    font-weight: 700;
}

.element-name {
    font-size: 0.75rem;
}

.element-category {
    font-size: 0.625rem;
    color: #64748b;
}

.tabs {
    display: flex;
    flex-direction: column;
}

.tab-list {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    transition: color 0.2s;
}

.tab.active {
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

.tab-content {
    display: none;
    padding: 1rem 0;
}

.tab-content.active {
    display: block;
}

.concept {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .concept {
        grid-template-columns: 1fr 1fr;
    }

    .periodic-table {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.concept-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.concept-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transition: transform 0.3s;
}

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

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