html, body {
    margin: 0;
    padding: 0;
    font-family: "Ubuntu Mono", monospace;
    background-color: black;
    color: #006400;
    overflow: hidden;
    touch-action: none;
    height: 100%;
    width: 100%;
}

body {
    background-image:
            linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
            url('public/background.svg'); /* Replace with your image path */
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center center;
}

#map-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    touch-action: none;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

svg#map {
    transition: transform 0.3s ease-in-out;
    touch-action: none;
}

#map-controls {
    position: absolute;
    top: 10px;
    left: 45px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0px 11px 17px 0px rgba(0,0,0,0.75);
}

#map-controls .general {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

#map-controls .general .game-status {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

#map-controls .general .game-status .bullet {
    font-size: 0.6em;
    animation: blink 2s linear infinite;
}

#map-controls .general .game-status.in_progress {
    color: #ff7841;
}

#map-controls.hidden {
    display: none;
}

#map-controls button {
    font-family: "Ubuntu Mono", monospace;
    background: none;
    border: none;
    border-left: 2px solid grey;
    color: grey;
    padding: 6px 10px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s, color 0.3s;
}

#map-controls button.active {
    border-left: 2px solid #ff7841;
    background: linear-gradient(90deg,rgba(255, 120, 65, 0.2) 0%, rgba(255, 120, 65, 0) 20%);
    color: white;
}

#map-controls button.controls {
    border: none;
    border-radius: 3px;
    background-color: white;
    color: black;
    padding: 3px 6px;
    font-weight: bold;
}

#map-controls button.white {
    background-color: white;
    color: black;
}

#map-controls button.orange {
    background-color: #ff7841;
    color: black;
}

#map-controls-toggle {
    position: absolute;
    top: 10px;
    left: 45px;
    border: none;
    border-radius: 3px;
    background-color: white;
    color: black;
    padding: 5px 10px;
    cursor: pointer;
    display: none;
    font-family: "Ubuntu Mono", monospace;
    font-weight: bold;
    box-shadow: 0px 11px 17px 0px rgba(0,0,0,0.75);
}

#map-controls.hidden + #map-controls-toggle {
    display: block;
}

/* Right Sidebar Styles */
#right-sidebar {
    position: absolute;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    border-left: 2px solid #ff7841;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

#right-sidebar.open {
    right: 0;
}

#sidebar-toggle {
    position: absolute;
    top: 10px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 3px;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-family: "Ubuntu Mono", monospace;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0px 11px 17px 0px rgba(0,0,0,0.75);
    transition: all 0.3s ease;
}

#sidebar-toggle:hover {
    background: rgba(255, 120, 65, 0.8);
    color: black;
}

.sidebar-content {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.sidebar-content h3 {
    color: #ff7841;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 1px solid #ff7841;
    padding-bottom: 10px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    margin: 0;
    border: none;
    padding: 0;
}

.close-sidebar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 120, 65, 0.5);
    color: #ff7841;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-family: "Ubuntu Mono", monospace;
    font-size: 12px;
    transition: all 0.3s ease;
}

.close-sidebar:hover {
    background: rgba(255, 120, 65, 0.3);
    color: white;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 120, 65, 0.3);
    border-radius: 5px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: "Ubuntu Mono", monospace;
}

.sidebar-link:hover {
    background: rgba(255, 120, 65, 0.2);
    border-color: #ff7841;
    transform: translateX(5px);
}

.sidebar-link.admin-only {
    border-color: rgba(255, 0, 0, 0.3);
}

.sidebar-link.admin-only:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
}

.link-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.link-text {
    font-weight: bold;
    font-size: 14px;
}

@media (max-width: 600px) {
    .nav-button {
        font-size: 12px;
        padding: 6px;
    }
    #map-controls {
        font-size: 12px;
        padding: 6px;
    }
    #map-controls button {
        padding: 4px 6px;
        font-size: 12px;
    }

    #right-sidebar {
        width: 250px;
        right: -250px;
    }

    .sidebar-content {
        padding: 15px;
    }

    .sidebar-link {
        padding: 10px 12px;
    }

    .link-text {
        font-size: 12px;
    }
}

@keyframes blink {
    0% { opacity: 1; } /* Fully visible */
    50% { opacity: 0.2; } /* Invisible */
    100% { opacity: 1; } /* Fully visible */
}

#map-data {
    position: absolute;
    top: 10px;
    right: 80px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0px 11px 17px 0px rgba(0,0,0,0.75);
}

#map-data .game-status {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

#map-data #clock {
    font-weight: 900;
    color: white;
    font-size: 1.3em;
}

#map-data .game-status .bullet {
    font-size: 0.6em;
    animation: blink 2s linear infinite;
}

#map-data .game-status.in_progress {
    color: #ff7841;
}

#map-data button {
    font-family: "Ubuntu Mono", monospace;
    background: none;
    border: none;
    border-left: 2px solid grey;
    color: grey;
    padding: 6px 10px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s, color 0.3s;
}

#map-data button.controls {
    border: none;
    border-radius: 3px;
    background-color: white;
    color: black;
    padding: 3px 6px;
    font-weight: bold;
}

#map-data button.white {
    background-color: white;
    color: black;
}

#map-data button.orange {
    background-color: #ff7841;
    color: black;
}