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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

#map {
    width: 100vw;
    height: 100vh;
}

#room-info {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

#room-info.hidden {
    display: none;
}

#room-code {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: monospace;
}

#copy-btn {
    background: #007AFF;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

#copy-btn:hover {
    background: #0056b3;
}

#copy-btn:active {
    transform: scale(0.95);
}

#controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#controls button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

#controls button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#controls button:active {
    transform: scale(0.95);
}

#controls button svg {
    color: #333;
}

#resume-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#resume-overlay.hidden {
    display: none;
}

.resume-content {
    background: white;
    padding: 32px 48px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.resume-content p {
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
}

#resume-btn {
    background: #007AFF;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

#resume-btn:hover {
    background: #0056b3;
}

#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 3000;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s;
}

#toast.hidden {
    opacity: 0;
    pointer-events: none;
}

/* User location marker */
.user-marker {
    background: #34C759;  /* Green for other users */
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.user-marker.host {
    background: #FF3B30;  /* Red for host/leader */
}

.user-marker.self {
    background: #007AFF;  /* Blue for self */
    animation: pulse 2s infinite;
}

.user-marker.self.host {
    background: #007AFF;  /* Blue for self even if host */
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 122, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
    }
}

/* Pin marker */
.pin-marker {
    font-size: 32px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Connection status indicator */
.connection-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.connection-status.connected {
    background: #34C759;
    box-shadow: 0 0 6px rgba(52, 199, 89, 0.5);
}

.connection-status.connecting {
    background: #FF9500;
    animation: blink 1s infinite;
}

.connection-status.disconnected {
    background: #8E8E93;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Leaflet attribution positioning */
.leaflet-control-attribution {
    font-size: 10px;
}
