/* --- style.css --- */
/* Contains all custom styles for the Host Moses page */

/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #121829; /* Dark blue background */
    color: #e0e0e0; /* Light gray text */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Sidebar Styles */
.sidebar {
    background-color: #1f2937; /* Darker gray-blue */
    width: 250px;
    height: 100vh; /* Full viewport height */
    position: fixed; /* Fixed position */
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column; /* Stack items vertically */
    padding-top: 1.5rem;
    z-index: 10; /* Keep sidebar above main content */
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.sidebar .logo-container {
    padding: 0.75rem;
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: block;
    padding: 0.3rem 1.5rem;
    color: #9ca3af; /* Muted gray */
    font-weight: 500;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-left: 3px solid transparent; /* For active indicator */
    margin-bottom: 1px;
    cursor: pointer;
}

.sidebar-link:hover {
    background-color: #374151; /* Slightly lighter gray-blue */
    color: #e5e7eb; /* Lighter gray */
}

.sidebar-link.active {
    background-color: #059669; /* Emerald green */
    color: #ffffff; /* White text */
    border-left-color: #ffffff; /* White active indicator */
}

.sidebar-section-title {
    padding: 0.15rem 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem; /* text-xs */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280; /* Medium gray */
}

.sidebar-footer {
    margin-top: auto; /* Push footer to bottom */
    padding: 0.5rem 1.5rem;
    border-top: 1px solid #374151; /* Separator line */
    position: relative; /* For positioning profile popup */
}

#user-status-area {
    cursor: pointer;
    min-height: 40px; /* Ensure space even when logged out */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent; /* Explicitly set background */
}

#user-status-area .status-text {
    font-weight: 500;
    line-height: 1.25;
    vertical-align: middle;
    /* Color inherited, size from Tailwind */
}

#user-status-area .auth-button {
    display: inline-block;
    background-color: #4b5563; /* Gray */
    color: #e5e7eb;
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem; /* rounded-md */
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

#user-status-area .auth-button:hover {
    background-color: #6b7280; /* Lighter gray */
}

.footer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #4b5563; /* Fallback background */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #374151;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 0.5rem; /* Space between avatar and text */
}

.footer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the circle */
}

.footer-avatar i { /* Fallback icon style */
    font-size: 1rem;
    color: #9ca3af;
}

.avatar-load-failed { }


/* Main Content Styles */
.main-content {
    margin-left: 250px; /* Account for fixed sidebar width */
    padding: 2rem;
}

/* --- START: Banner Carousel Styles --- */
#banner-carousel-container {
    position: relative; /* For positioning buttons */
    /* Define the CSS variable for glow color, default white */
    --carousel-glow-color: #ffffff;
    /* Apply the box-shadow using the variable - INCREASED VALUES */
    box-shadow: 0 0 45px 12px var(--carousel-glow-color, #ffffff); /* Increased blur and spread */
    /* Add border using the same variable */
    border: 3px solid var(--carousel-glow-color, #ffffff);
    border-radius: 0.75rem; /* Match carousel border-radius */
    /* Add transition for the box-shadow AND border color change */
    transition: box-shadow 0.7s ease-in-out, border-color 0.7s ease-in-out;
}

#banner-carousel {
    position: relative;
    overflow: hidden; /* Important: Hides other slides */
    border-radius: calc(0.75rem - 3px); /* Adjust inner radius to account for border width */
    min-height: 400px; /* Minimum height */
    background-color: #374151; /* Fallback background */
}

#banner-slides {
    display: flex;
    /* transition: transform 0.7s ease-in-out; Set by JS */
    height: 100%; /* Ensure track takes full height */
}

.banner-slide {
    width: 100%;
    flex-shrink: 0; /* Prevent slides from shrinking */
    position: relative;
    min-height: 400px; /* Match carousel min-height */
    display: flex; /* Use flex for content alignment */
    align-items: flex-end; /* Align content bottom */
    padding: 2rem; /* Match old banner padding */
    background-size: cover;
    background-position: center;
}

/* Overlay REMOVED */
/* .banner-slide::before { ... } */

.banner-slide > div:last-child { /* Content container */
    position: relative;
    z-index: 20; /* Above background */
    color: white;
    /* Add text shadow for better readability without overlay */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}
