* {
    box-sizing: border-box;
}


body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    min-height: 100vh;
}


header {
    text-align: center;
    padding: 30px 20px 10px;
}


    header h1 {
        margin: 0;
        font-size: 42px;
    }


    header p {
        color: #94a3b8;
    }


.container {
    width: 92%;
    max-width: 900px;
    margin: auto;
    padding-bottom: 50px;
}


.screen {
    display: none;
}


    .screen.active {
        display: block;
    }


.card {
    background: rgba(30, 41, 59, 0.96);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}


h2 {
    margin-top: 0;
}


input {
    width: 100%;
    padding: 13px;
    margin: 8px 0 12px;
    border: none;
    border-radius: 10px;
    background: #334155;
    color: white;
    font-size: 16px;
}


    input:focus {
        outline: 2px solid #3b82f6;
    }


button {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    background: #3b82f6;
    color: white;
    transition: 0.2s;
}


    button:hover {
        transform: translateY(-2px);
        background: #2563eb;
    }


    button:disabled {
        cursor: not-allowed;
        transform: none;
    }


.secondary {
    background: #475569;
}


    .secondary:hover {
        background: #64748b;
    }


.danger {
    background: #dc2626;
}


    .danger:hover {
        background: #b91c1c;
    }


.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}


.player-box {
    color: #cbd5e1;
}


.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}


.game-card {
    background: #334155;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
}


.game-icon {
    font-size: 52px;
    margin-bottom: 10px;
}


.game-card h3 {
    margin: 8px 0;
    font-size: 24px;
}


.game-card p {
    color: #94a3b8;
}


.disabled-card {
    opacity: 0.55;
}


.privacy-options {
    display: flex;
    gap: 20px;
    margin: 15px 0 20px;
}


    .privacy-options label {
        cursor: pointer;
    }


    .privacy-options input {
        width: auto;
        margin-right: 5px;
    }


.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}


.session {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #334155;
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
}


.session-player {
    font-size: 18px;
    font-weight: bold;
}


.session-status {
    color: #94a3b8;
    font-size: 14px;
    margin-top: 3px;
}


.online-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 7px;
}


#sessionCode {
    font-size: 34px;
    font-weight: bold;
    letter-spacing: 5px;
    color: #60a5fa;
    margin: 15px 0;
}


#waitingScreen,
#gameScreen {
    text-align: center;
}


#board {
    display: grid;
    grid-template-columns: repeat(3, 110px);
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}


    #board button {
        width: 110px;
        height: 110px;
        padding: 0;
        background: #334155;
        font-size: 50px;
    }


        #board button:hover {
            background: #475569;
        }


#gameInfo {
    color: #cbd5e1;
}


#gameStatus {
    font-size: 22px;
    font-weight: bold;
    color: #60a5fa;
}


#message,
#loginMessage {
    color: #f87171;
    margin-top: 12px;
}


.button-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}


@media (max-width: 500px) {

    header h1 {
        font-size: 32px;
    }


    #board {
        grid-template-columns: repeat(3, 85px);
    }


        #board button {
            width: 85px;
            height: 85px;
            font-size: 40px;
        }


    .topbar,
    .lobby-header {
        flex-direction: column;
        align-items: stretch;
    }
}
