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

body {
    min-height: 100vh;
    font-family: "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #CF8702, #744C01);
    color: white;
}

.topbar {
    height: 70px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 25px;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
}

.user-info {
    font-size: 1rem;
}

#app {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 20px;
}

.card {
    width: 100%;
    max-width: 500px;

    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(15px);

    border-radius: 20px;

    padding: 30px;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.5);
}

.card h1 {
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
}

input,
select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    outline: none;
}

button {
    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 10px;

    background: #93AD02;
    color: white;

    cursor: pointer;
    transition: .2s;
}

button:hover {
    background: #2563eb;
}

.loading {
    font-size: 1.2rem;
}

@media(max-width:600px){

    .topbar{
        padding:15px;
    }

    .logo{
        font-size:1rem;
    }

    .card{
        padding:20px;
    }

}

.game-view {
    width: 100%;
    max-width: 1000px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.opponent-bar {
    width: 100%;
    text-align: center;
}

.opponent-bar h1 {
    font-size: 2rem;
    font-weight: 700;
}

.state-card {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.join-link-container {
    margin-top: 20px;
}

.join-link-container input {
    text-align: center;
    font-weight: bold;
}

.playing-container {
    display: none;
    justify-content: center;
    width: 100%;
}

.board {
    width: min(90vw, 500px);
    aspect-ratio: 1;

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);

    border-radius: 16px;
    overflow: hidden;

    box-shadow:
        0 15px 40px rgba(0,0,0,.35);
}

.field {
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;
}

.light {
    background: #e2e8f0;
}

.dark {
    background: #64748b;
}

.field svg {
    width: 80%;
    height: 80%;
}

@media (max-width: 768px) {

    .opponent-bar h1 {
        font-size: 1.5rem;
    }

    .board {
        width: 95vw;
    }

}