.banner-slide .trending-tag { /* Reusing existing class */
    background-color: rgba(0, 0, 0, 0.5);
    color: #a5f3fc;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
    text-shadow: none; /* Ensure no shadow if background is enough */
}
.banner-slide .featured-title { /* Reusing existing class */
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6); /* Added text shadow */
}
.banner-slide .order-now-main { /* Reusing existing class */
    background-color: #059669;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-decoration: none; /* Ensure it looks like a button */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4); /* Added subtle text shadow */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Optional: Add button shadow */
}
.banner-slide .order-now-main:hover {
    background-color: #047857;
}

/* Carousel Navigation Buttons (REMOVED) */
/* #banner-prev, #banner-next { ... } */

/* Carousel Pagination Dots */
#banner-dots {
    position: absolute; /* Overlay on the banner */
    bottom: 1rem; /* bottom-4 */
    left: 0;
    right: 0;
    z-index: 30; /* Above content */
    display: flex;
    justify-content: center;
    gap: 0.75rem; /* space-x-3 */
    padding: 0.5rem 0; /* Add some vertical padding */
    pointer-events: none; /* Allow clicks to pass through container */
}
.banner-dot {
    width: 0.65rem; /* Slightly smaller */
    height: 0.65rem;
    background-color: #6b7280; /* Medium Gray (Inactive) */
    border-radius: 9999px; /* rounded-full */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Added transform transition */
    border: 1px solid rgba(255, 255, 255, 0.5); /* Subtle light border */
    padding: 0;
    pointer-events: auto; /* Make dots clickable */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Added shadow */
}
.banner-dot:hover {
    /* background-color: #9ca3af; /* Lighter Gray (Hover) - Removed for cleaner look */
    transform: scale(1.2); /* Slightly enlarge on hover */
}
.banner-dot.active { /* Style for the active dot */
    background-color: #059669; /* Emerald Green (Active) */
    border-color: rgba(0, 0, 0, 0.3); /* Subtle dark border for active */
    transform: scale(1.1); /* Slightly larger when active */
}

/* Edit Banner Button (Adjust position relative to carousel) */
#edit-banner-btn {
    position: absolute;
    top: 1rem; /* top-4 */
    right: 1rem; /* right-4 (Reset since arrows are gone) */
    z-index: 30; /* Above content */
    background-color: rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
    border: 1px solid #6b7280;
    padding: 0.25rem 0.5rem; /* py-1 px-2 */
    border-radius: 0.25rem; /* rounded-sm */
    font-size: 0.75rem; /* text-xs */
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex; /* Align icon and text */
    align-items: center;
}
#edit-banner-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}
#edit-banner-btn i { margin-right: 0.25rem; } /* mr-1 */
/* --- END: Banner Carousel Styles --- */


/* --- Game Tile Styling (Main Grids) --- */
.game-tile-outer-wrapper {
    position: relative;
    display: block;
    transition: transform 0.2s ease-in-out;
    border-radius: calc(0.75rem + 3px); /* Match tile radius + border width */
}

.game-tile-outer-wrapper:hover {
    transform: scale(1.03); /* Scale effect on hover */
    z-index: 5; /* Bring hovered tile to front */
}

/* Default Tile Style */
.game-tile {
    background-color: #1f2937; /* gray-800 */
    border-radius: 0.75rem; /* rounded-xl */
    overflow: hidden; /* Clip content */
    cursor: pointer;
    position: relative; /* For absolute positioning inside */
    z-index: 1;
    transition: outline 0.1s ease;
}

.game-tile.dragging { /* Style for tile being dragged */
    opacity: 0.5;
    outline: 2px dashed #a5f3fc; /* cyan-200 */
    cursor: grabbing !important;
}

.game-tile-outer-wrapper.drag-over { /* Style for potential drop target */
    outline: 2px dashed #3b82f6; /* blue-500 */
    outline-offset: 2px;
}

.game-tile-image-wrapper {
    display: block;
    border-radius: 0.75rem; /* rounded-xl */
    position: relative;
    overflow: hidden;
}

.game-tile img {
    height: 200px; /* Increased from 160px */
    object-fit: cover; /* Cover area, maintain aspect ratio */
    width: 100%;
    display: block;
    border-radius: 0; /* No radius on image itself */
    pointer-events: none; /* Prevent image drag interference */
}

