@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg: radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.18), transparent 25%),
          radial-gradient(circle at 80% 10%, rgba(255, 0, 170, 0.22), transparent 25%),
          #05060c;
    --card: rgba(16, 18, 33, 0.8);
    --border: rgba(255, 255, 255, 0.1);
    --accent: #8cf6ff;
    --accent-2: #ff7dff;
    --text: #e8ecf3;
    --muted: #aeb8d1;
    --success: #6fffb0;
    --danger: #ff8ea2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(140, 246, 255, 0.08), transparent 40%),
                radial-gradient(circle at 70% 60%, rgba(255, 125, 255, 0.08), transparent 35%);
    filter: blur(20px);
    z-index: -2;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem clamp(1.5rem, 2vw, 3rem);
    text-align: center;
    backdrop-filter: blur(12px);
    background: linear-gradient(145deg, rgba(14, 15, 28, 0.92), rgba(8, 11, 24, 0.85));
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45), inset 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(140, 246, 255, 0.18), rgba(255, 125, 255, 0.12));
    opacity: 0.5;
    filter: blur(60px);
    z-index: -1;
}

h1 {
    margin-bottom: 1.5rem;
    color: #f5fbff;
    font-size: clamp(2rem, 4vw, 2.7rem);
    letter-spacing: 0.04em;
    text-shadow: 0 0 25px rgba(140, 246, 255, 0.35);
}

h1 span {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    color: transparent;
}

h2, h3, h4 {
    margin-bottom: 1rem;
    color: #dfe6ff;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--muted);
}

input[type="text"] {
    width: 100%;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

input[type="text"]:focus {
    border-color: rgba(140, 246, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(140, 246, 255, 0.16), 0 10px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    position: relative;
    padding: 0.95rem 1.8rem;
    font-size: 1rem;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: #05060c;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 700;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
    transform: translateX(-100%);
    transition: transform 0.35s ease;
}

.btn:hover::before {
    transform: translateX(0);
}

.btn:hover {
    transform: translateY(-2px) scale(1.01);
}

.primary {
    background: linear-gradient(135deg, #7ef3ff, #7d7dff, #ff7dff);
    color: #05060c;
    box-shadow: 0 20px 40px rgba(127, 243, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.primary:hover {
    box-shadow: 0 25px 55px rgba(255, 125, 255, 0.35);
}

.secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(140, 246, 255, 0.08));
    color: var(--text);
    border-color: rgba(140, 246, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(140, 246, 255, 0.15), 0 10px 25px rgba(0, 0, 0, 0.35);
}

.secondary:hover {
    border-color: rgba(255, 125, 255, 0.35);
}

.hidden {
    display: none;
}

.players-list {
    margin: 2rem 0 1rem;
    text-align: left;
    background: var(--card);
    padding: 1.25rem 1.15rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

#fill-bots-btn {
    margin-top: 0.5rem;
}

.players-list ul {
    list-style: none;
}

.players-list li {
    padding: 0.65rem 0.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.players-list li:last-child {
    border-bottom: none;
}

.teams-container {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.team {
    flex: 1;
    background: linear-gradient(180deg, rgba(17, 19, 36, 0.9), rgba(11, 13, 26, 0.95));
    padding: 1.05rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(140, 246, 255, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    min-width: 240px;
}

.team h4 {
    margin-bottom: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.team ul {
    list-style: none;
}

.team li {
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    color: var(--text);
    border-radius: 10px;
    transition: background 0.15s ease, transform 0.1s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.team li:hover {
    background: rgba(140, 246, 255, 0.05);
    transform: translateY(-1px);
    border-color: rgba(140, 246, 255, 0.2);
}

.team li.selected {
    background: linear-gradient(120deg, rgba(140, 246, 255, 0.2), rgba(255, 125, 255, 0.2));
    font-weight: 700;
    border-color: rgba(255, 125, 255, 0.35);
}

#replay-files {
    margin-top: 0.5rem;
}

#room-code {
    font-weight: 800;
    color: #05060c;
    background: linear-gradient(135deg, #7ef3ff, #7d7dff, #ff7dff);
    padding: 0.45rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    letter-spacing: 0.04em;
    box-shadow: 0 10px 25px rgba(127, 243, 255, 0.25);
    display: inline-block;
}

#waiting-message {
    margin-top: 2rem;
    font-style: italic;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    display: inline-block;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

/* Cores dos jogadores, usadas para nomes e indicadores */
.player-color-0 { color: #8cf6ff; }
.player-color-1 { color: #f2f2f2; }
.player-color-2 { color: #ff8ea2; }
.player-color-3 { color: #90ffb3; }
