
    @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600;700&display=swap');

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

    body {
        font-family: 'Exo 2', sans-serif;
        min-height: 100vh;
        overflow-x: hidden;
        background: url('bg.jpg') no-repeat center center fixed;

    }

    /* Animated Background */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
       
        animation: backgroundMove 20s ease-in-out infinite;
        z-index: -1;
    }

    @keyframes backgroundMove {

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

        33% {
            transform: translate(30px, -30px) rotate(1deg);
        }

        66% {
            transform: translate(-20px, 20px) rotate(-1deg);
        }
    }

    /* Preloader */
    .preloader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('bg.jpg') no-repeat center center fixed;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        transition: opacity 0.5s ease-out;
    }

    .preloader.hidden {
        opacity: 0;
        pointer-events: none;
    }

    .loader {
        width: 80px;
        height: 80px;
        border: 4px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top-color: #fff;
        animation: spin 1s ease-in-out infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 0.6;
        }

        50% {
            opacity: 1;
        }
    }

    /* Main Container */
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
        opacity: 0;
        animation: fadeInUp 1s ease-out 0.5s forwards;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }

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

    /* Header */
    .header {
        text-align: center;
        margin-bottom: 30px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        animation: slideInDown 0.8s ease-out;
    }

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

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

    .logo {
        font-family: 'Orbitron', monospace;
        font-size: 3rem;
        font-weight: 900;
        background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
        background-size: 300% 300%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: gradientShift 3s ease-in-out infinite;
        margin-bottom: 10px;
    }

    @keyframes gradientShift {

        0%,
        100% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }
    }

    .stats {
        display: flex;
        justify-content: space-around;
        margin-top: 20px;
    }

    .stat-item {
        background: rgba(255, 255, 255, 0.2);
        padding: 10px 20px;
        border-radius: 15px;
        color: white;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .stat-item:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

    /* Info Box */
    .info-box {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(15px);
        border-radius: 20px;
        padding: 30px;
        margin-bottom: 30px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        animation: slideInLeft 1s ease-out 0.3s both;
    }

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

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

    .info-box h1 {
        font-family: 'Orbitron', monospace;
        font-size: 2.5rem;
        margin-bottom: 20px;
        text-align: center;
        color: #fff;
    }

    .info-section {
        margin-bottom: 20px;
        padding: 15px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        border-left: 4px solid #4ecdc4;
    }

    .info-section h3 {
        color: #4ecdc4;
        margin-bottom: 10px;
        font-size: 1.2rem;
    }

    .start-button {
        border: none;


        cursor: pointer;
        transition: all 0.3s ease;
        display: block;
        margin: 30px auto 0;
        position: relative;
        overflow: hidden;
        background-color: transparent;
    }


    .start-button:hover {
        transform: translateY(-3px);
    }

    /* Game Grid */
    .game-container {
        display: none;
        animation: zoomIn 0.5s ease-out;
    }

    @keyframes zoomIn {
        from {
            transform: scale(0.9);
            opacity: 0;
        }

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

    .game-grid {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        gap: 10px;
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .game-cell {
        aspect-ratio: 1;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        border: 2px solid transparent;
    }

    .game-cell::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: all 0.3s ease;
    }

    .game-cell:hover::before {
        width: 100%;
        height: 100%;
    }

    .game-cell:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .game-cell.active {
        background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
        animation: cellPulse 0.6s ease-in-out;
    }

    @keyframes cellPulse {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.1);
        }

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

    .game-cell.correct {
        background: linear-gradient(45deg, #4ecdc4, #44a08d);
        border-color: #4ecdc4;
        animation: correctPulse 0.5s ease-in-out;
    }


    .game-cell.active {
        position: relative;
        background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
        animation: cellPulse 0.6s ease-in-out;
        overflow: hidden;
        text-align: center;
        font-size: 28px;
        /* adjust size */
        line-height: 60px;
        /* match cell height */
    }

    .game-cell.active::after {
        content: "🍎";
        position: absolute;
        inset: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 32px;
        /* size of fruit */
    }


    @keyframes correctPulse {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.05);
            box-shadow: 0 0 20px rgba(78, 205, 196, 0.6);
        }

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

    .game-cell.wrong {
        background: linear-gradient(45deg, #ff6b6b, #ee5a52);
        border-color: #ff6b6b;
        animation: shake 0.5s ease-in-out;
    }

    @keyframes shake {

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

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

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

    /* Game Over Modal */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(5px);
        z-index: 1000;
    }

    .modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 40px;
        border-radius: 20px;
        text-align: center;
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.3);
        animation: modalSlideIn 0.5s ease-out;
    }

    @keyframes modalSlideIn {
        from {
            transform: translate(-50%, -50%) scale(0.8);
            opacity: 0;
        }

        to {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }
    }

    .modal h2 {
        font-family: 'Orbitron', monospace;
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .restart-button {
        border: none;
      
        border-radius: 25px;
        cursor: pointer;
        margin-top: 20px;
        transition: all 0.3s ease;

        background-color: transparent;
    }

    .restart-button:hover {
        transform: translateY(-2px);
    }

    /* Responsive Design */
    @media (max-width: 768px) {
        .logo {
            font-size: 2rem;
        }

        .game-grid {
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
            padding: 15px;
        }

        .info-box {
            padding: 20px;
        }
    }

    /* Hidden utility */
    .hidden {
        display: none !important;
    }