.game-tile-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background-color: rgba(31, 41, 55, 0.85); /* Semi-transparent gray-800 */
    padding: 0.75rem 1rem;
    z-index: 3; /* Above image */
    opacity: 0; /* Hidden by default */
    transform: translateY(100%); /* Start below tile */
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    border-radius: 0 0 0.75rem 0.75rem; /* Match bottom corners */
    min-height: 60px; /* Ensure some space */
}

.game-tile:hover .game-tile-content { /* Show content on hover */
    opacity: 1;
    transform: translateY(0);
}

.game-tile-title {
    font-weight: 600;
    font-size: 1.1rem; /* Slightly larger than default */
    margin-bottom: 0.25rem;
    color: #e5e7eb; /* gray-200 */
}

.game-tile-price { /* Used for description */
    font-size: 0.9rem;
    color: #d1d5db; /* gray-300 */
    line-height: 1.4;
}

/* Order Button inside Tile */
.order-button-tile {
    background-color: #059669; /* emerald-600 */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem; /* rounded-lg */
    text-align: center;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 0.75rem; /* mt-3 or mt-2 based on description */
    font-size: 0.9rem;
    cursor: pointer;
}

.order-button-tile:hover {
    background-color: #047857; /* emerald-700 */
}

/* Example specific detail style (if needed) */
.mordhau-details {
    font-size: 0.75rem; /* text-xs */
    color: #d1d5db; /* gray-300 */
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.mordhau-details li::before {
    content: '✓';
    color: #10b981; /* emerald-500 */
    margin-right: 0.5em;
}

/* Admin action buttons on tiles */
.tile-actions {
    position: absolute;
    top: 0.5rem; right: 0.5rem;
    display: flex;
    gap: 0.3rem;
    z-index: 4; /* Above image */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

.game-tile:hover .tile-actions { /* Show on hover */
    opacity: 1;
}

.tile-action-btn {
    width: 1.5rem; height: 1.5rem;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.tile-action-btn i {
    font-size: 0.7rem;
    pointer-events: none; /* Ensure button gets click */
}

.remove-tile-btn { color: #ef4444; /* red-500 */ }
.remove-tile-btn:hover { background-color: rgba(239, 68, 68, 0.8); color: white; }
.edit-tile-btn { color: #3b82f6; /* blue-500 */ }
.edit-tile-btn:hover { background-color: rgba(59, 130, 246, 0.8); color: white; }

/* Drag handle on tiles */
.drag-handle {
    position: absolute;
    top: 0.5rem; left: 0.5rem;
    width: 1.75rem; height: 1.75rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: #9ca3af; /* gray-400 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 5; /* Above other elements */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.game-tile:hover .drag-handle { /* Show on hover */
    opacity: 1;
}
.drag-handle:active { /* Style while dragging */
    cursor: grabbing;
    background-color: rgba(255, 255, 255, 0.2);
}
.drag-handle i {
    font-size: 0.9rem;
    pointer-events: none;
}

/* Add Tile Buttons */
#add-tile-btn, #add-gs-tile-btn {
    background-color: #059669; /* emerald-600 */
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem; /* rounded-lg */
    font-weight: 600;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border: none;
}
#add-tile-btn:hover, #add-gs-tile-btn:hover {
    background-color: #047857; /* emerald-700 */
}

/* Style for Title Below Tile */
.title-below-tile {
    text-align: center;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
    color: #9ca3af; /* gray-400 */
    margin-top: 0.75rem; /* Increased */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Hover Effects --- */
@keyframes fire-glow {
    0%, 100% { box-shadow: 0 0 12px 3px rgba(255, 100, 0, 0.6); }
    50% { box-shadow: 0 0 22px 7px rgba(255, 60, 0, 0.8); }
}
@keyframes fire-flicker { /* Controls border gradient movement */
    0%, 100% { background-position: 0 0; }
    50% { background-position: 0 100%; }
}

/* Featured Grid Tile Effect */
#game-grid .game-tile-outer-wrapper::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px; /* Border size */
    z-index: 0; /* Behind the tile */
    background: linear-gradient(to top, #ff4800, #ff8c00, #ffcc00); /* Fire gradient */
    background-size: 100% 200%;
    background-position: 0 0; /* Start position static */
    border-radius: calc(0.75rem + 3px); /* Match outer wrapper radius */
    opacity: 1; /* Always visible */
    pointer-events: none;
    animation: fire-glow 1.3s infinite ease-in-out; /* Apply glow always */
}
/* Add flicker animation ONLY on hover */
#game-grid .game-tile-outer-wrapper:hover::before {
    animation: fire-glow 1.3s infinite ease-in-out, fire-flicker 0.6s infinite linear;
}

/* Game Servers Grid Tile Effect (Rainbow) */
#gs-game-grid .game-tile-outer-wrapper::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px; /* Border size */
    z-index: 0; /* Behind the tile */
    background: linear-gradient(to top, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff); /* Rainbow gradient */
    background-size: 100% 200%;
    background-position: 0 100%; /* Start position */
    border-radius: calc(0.75rem + 3px); /* Match outer wrapper radius */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s ease-in-out, background-position 0.5s ease-in-out;
    pointer-events: none;
}
#gs-game-grid .game-tile-outer-wrapper:hover::before {
    opacity: 1; /* Show on hover */
    background-position: 0 0; /* Animate gradient on hover */
    box-shadow: 0 0 15px 4px rgba(236, 72, 153, 0.3); /* Add subtle shadow on hover */
}
/* --- End Hover Effects --- */


/* --- Modal Styles --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50; /* Ensure modals are on top */
}

