:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text: #ffffff;
    --success: #4fd1c5;
    --danger: #fc8181;
    --warning: #f6ad55;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

h1, h2, h3 {
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    background: linear-gradient(45deg, #FF512F 0%, #DD2476 100%);
}

.btn-success {
    background: linear-gradient(45deg, #11998e 0%, #38ef7d 100%);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

input[type="text"] {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 8px;
    color: white;
    width: 100%;
    margin-bottom: 1rem;
    font-size: 1rem;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
}

/* Room List */
.room-list {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.room-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.room-item:hover {
    background: rgba(0, 0, 0, 0.3);
}

.room-status {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Game Board */
.game-board {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.player-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
}

.vs-badge {
    align-self: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--warning);
}

.score {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0;
}

.move-display {
    font-size: 4rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.move-btn {
    font-size: 1.5rem;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.move-btn.selected {
    background: var(--success);
    border-color: white;
}

.log-area {
    margin-top: 2rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 1rem;
    max-height: 150px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
    text-align: left;
}

.log-entry {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.25rem;
}

.winner-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.status-waiting { background: var(--warning); color: black; }
.status-playing { background: var(--success); color: black; }

@media (max-width: 600px) {
    .game-board {
        grid-template-columns: 1fr;
    }
    .vs-badge {
        margin: 1rem 0;
    }
}
