@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #1e3c72, #2a5298, #2c3e50);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    text-align: center;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.game {
    height: 64vmin;
    width: 64vmin;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5vmin;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2vmin;
    border-radius: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.box {
    height: 18vmin;
    width: 18vmin;
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 10vmin;
    background-color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    /* Glow for the text content (X/O) using the inline color set by JS */
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    font-weight: 800;
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.6);
    background-color: #fff;
}

.box:disabled {
    cursor: default;
    transform: none;
}

#reset, #new-btn {
    cursor: pointer;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: #fff;
    border: none;
    border-radius: 50px;
    margin-top: 2rem;
    box-shadow: 0 5px 15px rgba(255, 75, 43, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#reset:hover, #new-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 75, 43, 0.6);
}

.msg-container {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    z-index: 100;
}

#msg {
    color: #fff;
    font-size: 8vmin;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    font-weight: 800;
}

.hide {
    display: none;
}