.modal-content {
    display: block; /* Ensure visibility */
    background-color: #1f2937; /* gray-800 */
    padding: 2rem;
    border-radius: 0.75rem; /* rounded-xl */
    width: 90%; /* Responsive width */
    max-width: 500px; /* Default max width */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative; /* For positioning elements inside */
}

/* Specific modal adjustments */
#admin-settings-modal .modal-content {
    max-width: 700px; /* Wider modal for admin panel */
}
/* --- Edit Banner Modal Width --- */
#edit-banner-modal .modal-content {
    max-width: 90%; /* Use percentage for wider screens */
    width: 1450px; /* Fixed width large enough for 5x 320px + spacing */
    max-width: min(1450px, 95vw); /* Allow shrinking but cap width */
}
#banner-edit-area {
    display: flex;
    gap: 1rem; /* space-x-4 */
    overflow-x: auto; /* Allow horizontal scroll if needed */
    padding-bottom: 1rem; /* pb-4 */
    margin-bottom: 1rem; /* mb-4 */
    /* Improve scrollbar appearance (optional, webkit only) */
    scrollbar-width: thin;
    scrollbar-color: #4b5563 #1f2937;
}
#banner-edit-area::-webkit-scrollbar { height: 8px; }
#banner-edit-area::-webkit-scrollbar-track { background: #1f2937; border-radius: 4px; }
#banner-edit-area::-webkit-scrollbar-thumb { background-color: #4b5563; border-radius: 4px; border: 2px solid #1f2937; }

#banner-edit-area > div { /* Style individual banner edit blocks */
    flex-shrink: 0;
    width: 320px; /* w-80 */
    border: 1px solid #4b5563; /* border-gray-600 */
    padding: 1rem; /* p-4 */
    border-radius: 0.5rem; /* rounded-lg */
    background-color: #374151; /* Slightly lighter bg */
}
#banner-edit-area h4 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    margin-bottom: 0.75rem; /* mb-3 */
    text-align: center;
    color: #e5e7eb;
}
/* --- End Edit Banner Modal Width --- */


.modal-content h3 {
    color: #e5e7eb; /* gray-200 */
    margin-bottom: 1.5rem;
    font-size: 1.5rem; /* text-2xl */
    font-weight: 600;
    /* padding-right: 100px; Removed, handle button positioning differently if needed */
}

.modal-content label {
    display: block;
    color: #9ca3af; /* gray-400 */
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem; /* text-sm */
}

