body {
    font-family: 'Inter', sans-serif;
    /* Updated background with pixelated geometric SVG */
    background-color: #1a1a2e; /* Fallback color */
    background-image: url('data:image/svg+xml,%3Csvg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3Cpattern id="pixelGrid" width="20" height="20" patternUnits="userSpaceOnUse"%3E%3Crect x="0" y="0" width="10" height="10" fill="%230f0f1a"/%3E%3Crect x="10" y="10" width="10" height="10" fill="%230f0f1a"/%3E%3Crect x="10" y="0" width="10" height="10" fill="%231a1a2e"/%3E%3Crect x="0" y="10" width="10" height="10" fill="%231a1a2e"/%3E%3C/pattern%3E%3C/defs%3E%3Crect x="0" y="0" width="100%25" height="100%25" fill="url(%23pixelGrid)"/%3E%3Cpolygon points="0,0 200,0 100,100" fill="%2300f2fe" opacity="0.03"/%3E%3Cpolygon points="0,200 200,200 100,100" fill="%2300f2fe" opacity="0.03"/%3E%3C/svg%3E');
    background-size: 200px 200px; /* Size of the repeating pattern */
    background-repeat: repeat;
    color: #e0e0e0; /* Light gray for text */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll on some effects */
}
h1, h2, h3, h4, h5, .navbar-brand {
    font-family: 'Orbitron', sans-serif; /* Futuristic font for headings */
    color: #00f2fe; /* Neon blue accent */
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.6); /* Subtle glow */
}

