.pong-app {
    max-width: 900px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(106, 165, 255, 0.1);
    border: 1px solid rgba(106, 165, 255, 0.25);
    transition: all 0.15s ease;
}

.back-link:hover {
    background: rgba(106, 165, 255, 0.2);
    transform: translateY(-1px);
}

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

.game-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-host {
    background: var(--accent-2);
    color: #0b0f1a;
}

.btn-host:hover {
    box-shadow: 0 6px 16px rgba(91, 217, 164, 0.35);
}

.btn-join {
    background: var(--accent);
    color: #0b0f1a;
}

.btn-stop {
    background: var(--danger);
    color: #fff;
}

.btn-stop:hover {
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.35);
}

.score-board {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
    padding: 16px;
    background: #0f1421;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.p1-score {
    flex-direction: column;
}

.p2-score {
    flex-direction: column-reverse;
}

.player-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1;
}

.p1-score .score-value {
    color: var(--accent-2);
}

.score-divider {
    font-size: 36px;
    font-weight: 700;
    color: var(--muted);
}

.game-container {
    position: relative;
    display: inline-block;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

#pongCanvas {
    display: block;
    background: linear-gradient(180deg, #0a0e16 0%, #12182a 100%);
    border: 2px solid var(--border);
    border-radius: 16px;
    max-width: 100%;
    height: auto;
}

.game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(11, 15, 26, 0.9);
    padding: 20px 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    pointer-events: none;
}

.game-message.hidden {
    display: none;
}

.controls-hint {
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.controls-hint kbd {
    background: #0f1421;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: var(--accent);
}

.connection-log {
    background: #0f1421;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    max-height: 150px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: var(--muted);
}

.connection-log:empty::before {
    content: 'No activity yet...';
    color: var(--muted);
    opacity: 0.5;
}

.log-entry {
    padding: 4px 0;
    border-bottom: 1px solid rgba(36, 43, 58, 0.5);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.sent {
    color: var(--accent);
}

.log-entry.received {
    color: var(--accent-2);
}

.log-entry.error {
    color: var(--danger);
}

.log-entry .time {
    opacity: 0.6;
    margin-right: 8px;
}

/* Pong button on main page */
.btn-pong {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #0b0f1a;
    font-size: 15px;
    padding: 12px 20px;
}

.btn-pong:hover {
    box-shadow: 0 6px 20px rgba(106, 165, 255, 0.4);
}