/* Input, Textarea, Select common styles */
.modal-content input[type="text"],
.modal-content input[type="url"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content input[type="search"],
.modal-content input[type="color"], /* Style color input */
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 0.5rem 0.75rem; /* Adjusted padding */
    margin-bottom: 0.75rem; /* Adjusted margin */
    border-radius: 0.375rem; /* rounded-md */
    border: 1px solid #4b5563; /* gray-600 */
    background-color: #374151; /* gray-700 */
    color: #e5e7eb; /* gray-200 */
    line-height: 1.4;
    font-size: 0.875rem; /* text-sm */
}
/* Specific style for color input height */
.modal-content input[type="color"] {
    height: 2.5rem; /* h-10 */
    padding: 0.25rem; /* Adjust padding if needed */
    cursor: pointer; /* Indicate it's clickable */
}

.modal-content select { /* Specific select styling */
    appearance: none; /* Remove default system dropdown arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.modal-content textarea {
    resize: vertical; /* Allow vertical resize */
    min-height: 80px;
}

/* Focus styles for inputs */
.modal-content input[type="text"]:focus,
.modal-content input[type="url"]:focus,
.modal-content input[type="email"]:focus,
.modal-content input[type="password"]:focus,
.modal-content input[type="search"]:focus,
.modal-content input[type="color"]:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    outline: none;
    border-color: #059669; /* emerald-600 */
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.5); /* Ring effect */
}

