@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;700&display=swap');

:root {
    --primary: #009999;
    --primary-hover: #008080;
    --secondary: #d4cd00;
    --background: #0f2323;
    --surface: #1a3838;
    --text: #ffffff;
    --text-muted: #a0aec0;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    text-align: center;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image: radial-gradient(circle at top right, rgba(0, 153, 153, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(212, 205, 0, 0.05), transparent 40%);
}

#setup,
#game {
    padding: 40px 20px;
    max-width: 1200px;
    margin: auto;
}

h1 {
    font-weight: 800;
    margin-bottom: 2rem;
}

#teams-list {
    background: var(--surface);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.input-group {
    max-width: 600px;
    margin: 0 auto 2rem;
}

input[type="text"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: white;
    padding: 0.75rem 1.25rem;
    width: 100%;
}

input[type="text"]:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 153, 153, 0.1);
}

#board {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.square {
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    cursor: pointer;
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    background: var(--surface);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.square:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 153, 153, 0.2);
}

button {
    margin: 10px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 153, 153, 0.3);
}

.btn-success {
    background: var(--secondary);
    color: #000;
}

#battle-notice {
    font-size: 3rem;
    font-weight: 900;
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(212, 205, 0, 0.4);
    margin: 2rem 0;
}

.score-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 30px;
}

.score-table th {
    background: transparent;
    color: var(--text-muted);
    padding: 15px;
    font-weight: 700;
}

.score-table td {
    background: var(--surface);
    padding: 20px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-table tr td:first-child {
    border-radius: 1rem 0 0 1rem;
}

.score-table tr td:last-child {
    border-radius: 0 1rem 1rem 0;
}

@keyframes flash {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.flashing {
    animation: flash 1s infinite alternate;
}