body { 
    /* background: black; */
    margin: 0;
    overflow-x: hidden;
    position: relative;
    background-image: repeating-linear-gradient(0deg, rgb(41, 41, 41) 0px, rgb(41, 41, 41) 1px,transparent 1px, transparent 21px),repeating-linear-gradient(90deg, rgb(41, 41, 41) 0px, rgb(41, 41, 41) 1px,transparent 1px, transparent 21px),linear-gradient(90deg, hsl(87,0%,9%),hsl(87,0%,9%));
}



/* Additional subtle glow effect for grid */
.board {
    box-shadow: 
        10px 0 20px rgba(30, 144, 255, 0.2),
        10px 0 40px rgba(0, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Enhance button hover effects */
.button:hover {
    box-shadow: 
        0 0 10px rgba(30, 144, 255, 0.5),
        0 6px 0 rgba(73, 87, 74, 0.8);
}

.paternsw {
    color: white;
    margin: 0 0 0 5%;
    display: flex;
}

.ca {
    display: flex;
    justify-content: center;
    margin: 1% 0 0 0;
}

.ca p {
    color: white;
}

.headerw {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 10% 0 0;
}

.logo {
    margin: 0 5% 0 0;
    width: 25%;
}

/* Rest of the previous CSS remains the same */
.header h1{
    text-align: center;
    color: white;
    font-family: "Doto";
    font-size: 9rem;
    font-weight: 600;
    padding: 0;
    text-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
}

.wrap{
    margin-top: 4%;
    max-height: 100%;
    max-width: 100%;
}

.menu{
    display: flex;
    margin-left: 15.35%;
    margin-right: 18.5%;
}

.button{
    text-align: center;
    font-family: 'Bebas Neue';
    font-size: 25px;
    border: 1px solid #ffffff;
    padding: 10px;
    border-color: white;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 0;
    text-decoration: none;
    color: white;
    box-shadow: 0 6px 0 #49574a, 0 8px 10px #49574a;
    transition: transform 0.1s ease, box-shadow 0.1s ease; 
}

.button:active {
    transform: translateY(6px);
    box-shadow: 0 2px 0 #49574a, 0 6px 8px #49574a;
}

a:hover{
    color: white;
    text-decoration: none;
}

.button:not(:first-child){
    margin-left: 10px;
}

.button:not(:last-child):before{
    content: '';
    /* background: linear-gradient(45deg, #ff0000, #ff0000); */
    position: absolute;
    top: -2px;
    left:-2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .15s ease-in-out;
}

.button:not(:last-child):hover:before{
    opacity: 1;
}

@keyframes glowing{
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

#ggg{
    background: linear-gradient(124deg, #220a49, #331a5c, #43494a, #292b2c);
    -webkit-animation: rainbow 4s ease infinite;
    -z-animation: rainbow 4s ease infinite;
    -o-animation: rainbow 4s ease infinite;
    animation: rainbow 4s ease infinite;
    background-size: 1800% 1800%;
}

@-webkit-keyframes rainbow{
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}
@-moz-keyframes rainbow{
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}
@-o-keyframes rainbow{
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}
@keyframes rainbow{ 
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}

#sgg {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.board{
    background-image: radial-gradient(circle at center center, transparent 0%,rgb(33,33,33) 99%),repeating-linear-gradient(0deg, rgba(163, 163, 163,0.2) 0px, rgba(163, 163, 163,0.2) 1px,transparent 1px, transparent 6px),repeating-linear-gradient(90deg, rgba(163, 163, 163,0.2) 0px, rgba(163, 163, 163,0.2) 1px,transparent 1px, transparent 6px),linear-gradient(90deg, rgb(33,33,33),rgb(33,33,33));
    display: flex;
    justify-content: center;
    border-collapse: collapse;
    border-style: dashed;
    border-color: white;
    margin-top: 30px;
    margin-left: 15.35%;
    margin-right: 18.5%;
}

.petriw {
    display: flex;
    flex-direction: column;
}

.petriw p {
    margin-top: 1%;
    margin-left: 15.35%;
    margin-right: 18.5%;
    color: white;
    text-align: right;
}

.board td{
    height: 25px;
    width: 25px;
}

.dead{
    background-color: transparent;
    transition: all 0.2s ease-in-out;
}

/* Grid cell glow */
.alive {
    background-color: rgba(255, 255, 255, 0.921);
    box-shadow: 
    0 0 10px rgba(255, 255, 255, 0.7),
    0 0 20px rgba(30, 144, 255, 0.5);
    animation: cellPulse 0.8s ease-in-out infinite alternate, rot2 1s ease-in-out;
    transition: transform;
}

@keyframes cellPulse {
    0% {
        box-shadow: 
            0 0 5px rgba(255, 255, 255, 0.5),
            0 0 10px rgba(30, 144, 255, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(255, 255, 255, 0.8),
            0 0 30px rgba(30, 144, 255, 0.7);
    }
}

@keyframes rot2{
    25%{
        transform: rotate(90deg);
    }

    50%{
        transform: rotate(90deg);
    }

    75%{
        transform: rotate(90deg);
    }

    100%{
        transform: rotate(90deg);
    }
}

@keyframes spin{
    100%{
        transform: rotate(360deg);
    }
}

.rules {
    margin-left: 15.35%;
    margin-right: 18.5%;
    margin-top: 10%;
    color: white;
}

.rules h1 {
    font-family: "Bebas Neue";
    font-size: 7rem;
}

.rules-introduction {
    margin: 5% 0;
}

.rule-bullet {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5% 0 5% 0;
}

.rulesw {
    font-family: "Bebas Neue";
}

.rule-gif {
    width: 50%;
}

.source{
    font-family: 'Bebas Neue';
    margin-left: 15.35%;
    margin-right: 18.5%;
    margin-top: 10%;
    color: white;
}

.source h1 {
    font-family: "Bebas Neue";
    font-size: 7rem;
}

#wiki{
    border-radius: 40%;
    width: 80%;
}

.creator {
    font-family: 'Bebas Neue';
    margin-left: 15.35%;
    margin-right: 18.5%;
    margin-top: 10%;
    color: white;
}

.creator-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5%;
}

.twitter-cell-grid {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 2% 0;
}

.twitter-cell {
    width: 20px;
    height: 20px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.alive-twitter {
    background-color: rgba(255, 255, 255, 0.921);
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.7),
        0 0 20px rgba(30, 144, 255, 0.5);
    animation: twitterPulse 2s ease-in-out infinite alternate;
}

@keyframes twitterPulse {
    0% {
        box-shadow: 
            0 0 5px rgba(255, 255, 255, 0.5),
            0 0 10px rgba(30, 144, 255, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(255, 255, 255, 0.8),
            0 0 30px rgba(30, 144, 255, 0.7);
    }
}

.twitter-link {
    text-decoration: none;
    color: white;
    font-family: "Doto";
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
    transition: all 0.3s ease;
    margin: 2% 0;
    position: relative;
    z-index: 1;
}

.twitter-link:hover {
    color: white;
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(30, 144, 255, 0.6);
    transform: scale(1.1);
    text-decoration: none;
}

.twitter-symbol {
    font-size: 3rem;
    margin-right: 0.2rem;
    color: white;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.7),
        0 0 30px rgba(30, 144, 255, 0.5);
    animation: symbolGlow 3s ease-in-out infinite alternate;
}

@keyframes symbolGlow {
    0% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.5),
            0 0 20px rgba(30, 144, 255, 0.3);
    }
    100% {
        text-shadow: 
            0 0 25px rgba(255, 255, 255, 0.9),
            0 0 35px rgba(30, 144, 255, 0.7);
    }
}

.twitter-handle {
    letter-spacing: 0.05em;
}

.twitter-link::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.twitter-link:hover::before {
    opacity: 1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2% 0;
}

.infinity-symbol {
    color: white;
    font-size: 3rem;
    font-family: "Bebas Neue";
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(30, 144, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
    animation: infinityGlow 3s ease-in-out infinite;
}

@keyframes infinityGlow {
    0% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.6),
            0 0 20px rgba(30, 144, 255, 0.4),
            0 0 30px rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 1),
            0 0 30px rgba(30, 144, 255, 0.8),
            0 0 40px rgba(255, 255, 255, 0.6),
            0 0 50px rgba(30, 144, 255, 0.4);
        transform: scale(1.05);
    }
    100% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.6),
            0 0 20px rgba(30, 144, 255, 0.4),
            0 0 30px rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
}