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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    min-height: 100vh;
}

/* Fixed canvas background */
.graph-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
}

#mathCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    /* animation: fadeInUp 1s ease-out; */
}

.hero-section h1 {
    margin: 0;
    font-weight: 800;
    color: white;
    font-size: 4rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
}

.hero-section p {
    margin: 1rem 0 0;
    color: white;
    font-size: 1.4rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Content Section */
.content-section {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-title {
    text-align: center;
    font-weight: 700;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    /* animation: fadeInUp 1.2s ease-out; */
}

/* Cards Container - Desktop Layout */
.cards-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Math Cards */
.math-card {
    flex: 0 1 280px;
    max-width: 300px;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
}

.math-card h3 {
    margin-top: 0;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.math-card p {
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    line-height: 1.6;
}

.math-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

/* Dim other cards when one is hovered */
.cards-container:hover .math-card:not(:hover) {
    transform: scale(0.95);
    opacity: 0.7;
    filter: blur(1px);
}

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

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

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Floating particles */
.particle {
    position: fixed;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s infinite linear;
}

/* ================================= */
/* MOBILE RESPONSIVE STYLES */
/* ================================= */

/* Tablets and Small Laptops */
@media screen and (max-width: 1024px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .math-card {
        width: 90%;
        max-width: 400px;
        flex: none;
    }
}

/* Mobile Devices */
@media screen and (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 2.8rem;
        line-height: 1.2;
    }

    .hero-section p {
        font-size: 1.2rem;
        margin-top: 0.5rem;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .content-section {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }

    .cards-container {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        width: 100%;
    }

    .math-card {
        width: 95%;
        max-width: 350px;
        min-width: auto;
        flex: none;
        margin: 0 auto;
        padding: 1.8rem 1.2rem;
    }

    .math-card h3 {
        font-size: 1.9rem;
        margin-bottom: 0.8rem;
    }

    .math-card p {
        font-size: 1rem;
        line-height: 1.5;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    .hero-section {
        padding: 1.5rem 0.75rem;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section p {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.9rem;
    }

    .content-section {
        padding: 0 0.25rem;
    }

    .cards-container {
        gap: 1rem;
    }

    .math-card {
        width: 98%;
        max-width: none;
        padding: 1.5rem 1rem;
    }

    .math-card h3 {
        font-size: 1.7rem;
    }

    .math-card p {
        font-size: 0.95rem;
    }
}

/* Very Small Screens */
@media screen and (max-width: 360px) {
    .hero-section h1 {
        font-size: 2rem;
    }

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

    .section-title {
        font-size: 1.7rem;
    }

    .math-card {
        padding: 1.25rem 0.875rem;
    }

    .math-card h3 {
        font-size: 1.5rem;
    }

    .math-card p {
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 1rem;
    }

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

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

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .cards-container {
        gap: 0.8rem;
    }

    .math-card {
        padding: 1rem 0.8rem;
    }
}