body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

#app {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 800px;
    text-align: center;
}

h1 { color: #1a73e8; margin-bottom: 0.5rem; }
h2 { margin-top: 0; }

.input-group { margin: 1.5rem 0; }

input {
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s;
}

input:focus { border-color: #1a73e8; }

.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.join-group {
    display: flex;
    gap: 0.5rem;
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.1s;
}

button:active { transform: scale(0.98); }

.btn-primary { background-color: #1a73e8; color: white; }
.btn-secondary { background-color: #34a853; color: white; }
.btn-danger { background-color: #ea4335; color: white; margin-top: 1rem; }
.btn-small { font-size: 0.8rem; padding: 5px 10px; margin-top: 10px; }

#status { margin-top: 1rem; color: #666; font-style: italic; }

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.scores { display: flex; gap: 2rem; }
.player-score { font-size: 1.2rem; font-weight: bold; }

#game-message {
    font-size: 3rem;
    font-weight: 900;
    margin: 1rem 0;
    height: 4rem;
    color: #fbbc05;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.message-visible { opacity: 1; transform: scale(1.1); transition: all 0.2s; }
.message-hidden { opacity: 0; transform: scale(0.8); }

.video-container {
    position: relative;
    display: inline-block;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

canvas {
    max-width: 100%;
    height: auto;
    background: #222;
}

#label-container {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px;
    position: absolute;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9rem;
}

.game-controls { margin-top: 1.5rem; }

#history-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

#history-container {
    max-height: 200px;
    overflow-y: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

th { background-color: #f8f9fa; }
