@font-face {
    font-family: 'Poppins';
    src: url('./fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('./fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('./fonts/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

body {
    background: linear-gradient(135deg, #e0e7ef 0%, #f7fafc 100%);
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.gameContainer {
    text-align: center;
    font-family: 'Poppins', Arial, sans-serif;
    margin-top: 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 36px 20px 28px 20px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    transition: box-shadow 0.3s;
}

h1 {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 2.7em;
    color: #2a2a2a;
    margin-bottom: 24px;
    letter-spacing: 2px;
    font-weight: 600;
}

.cell {
    width: 80px;
    height: 80px;
    border: 2.5px solid #4CAF50;
    font-size: 54px;
    box-shadow: 0 2px 8px rgba(76,175,80,0.07);
    line-height: 80px;
    user-select: none;
    caret-color: transparent;
    outline: none;
    background: #f4f8fb;
    transition: background 0.18s, box-shadow 0.18s;
    cursor: pointer;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 600;
    color: #222;
    border-radius: 12px;
    margin: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cell:hover {
    background: #e0f7e9;
    box-shadow: 0 0 0 3px #b2f2d7;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
    gap: 8px;
    width: 264px;
    margin: 24px auto 16px auto;
    background: #e9f5ee;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(76,175,80,0.06);
    padding: 8px;
    position: relative;
}

#win-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
}

.win-line-animate {
    position: absolute;
    background: #d32f2f;
    border-radius: 4px;
    opacity: 0.85;
    transition: all 0.4s cubic-bezier(.4,2,.6,1);
    /* left, top, width, height, transform set by JS */
}

#new-game-button, #join-game-button, #start-game-button, #reset-button {
    padding: 12px 26px;
    font-size: 20px;
    background: linear-gradient(90deg, #4CAF50 60%, #43e97b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px 6px 10px 6px;
    transition: background 0.3s, box-shadow 0.2s, transform 0.1s;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(76,175,80,0.10);
}
#new-game-button:hover, #join-game-button:hover, #start-game-button:hover, #reset-button:hover {
    background: linear-gradient(90deg, #388e3c 60%, #43e97b 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 18px rgba(76,175,80,0.18);
}

#join-room-input {
    padding: 12px 10px;
    font-size: 18px;
    border-radius: 6px;
    border: 1.5px solid #b2f2d7;
    margin-right: 6px;
    margin-bottom: 10px;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 400;
    background: #f4f8fb;
    outline: none;
    transition: border 0.2s;
}
#join-room-input:focus {
    border: 1.5px solid #4CAF50;
    background: #e0f7e9;
}

#player-info, #turn-info, #winner-info, #game-status, #ws-debug, #connection-status {
    font-family: 'Poppins', Arial, sans-serif;
}

#player-info {
    color: #222;
    margin-top: 20px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
}

#turn-info {
    color: #0077cc;
    font-size: 19px;
    margin-top: 8px;
    font-weight: 500;
}

#winner-info {
    color: #d32f2f;
    font-size: 24px;
    margin-top: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

#game-status {
    color: #444;
    font-size: 16px;
    margin-top: 10px;
}

#ws-debug, #connection-status {
    font-size: 14px;
    margin-top: 10px;
    color: #888;
}

#room-id, #room-url {
    font-size: 15px;
    margin-top: 10px;
    color: #0077cc;
    font-family: 'Poppins', Arial, sans-serif;
    word-break: break-all;
}

@media (max-width: 500px) {
    .gameContainer {
        max-width: 98vw;
        padding: 12px 2vw 12px 2vw;
    }
    #game-board {
        width: 98vw;
        min-width: 0;
        max-width: 98vw;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 4px;
        padding: 2vw;
    }
    .cell {
        width: 22vw;
        height: 22vw;
        font-size: 10vw;
        min-width: 60px;
        min-height: 60px;
        max-width: 90px;
        max-height: 90px;
    }
}