/* Navbar */
.navbar {
    background-color: #0f0f1a; /* Even darker background */
    border-bottom: 2px solid #00f2fe; /* Neon border */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.navbar-brand {
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #00f2fe !important; /* Ensure neon color */
    font-family: 'Orbitron', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: font-size 0.2s;
}
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
        max-width: 60vw;
        white-space: normal;
        word-break: break-word;
        text-align: left;
    }
}
.nav-link {
    color: #e0e0e0 !important;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    padding-bottom: 0.5rem;
}
.nav-link:hover {
    color: #00f2fe !important;
    text-shadow: 0 0 5px #00f2fe;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #00f2fe;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Hero Section (Not directly used, but styles are present) */
.app-hero {
    background: linear-gradient(135deg, #001f3f 0%, #000a1a 100%); /* Darker, more intense gradient */
    color: #e0e0e0;
    padding: 6rem 0; /* Adjusted for mobile */
    border-bottom: 5px solid #00f2fe; /* Stronger neon border */
    box-shadow: inset 0 -10px 20px rgba(0, 242, 254, 0.1); /* Inner glow */
    position: relative;
    overflow: hidden;
}
.app-hero .display-3 {
    color: #00f2fe;
    text-shadow: 0 0 15px #00f2fe;
    font-size: 2.5rem; /* Default smaller font size for mobile */
}
@media (min-width: 576px) { /* Small devices (sm) and up */
    .app-hero .display-3 {
        font-size: 3.5rem; /* Medium font size */
    }
}
@media (min-width: 768px) { /* Medium devices (md) and up */
    .app-hero {
        padding: 10rem 0; /* Larger padding for desktop */
    }
    .app-hero .display-3 {
        font-size: 4.5rem; /* Larger font size for desktop */
    }
}
@media (min-width: 992px) { /* Large devices (lg) and up */
    .app-hero .display-3 {
        font-size: 5rem; /* Bootstrap's default display-3 size */
    }
}


/* Buttons (General) */
.btn-game {
    background: linear-gradient(180deg, #00f2fe 0%, #00aaff 100%); /* Neon gradient */
    border: 2px solid #00f2fe;
    color: #0f0f1a; /* Dark text for contrast */
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 8px; /* Slightly sharper corners */
    padding: 0.85rem 2.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}
.btn-game:hover {
    background: linear-gradient(180deg, #00aaff 0%, #00f2fe 100%);
    border-color: #00aaff;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.8);
    transform: translateY(-2px);
    color: #0f0f1a;
}
.btn-outline-game {
    background: transparent;
    border: 2px solid #00f2fe;
    color: #00f2fe;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}
.btn-outline-game:hover {
    background-color: #00f2fe;
    color: #0f0f1a;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

/* App Cards */
.app-card {
    background-color: #0f0f1a; /* Dark card background */
    border: 1px solid #00f2fe; /* Neon border */
    border-radius: 12px; /* Slightly rounded */
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2); /* Subtle glow */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.app-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.6); /* More intense glow on hover */
}
.app-card .app-icon-img { /* Renamed to avoid conflict with .app-icon */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    height: 200px; /* Fixed height for consistency */
    width: 100%;
    object-fit: cover;
    border-bottom: 1px solid #00f2fe; /* Separator for image */
}
.app-card .app-icon-img.nsfw {
    filter: blur(20px);
    position: relative;
}
.app-card .card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: #c0c0c0; /* Lighter text for body */
}
.app-card .card-title {
    color: #00f2fe; /* Neon title */
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.4);
    margin-bottom: 0.75rem;
}
.app-card .card-text {
    flex-grow: 1;
    font-size: 0.95rem;
}

/* Section Headings */
.section-heading {
    color: #00f2fe;
    text-shadow: 0 0 10px #00f2fe;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1rem;
}
.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #00f2fe;
    box-shadow: 0 0 10px #00f2fe;
}

/* Modal specific styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-dialog-centered { /* Bootstrap class for centering */
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}
.modal-content { /* Reverted to Bootstrap's .modal-content */
    background-color: #0f0f1a; /* Dark modal background */
    border: 2px solid #00f2fe; /* Neon border */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.6); /* Stronger glow */
    width: 100%; /* Ensure it takes full width of modal-dialog */
}
.modal-header {
    background: linear-gradient(90deg, #001f3f 0%, #000a1a 100%); /* Dark gradient header */
    color: #00f2fe;
    border-bottom: 1px solid #00f2fe;
    padding: 1.5rem;
}
.modal-title {
    color: #00f2fe;
    text-shadow: 0 0 8px #00f2fe;
}
.btn-close {
    filter: invert(1) brightness(2); /* Make close button visible on dark background */
    background-color: transparent; /* Ensure no default Bootstrap background */
    opacity: 1; /* Ensure visible */
    color: #00f2fe; /* Neon color for the X */
    font-size: 1.5rem; /* Larger X */
    text-shadow: 0 0 5px #00f2fe;
}
.modal-body {
    color: #c0c0c0;
    padding: 2rem;
}
.modal-body img {
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid #00f2fe; /* Image border */
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
    width: 100%; /* Ensure image is responsive */
    height: auto;
}
.modal-footer {
    border-top: 1px solid #00f2fe;
    padding: 1.5rem 2rem;
    justify-content: space-between;
    background-color: #0f0f1a;
}

/* App Detail Modal Responsive Fixes */
@media (max-width: 600px) {
    .modal-dialog {
        max-width: 98vw !important;
        margin: 0 1vw !important;
    }
    .modal-content {
        max-width: 100vw !important;
        border-radius: 10px;
        padding: 0.5rem;
    }
    .modal-header, .modal-footer {
        padding: 1rem !important;
    }
    .modal-body {
        padding: 1rem !important;
    }
    #modalAppScreenshot {
        max-width: 100% !important;
        height: auto !important;
        margin-bottom: 1rem;
    }
    .d-flex.flex-md-row {
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* Fullscreen appDetailModal on mobile */
@media (max-width: 576px) {
    #appDetailModal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        min-width: 100vw !important;
        min-height: 100vh !important;
        z-index: 9999 !important;
        background: rgba(24,26,27,0.98) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    #appDetailModal .modal-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    #appDetailModal .modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        overflow-y: auto !important;
    }
    #appDetailModal .modal-header,
    #appDetailModal .modal-footer {
        border-radius: 0 !important;
    }
    #appDetailModal .modal-body {
        padding: 1rem !important;
    }
}

