html,
body {
    height: 100%;
    margin: 0;
}

#map {
    width: 100%;
    height: 100vh;
}

/* Hide by default */

/* Fuel Station Markers */
.ol-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
}

/* Fuel Station Icon Styling */
.ol-layer .ol-unselectable {
    cursor: pointer;
}

.copyright-text {
    display: none;
    margin-top: 15px;
    font-size: 12px;
    text-align: center;
}

/* Show only when menu is open */
#ui-panel.open .copyright-text {
    display: block;
}

.copyright-symbol {
    color: #888888;
}

.ltg-brand {
    color: #fec700;
    font-weight: bold;
}

/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#loading-video {
    max-width: 80%;
    max-height: 60%;
    margin-bottom: 20px;
}

/* Loading Animation */
#loading-animation-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 223, 0, 0.8);
    border-radius: 50%;
    margin: 0 6px;
    animation: dotMovement 1s linear infinite alternate;
    box-shadow: 0 0 5px rgba(255, 223, 0, 0.8);
}

.dot:nth-child(1) {
    animation-delay: 0.2s;
}

.dot:nth-child(2) {
    animation-delay: 0.4s;
}

.dot:nth-child(3) {
    animation-delay: 0.6s;
}

.dot:nth-child(4) {
    animation-delay: 0.8s;
}

.dot:nth-child(5) {
    animation-delay: 1s;
}

@keyframes dotMovement {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-20px);
    }
}

/* Loading Text */
#loading-text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 30px;
    margin-top: 0;
    text-shadow: 0 0 5px rgba(255, 223, 0, 0.8);
    animation: pulseText 3s ease-in-out infinite;
}

@keyframes pulseText {

    0%,
    20%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Add this to your existing CSS */
.ol-viewport {
    background-color: #252525 !important; /* Black background */
}


/* UI Panel Styles */
#ui-panel {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(51, 51, 51, 0.9);
    color: #fff;
    border-radius: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 11;
    overflow: hidden;
    width: 60px;
    transition: width 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
}

#ui-panel:hover {
    box-shadow: 0 0 12px 4px rgba(255, 223, 0, 0.8);
}

#ui-panel.open:hover {
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
}

#ui-panel.open {
    width: 240px;
    padding: 15px;
    min-height: 100px;
}

#toggle-ui-button {
    background: none;
    border: none;
    font-size: 26px;
    color: #fff;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    border-radius: 10px;
}

#ui-panel.open #toggle-ui-button {
    text-align: left;
}

#toggle-ui-button:focus {
    outline: none;
}

#ui-content {
    padding: 0 15px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
}

#ui-panel.open #ui-content {
    max-height: 500px;
    padding: 15px;
}

/* Menu sections */
.menu-section {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.menu-section:hover {
    box-shadow: 0 0 12px 4px rgba(254, 199, 0, 0.6);
    /* Changed from rgba(255, 223, 0, 0.8) */
}

.switch:hover .slider {
    background-color: #ccc;
    /* Makes inactive toggle more visible on hover */
}

input:checked:hover+.slider {
    background-color: #ffdf00;
    /* Slightly lighter on hover */
}

.menu-section h3 {
    margin: 0 0 8px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

/* Link buttons */
.link-button {
    display: block;
    width: calc(100% - 10px);
    /* Added to account for padding */
    padding: 8px 5px;
    /* Reduced side padding */
    margin: 5px 0;
    background: #fec700;
    /* Changed color */
    color: #333;
    /* Changed text color for better contrast */
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 14px;
    font-weight: bold;
    /* Added bold text */
    border: none;
    /* Added to remove default link styling */
}

.link-button:hover {
    background: #ffdf00;
    /* Slightly lighter yellow on hover */
    transform: translateY(-2px);
    color: #222;
    /* Darker text on hover */
    text-decoration: none;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-top: 10px;
}

.toggle-container span {
    font-size: 16px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #fec700;
    /* Changed from rgba(255, 223, 0, 0.8) */
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Search box */
#search-container {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    z-index: 10;
    background: none;
    margin: 0;
    padding: 0;
}

#search-container input {
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2);
    outline: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#search-container input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search-container input:focus {
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: inset 0 0 10px rgba(255, 223, 0, 0.8);
    border: 1px solid rgba(255, 223, 0, 0.8);
}

.search-results {
    position: absolute;
    top: 50px;
    right: 10px;
    left: auto;
    width: 250px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 5px;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 223, 0, 0.8);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 223, 0, 1);
}

.search-results div {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 15px;
    color: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    margin-bottom: 2px;
}

.search-results div:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.search-results div:hover {
    background-color: rgba(255, 223, 0, 0.8);
    color: black;
}

/* Player Info Popup */
#player-info {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(40, 40, 40, 0.95);
    color: white;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    display: none;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#player-info.active {
    display: block;
}

#player-info h2 {
    margin-top: 0;
    color: #FFD700;
    font-size: 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.close-btn:hover {
    color: #FFD700;
}

.player-info-row {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
}

.player-info-label {
    font-weight: bold;
    color: #FFD700;
}

.player-info-value {
    text-align: right;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-info-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.player-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFD700;
}

/* Following indicator */
.following-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 223, 0, 0.5);
    border: 2px solid rgba(255, 223, 0, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.9;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
}