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

body {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 20px;
}

/* Title */
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a9eff;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Status */
.status {
    font-size: 1.3rem;
    font-weight: 500;
    color: #e0e0e0;
    text-align: center;
    margin-bottom: 25px;
}

#turn {
    color: #4a9eff;
    font-weight: 600;
}

/* Score card */
.score-card {
    background-color: #2d2d2d;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 0 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.score-card > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score-card span:first-child {
    font-size: 1rem;
    font-weight: 500;
    color: #b0b0b0;
}

#scoreX, #scoreO {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a9eff;
}

/* Game board */
.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 20px;
    background-color: #2d2d2d;
    border: 2px solid #444;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Cells */
.cell {
    height: 130px;
    width: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #555;
    font-size: 2.5rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    background-color: #3a3a3a;
    color: #ffffff;
    transition: all 0.3s ease;
}

.cell:hover {
    background-color: #4a4a4a;
    border-color: #4a9eff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.cell:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* X and O colors */
.cell:not(:empty) {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reset button */
#reset-game {
    background-color: #e74c3c;
    border: none;
    color: white;
    /* padding: 15px 30px; */
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#reset-game:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#reset-game:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Winning cells */
.winning-cell {
    background-color: #27ae60 !important;
    border-color: #2ecc71 !important;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .status {
        font-size: 1.1rem;
    }
    
    .cell {
        height: 80px;
        width: 80px;
        font-size: 2rem;
    }
    
    .score-card {
        gap: 20px;
        padding: 15px;
    }
    
    #scoreX, #scoreO {
        font-size: 1.5rem;
    }
    
 
}

@media (max-width: 480px) {
    .cell {
        height: 70px;
        width: 70px;
        font-size: 1.8rem;
    }
    
    .board {
        gap: 8px;
        padding: 15px;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .status {
        font-size: 1rem;
    }
    
    .score-card {
        gap: 15px;
        padding: 0 10px;
      
    }
}