/* Footer */
.footer-gradient {
    background: linear-gradient(45deg, #000a1a 0%, #001f3f 100%); /* Darker footer gradient */
    color: #e0e0e0;
    border-top: 2px solid #00f2fe;
    box-shadow: inset 0 5px 15px rgba(0, 242, 254, 0.1);
}

/* Custom scrollbar for better aesthetics - Bootstrap doesn't have a direct equivalent for this */
.no-scrollbar::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e; /* Darker track */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #00f2fe; /* Neon thumb */
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
}
::-webkit-scrollbar-thumb:hover {
    background: #00aaff; /* Lighter neon on hover */
}

.message-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #00f2fe; /* Neon for success */
    color: #0f0f1a; /* Dark text for contrast */
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.message-box.show {
    opacity: 1;
    visibility: visible;
}

/* Admin Panel Specific Styles */
.admin-panel {
    background-color: #0f0f1a;
    border: 2px solid #00f2fe;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.6);
    padding: 2rem;
    color: #e0e0e0;
}
.admin-panel .form-control, .admin-panel .form-select {
    background-color: #1a1a2e;
    border: 1px solid #00f2fe;
    color: #e0e0e0;
}
.admin-panel .form-control:focus, .admin-panel .form-select:focus {
    background-color: #1a1a2e;
    border-color: #00aaff;
    box-shadow: 0 0 0 0.25rem rgba(0, 242, 254, 0.25);
    color: #e0e0e0;
}
/* Placeholder text color for dark backgrounds */
.admin-panel .form-control::placeholder { /* Standard */
    color: rgba(224, 224, 224, 0.7); /* Lighter, semi-transparent white */
}
.admin-panel .form-control::-webkit-input-placeholder { /* Chrome, Safari, Opera */
    color: rgba(224, 224, 224, 0.7);
}
.admin-panel .form-control::-moz-placeholder { /* Firefox 19+ */
    color: rgba(224, 224, 224, 0.7);
    opacity: 1; /* Firefox adds opacity by default */
}
.admin-panel .form-control:-ms-input-placeholder { /* IE 10+ */
    color: rgba(224, 224, 224, 0.7);
}
.admin-panel .form-control::-ms-input-placeholder { /* Edge */
    color: rgba(224, 224, 224, 0.7);
}

.admin-panel .table {
    color: #e0e0e0;
    border-color: #00f2fe;
}
.admin-panel .table th {
    color: #00f2fe;
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.4);
    border-bottom-color: #00f2fe;
}
.admin-panel .table td {
    border-top-color: #00f2fe;
}
.admin-panel .table-hover tbody tr:hover {
    background-color: rgba(0, 242, 254, 0.1);
}
.admin-panel .btn-action {
    background: none;
    border: none;
    color: #00f2fe;
    font-size: 1.2rem;
    margin: 0 0.25rem;
    transition: color 0.2s ease;
}
.admin-panel .btn-action:hover {
    color: #00aaff;
}
.btn-action.edit-app {
    color: #00f2fe;
    background: transparent;
    border: none;
}
.btn-action.delete-app {
    color: #ff6b6b;
    background: transparent;
    border: none;
}
.btn-action.edit-app:hover {
    color: #00aaff;
}
.btn-action.delete-app:hover {
    color: #ff3b3b;
}
/* App Detail Modal custom max width/height for consistency */
#appDetailModal .modal-content {
    max-width: 800px;
    max-height: 600px;
    margin: auto;
}
#closeModalBtn {
    position: absolute;
    top: 16px;
    right: 16px;
}

/* Orbitron font for all buttons */
button, .btn, .btn-game, .btn-outline-game, .category-btn, .btn-close, a.btn {
    font-family: 'Orbitron', 'Inter', Arial, sans-serif !important;
    text-align: center !important;
    font-weight: 500;
    letter-spacing: 1px;
}
button svg, a.btn svg {
    display: block;
    margin: 0 auto;
}