/* Modal action buttons container */
.modal-actions {
    display: flex;
    justify-content: flex-end; /* Align buttons right */
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions button {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem; /* rounded-lg */
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    border: none;
}

.modal-actions .submit-btn { background-color: #059669; color: white; }
.modal-actions .submit-btn:hover { background-color: #047857; }
.modal-actions .danger-btn { background-color: #dc2626; color: white; } /* red-600 */
.modal-actions .danger-btn:hover { background-color: #b91c1c; } /* red-700 */
.modal-actions .cancel-btn { background-color: #4b5563; color: #e5e7eb; } /* gray-600 */
.modal-actions .cancel-btn:hover { background-color: #6b7280; } /* gray-500 */

/* Error/Warning messages */
.error-message {
    color: #f87171; /* red-400 */
    font-size: 0.875rem; /* text-sm */
    margin-top: -0.5rem; /* Pull up slightly */
    margin-bottom: 1rem;
}
.warning-message {
    color: #facc15; /* yellow-400 */
    font-size: 0.875rem; /* text-sm */
    margin-bottom: 1rem;
    border-left: 3px solid #facc15;
    padding-left: 0.75rem;
}

/* --- Profile Popup Styles --- */
#user-profile-popup {
    position: absolute;
    bottom: 3.5rem; /* Position above footer */
    left: 0.5rem;
    width: 280px;
    max-width: calc(100% - 1rem); /* Prevent overflow on small screens */
    background-color: #111827; /* gray-900 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 60; /* Above sidebar content */
    color: #d1d5db; /* gray-300 */
    overflow: visible; /* Allow avatar overlap */
    border: 1px solid #374151; /* gray-700 */
}

.profile-popup-header {
    background-color: #1f2937; /* gray-800 */
    height: 40px;
    position: relative;
}

.profile-popup-avatar {
    position: absolute;
    left: 0.75rem;
    bottom: -1.25rem; /* Overlap header */
    width: 56px; height: 56px;
    background-color: #4b5563; /* gray-600 */
    border-radius: 50%;
    border: 4px solid #111827; /* Match popup background */
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
    color: #d1d5db; /* gray-300 */
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.edit-avatar-overlay {
     position: absolute; top: 0; left: 0; right: 0; bottom: 0;
     background-color: rgba(0, 0, 0, 0.5);
     display: flex; align-items: center; justify-content: center;
     color: white; border-radius: 50%;
     opacity: 0; /* Hidden by default */
     transition: opacity 0.2s ease-in-out;
     cursor: pointer;
     z-index: 10; /* Ensure overlay is on top of image/icon */
}
.profile-popup-avatar:hover .edit-avatar-overlay { opacity: 1; } /* Show on hover */
.edit-avatar-overlay i { font-size: 1.2rem; }
.profile-popup-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-popup-body {
    padding: 0.75rem;
    padding-top: 2.25rem; /* Space for overlapping avatar */
    position: relative; /* For settings icons */
}

.profile-popup-settings-icons {
    position: absolute;
    top: 0.5rem; right: 0.5rem;
    display: flex;
    gap: 0.5rem;
}
.profile-popup-settings-icons i {
    font-size: 0.9rem;
    color: #6b7280; /* gray-500 */
    cursor: pointer;
    transition: color 0.2s ease;
}
.profile-popup-settings-icons i:hover { color: #9ca3af; /* gray-400 */ }
.admin-settings-icon { color: #10b981 !important; /* emerald-500 */ }
.admin-settings-icon:hover { color: #059669 !important; /* emerald-600 */ }

.profile-popup-username {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e5e7eb; /* gray-200 */
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.profile-popup-badges {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.profile-popup-badge {
    background-color: #374151; /* gray-700 */
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem; /* rounded-sm */
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #9ca3af; /* gray-400 */
    font-weight: 500;
}
.profile-popup-badge i { font-size: 0.8em; margin-right: 0.1rem; }
.role-admin { color: #10b981; /* emerald-500 */ }
.role-user { color: #9ca3af; /* gray-400 */ }

.profile-popup-divider {
    height: 1px;
    background-color: #374151; /* gray-700 */
    margin: 0.75rem 0;
}

#owned-servers-section h4 {
    font-size: 0.75rem; /* text-xs */
    text-transform: uppercase;
    color: #6b7280; /* gray-500 */
    margin-bottom: 0.5rem;
    font-weight: 600;
}
#owned-servers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding-bottom: 0;
    min-height: 40px; /* Space even if empty */
}
#owned-servers-grid .game-tile { background-color: transparent; padding: 0; width: auto; border-radius: 0; cursor: default; display: flex; justify-content: center; align-items: center; }
#owned-servers-grid .game-tile:hover .game-tile-content { display: none; }
#owned-servers-grid .game-tile-outer-wrapper { border-radius: 0.375rem; }
#owned-servers-grid .game-tile-outer-wrapper:hover { transform: none; z-index: auto; }
#owned-servers-grid .game-tile-outer-wrapper::before { display: none; }
#owned-servers-grid .game-tile-image-wrapper { flex-shrink: 0; border-radius: 0.375rem; width: 40px; height: 40px; overflow: hidden; margin-bottom: 0; display: block; transition: transform 0.2s ease-in-out; cursor: pointer; }
#owned-servers-grid .game-tile-image-wrapper:hover { transform: scale(1.1); }
#owned-servers-grid .game-tile img { height: 100%; width: 100%; object-fit: cover; }
#owned-servers-grid .game-tile-content { display: none !important; }
#owned-servers-grid .drag-handle, #owned-servers-grid .tile-actions { display: none !important; }

/* User Settings Menu (inside profile popup) */
#user-settings-menu {
    position: absolute;
    top: 2.5rem; /* Below settings icons */
    right: 0.5rem;
    background-color: #1f2937; /* gray-800 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 70; /* Above profile popup body */
    width: 200px;
    padding: 0.5rem;
    border: 1px solid #374151; /* gray-700 */
}
.settings-menu-item {
    display: flex; align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem; /* text-sm */
    color: #d1d5db; /* gray-300 */
    cursor: pointer;
    border: none; background: none; width: 100%; text-align: left;
    border-radius: 0.25rem; /* rounded-sm */
    transition: background-color 0.1s ease, color 0.1s ease;
}
.settings-menu-item:hover { background-color: #374151; color: #ffffff; }
.settings-menu-item i { margin-right: 0.75rem; width: 1em; text-align: center; color: #9ca3af; }
.settings-menu-item:hover i { color: #d1d5db; }
#settings-signout-btn { color: #f87171; /* red-400 */ }
#settings-signout-btn:hover { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; /* red-500 */ }
#settings-signout-btn:hover i { color: #ef4444; }

/* --- Admin Panel Styles --- */
#admin-user-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-height: 60vh; overflow-y: auto; padding-right: 0.5rem; margin-top: 1rem; }
.admin-user-tile { display: flex; flex-direction: column; gap: 0.75rem; background-color: #111827; padding: 1rem; border-radius: 0.5rem; border: 1px solid #374151; }
.admin-user-header { display: flex; gap: 1rem; align-items: center; }
.admin-user-avatar { width: 80px; height: 80px; border-radius: 50%; background-color: #4b5563; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 3px solid #374151; flex-shrink: 0; }
.admin-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-user-avatar i { font-size: 2.5rem; color: #9ca3af; }
.admin-user-info { flex-grow: 1; position: relative; /* Needed for dropdown positioning */ }
.admin-user-info .username { font-weight: 600; font-size: 1rem; color: #e5e7eb; }
.admin-user-info .email { font-size: 0.875rem; color: #9ca3af; margin-bottom: 0.3rem; word-break: break-all; }
.admin-user-info .role-display { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.admin-user-info .role-display .profile-popup-badge { cursor: default; } /* Badge not clickable */
.edit-role-btn { background-color: #4b5563; color: #d1d5db; padding: 0.1rem 0.4rem; border-radius: 0.25rem; font-size: 0.7rem; cursor: pointer; transition: background-color 0.2s ease; border: none; line-height: 1; }
.edit-role-btn:hover { background-color: #6b7280; }
.edit-role-btn i { font-size: 0.8em; }
.role-dropdown { position: absolute; top: 100%; left: 0; margin-top: 0.25rem; background-color: #2d3748; border: 1px solid #4a5568; border-radius: 0.375rem; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 80; width: 100px; padding: 0.25rem 0; }
.role-dropdown a { display: block; padding: 0.25rem 0.75rem; font-size: 0.875rem; color: #e2e8f0; text-decoration: none; white-space: nowrap; }
.role-dropdown a:hover { background-color: #4a5568; }
.admin-user-actions { display: flex; justify-content: flex-end; gap: 0.25rem; }
.admin-user-actions button, .admin-user-info .manage-roles-btn { background-color: #374151; color: #d1d5db; padding: 0.2rem 0.5rem; border-radius: 0.25rem; font-size: 0.7rem; cursor: pointer; transition: background-color 0.2s ease; border: none; margin-right: 0.4rem; margin-top: 0.5rem; }
.admin-user-actions button:hover, .admin-user-info .manage-roles-btn:hover { background-color: #4b5563; }
.admin-user-actions .delete-user-btn { color: #f87171; } /* Style delete button */
.admin-user-actions .delete-user-btn:hover { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; }
.admin-user-servers { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #374151; }
.admin-user-servers h5 { font-size: 0.7rem; text-transform: uppercase; color: #6b7280; margin-bottom: 0.4rem; font-weight: 600; }
.admin-user-servers-grid { display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 32px; }
.admin-user-servers-grid .game-tile { background-color: transparent; padding: 0; width: auto; border-radius: 0; cursor: default; display: block; }
.admin-user-servers-grid .game-tile-outer-wrapper { border-radius: 0.375rem; }
.admin-user-servers-grid .game-tile-outer-wrapper:hover { transform: none; z-index: auto; }
.admin-user-servers-grid .game-tile-outer-wrapper::before { display: none; }
.admin-user-servers-grid .game-tile-image-wrapper { flex-shrink: 0; border-radius: 0.375rem; width: 32px; height: 32px; overflow: hidden; margin: 0; display: block; transition: transform 0.2s ease-in-out; cursor: pointer; }
.admin-user-servers-grid .game-tile-image-wrapper:hover { transform: scale(1.1); }
.admin-user-servers-grid .game-tile img { height: 100%; width: 100%; object-fit: cover; }
.admin-user-servers-grid .game-tile-content { display: none !important; }
.admin-user-servers-grid .drag-handle, .admin-user-servers-grid .tile-actions { display: none !important; }

/* Utility Styles */
.hidden { display: none !important; }
.admin-only { /* Used by JS to toggle visibility */ }

/* Style for Create User button */
#show-create-user-btn {
    position: absolute;
    top: 1.5rem; /* Adjust as needed based on h3 padding */
    right: 1.5rem;
    background-color: #059669; /* emerald-600 */
    color: white;
    font-size: 0.75rem; /* text-xs */
    font-weight: 600; /* font-semibold */
    padding: 0.25rem 0.75rem; /* py-1 px-3 */
    border-radius: 0.375rem; /* rounded-md */
    transition: background-color 0.2s ease;
}
#show-create-user-btn:hover {
    background-color: #047857; /* emerald-700 */
}

/* Style for Game Server Search Input */
#gs-search-input {
     /* Using Tailwind classes in HTML, but can add overrides here if needed */
     /* Example: Increase font size */
     /* font-size: 1rem; */
}

/* Style for No Results Message in GS Grid */
.no-results-message {
    /* Styles set inline by JS, can add more here */
}