
body {
    background: radial-gradient(circle, #1b2735 0%, #090a0f 100%);
    color: white;
    font-family: 'Orbitron', sans-serif; /* A futuristic gaming font */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #00d4ff;
    text-shadow: 0 0 15px #00d4ff;
    text-transform: uppercase;
    letter-spacing: 5px;
}

/* 2. The Board Container (Flex Column) */
#parent {
    display: flex;
    flex-direction: column; /* Stacks the rows (.child) vertically */
    gap: 10px;             /* Space between rows */
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 3. The Rows (Flex Row) */
.child {
    display: flex;         /* Lines up the <p> tags horizontally */
    flex-direction: row;
    gap: 10px;             /* Space between squares */
}

/* 4. The Squares */
p {
    height: 90px;
    width: 90px;
    background: #16213e;
    border: 2px solid #00d4ff;
    border-radius: 8px;
    margin: 0; /* Important: removed manual margins */
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    font-size: 45px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.2);
}

/* 5. Hover & Interactive effects */
p:hover {
    background: #0f3460;
    transform: scale(1.05);
    box-shadow: 0 0 15px #00d4ff;
}

#reset-btn {
    margin-top: 20px;
    padding: 10px 25px;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
}

#reset-btn:hover {
    background: #ff0000;
    box-shadow: 0 0 15px #ff4d4d;
}

/* Red strike/glow for the winning pattern */
.winning-square {
    background-color: rgba(54, 218, 13, 0.4) ;
    border-color: #9fbb13 ;
    box-shadow: 0 0 20px #d8b206 ;
    color: white;
}