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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(-45deg, #1a1a1a, #2d2d2d, #1f1f1f, #2a2a2a);
    background-size: 400% 400%;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    min-height: 100vh;
    padding: 20px;
    animation: gradientBG 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.bg-animation {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.floating-square {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: translate(var(--move-x), var(--move-y)) rotate(360deg);
        opacity: 0;
    }
}

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

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

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

.game-container {
    background: rgba(45, 45, 45, 0.7);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.game-container:hover {
    transform: translateY(-5px);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.info-display {
    background: rgba(61, 61, 61, 0.6);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.info-display:hover {
    background: rgba(61, 61, 61, 0.8);
    transform: scale(1.05);
}

.new-game-btn {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.new-game-btn:hover {
    background: rgba(76, 175, 80, 1);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.grid {
    display: grid;
    grid-template-columns: repeat(10, 40px);
    grid-template-rows: repeat(10, 40px);
    gap: 3px;
    background: rgba(61, 61, 61, 0.6);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cell {
    background: rgba(77, 77, 77, 0.8);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.cell:hover {
    background: rgba(93, 93, 93, 0.9);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.cell:hover::before {
    transform: translateX(100%);
}

.revealed {
    background: rgba(45, 45, 45, 0.9);
    transform: scale(0.95);
}

.mine {
    background: rgba(255, 68, 68, 0.9);
    animation: explode 0.5s ease;
}

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

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

.flagged {
    background: rgba(102, 102, 102, 0.9);
    animation: flag 0.3s ease;
}

@keyframes flag {
    0% {
        transform: scale(1);
    }
    
    50% {
        transform: scale(1.1);
    }
    
    100% {
        transform: scale(1);
    }
}

.number-1 {
    color: #3498db;
    text-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.number-2 {
    color: #2ecc71;
    text-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

.number-3 {
    color: #e74c3c;
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

.number-4 {
    color: #9b59b6;
    text-shadow: 0 0 5px rgba(155, 89, 182, 0.5);
}

.number-5 {
    color: #f1c40f;
    text-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

.number-6 {
    color: #1abc9c;
    text-shadow: 0 0 5px rgba(26, 188, 156, 0.5);
}

.number-7 {
    color: #e67e22;
    text-shadow: 0 0 5px rgba(230, 126, 34, 0.5);
}

.number-8 {
    color: #95a5a6;
    text-shadow: 0 0 5px rgba(149, 165, 166, 0.5);
}

/* bro istg css sucks - watch more feature specific tutorials - havent done yet */