:root {
    --bg-color: #78909c; /* Retro bluish-grey background */
    --panel-bg: #f8f8f8;
    --border-color: #212121;
    --text-color: #212121;
    --text-muted: #757575;
    
    --primary: #4caf50;
    --primary-hover: #388e3c;
    --secondary: #2196f3;
    --secondary-hover: #1976d2;
    --warning: #ffeb3b;
    --warning-hover: #fbc02d;
    --danger: #f44336;
    --danger-hover: #d32f2f;
}

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

body {
    font-family: 'Press Start 2P', cursive, monospace;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(45deg, rgba(0,0,0,0.05) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.05) 75%, rgba(0,0,0,0.05)),
        linear-gradient(45deg, rgba(0,0,0,0.05) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.05) 75%, rgba(0,0,0,0.05));
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 1rem;
}

.gb-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.retro-panel {
    background: var(--panel-bg);
    border: 4px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Add inner border mimicking old pokemon text boxes */
.retro-panel::before {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    pointer-events: none;
}

.text-center {
    text-align: center;
}

h1 {
    font-size: 1.8rem;
    color: #e53935; /* Pokeball red */
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 1rem;
    line-height: 1.4;
    letter-spacing: 2px;
}

h2 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 4px dashed var(--border-color);
    color: #1565c0; /* Blue accent */
}

header p {
    font-size: 0.8rem;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 600px) {
    .controls {
        flex-direction: row;
        justify-content: space-between;
    }
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.dot {
    width: 16px;
    height: 16px;
    border: 4px solid var(--border-color);
    border-radius: 50%;
}

.dot.online { background-color: var(--primary); }
.dot.offline { background-color: var(--danger); }

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1rem;
    border: 4px solid var(--border-color);
    border-radius: 0;
    font-family: inherit;
    font-size: 0.7rem;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    position: relative;
    z-index: 10;
}

.btn:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.4);
}

.btn.primary { background: var(--primary); color: #fff; text-shadow: 1px 1px 0 #000;}
.btn.secondary { background: var(--secondary); color: #fff; text-shadow: 1px 1px 0 #000;}
.btn.warning { background: var(--warning); color: #000; text-shadow: 1px 1px 0 #fff;}
.btn.danger { background: var(--danger); color: #fff; text-shadow: 1px 1px 0 #000;}

.players-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .players-container {
        grid-template-columns: 1fr 1fr;
    }
}

.player-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
    font-size: 0.75rem;
}

/* Retro Scrollbar */
.player-list::-webkit-scrollbar { width: 12px; }
.player-list::-webkit-scrollbar-track { background: var(--border-color); border: 2px solid var(--panel-bg); }
.player-list::-webkit-scrollbar-thumb { background: var(--secondary); border: 2px solid var(--border-color); }

.player-list li {
    background: #e0e0e0;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: inset -2px -2px 0px rgba(0,0,0,0.1);
}

.player-avatar {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: #fff;
    image-rendering: pixelated;
}

.player-info {
    flex-grow: 1;
}

.player-name {
    font-weight: bold;
    margin-bottom: 0.4rem;
}

.player-meta {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    padding: 2px 4px;
    font-size: 0.5rem;
    border: 2px solid var(--border-color);
    background: #ff9800;
    color: #000;
    margin-left: 4px;
    vertical-align: middle;
}
.badge.op { background: #e53935; color: #fff; }
.badge.wl { background: #4caf50; color: #fff; }

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.player-controls .btn {
    padding: 0.4rem;
    font-size: 0.5rem;
}


/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    text-align: center;
    padding: 2rem;
}

.modal-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #e53935;
}

.modal-content p {
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.modal-content input {
    width: 100%;
    padding: 1rem;
    background: #fff;
    border: 4px solid var(--border-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    outline: none;
    box-shadow: inset 4px 4px 0px rgba(0,0,0,0.1);
}

.modal-content input:focus {
    border-color: var(--secondary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
