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

:root {
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --accent-cyan: #00f0ff;
    --accent-magenta: #b026ff;
    --text-main: #e0e0e0;
    --text-muted: #8b8b99;
    --glass-bg: rgba(20, 20, 30, 0.6);
    --glass-border: rgba(0, 240, 255, 0.2);
    --glass-border-hover: rgba(0, 240, 255, 0.6);
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-magenta);
}

/* Typography Classes */
.font-tech {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-muted {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* Background Animation */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        linear-gradient(rgba(10, 10, 15, 0.9), rgba(10, 10, 15, 0.9)),
        url('data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20z" fill="%2300f0ff" fill-opacity="0.03" fill-rule="evenodd"/%3E%3C/svg%3E');
    animation: bgScroll 60s linear infinite;
}

@keyframes bgScroll {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 1000px; }
}

/* Custom Navbar */
.custom-navbar {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.custom-navbar .logo-text {
    color: var(--accent-cyan);
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.custom-logout-btn {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: 'Orbitron', sans-serif;
    padding: 8px 25px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2) inset, 0 0 10px rgba(0, 240, 255, 0.2);
}

.custom-logout-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6) inset, 0 0 20px rgba(0, 240, 255, 0.6);
    transform: translateY(-2px);
}

/* Header Banner Section */
.header-banner-section {
    padding: 60px 0;
    position: relative;
    text-align: center;
    background: radial-gradient(circle at center, rgba(0,240,255,0.05) 0%, transparent 70%);
}

.dashboard-title {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: 2px;
}

.dashboard-title .highlight {
    color: var(--accent-magenta);
    text-shadow: 0 0 20px rgba(176, 38, 255, 0.8);
}

.breadcrumb-text {
    font-size: 1rem;
    color: var(--accent-cyan);
    opacity: 0.8;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 240, 255, 0.15);
}

/* Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
    min-height: 140px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    font-size: 1.8rem;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.glass-card:hover .stat-icon {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

.stat-details {
    text-align: left;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.4rem;
    color: #fff;
    margin: 0;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 2rem;
    margin: 40px 0 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title::before, .section-title::after {
    content: '';
    height: 2px;
    width: 50px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* Game Cards */
.game-card-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    border: 1px solid transparent;
    transition: all 0.4s ease;
    height: 100%;
    cursor: pointer;
}

.game-card-wrapper::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-magenta));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 14px;
}

.game-card-wrapper:hover::before {
    opacity: 1;
    animation: borderGlow 2s linear infinite;
}

@keyframes borderGlow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.game-card-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.4s ease;
}

.game-card-wrapper:hover img {
    transform: scale(1.05);
}

/* HUD Modals */
.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--accent-cyan);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2), inset 0 0 20px rgba(0, 240, 255, 0.05);
    color: var(--text-main);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding: 20px 25px;
    background: rgba(0, 240, 255, 0.05);
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-cyan);
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2300f0ff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.modal-body .form-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.modal-body .form-control {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.modal-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modal-body .form-control:focus {
    background: rgba(0, 0, 0, 0.7);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    color: #fff;
}

.modal-footer {
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    padding: 15px 25px;
    background: rgba(0, 240, 255, 0.02);
    border-radius: 0 0 12px 12px;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-theme {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    padding: 10px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn-theme:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

.btn-theme:disabled {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.3);
    box-shadow: none;
}

/* Gateway Options */
.gateway-option {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 90px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    filter: grayscale(100%) opacity(0.7);
}

.gateway-option:hover {
    border-color: rgba(0, 240, 255, 0.4);
    filter: grayscale(50%) opacity(0.9);
}

.gateway-option.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 240, 255, 0.1);
    filter: grayscale(0%) opacity(1);
}

.gateway-img {
    max-height: 40px;
    max-width: 100%;
    object-fit: contain;
}

/* QR Code & Status specifics */
.qr-container {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.hud-box {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.text-cyan { color: var(--accent-cyan) !important; }
.text-magenta { color: var(--accent-magenta) !important; }

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cyber-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 240, 255, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite, glow 2s alternate infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes glow { 100% { box-shadow: 0 0 20px var(--accent-cyan); } }

.loader-text {
    margin-top: 20px;
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px var(--accent-cyan); }
    50% { opacity: 0.5; text-shadow: none; }
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    .dashboard-title { font-size: 2.2rem; }
    .stat-card { padding: 15px; }
    .stat-icon { width: 45px; height: 45px; font-size: 1.4rem; }
    .stat-value { font-size: 1.1rem; }
    .section-title { font-size: 1.5rem; }
    .custom-navbar .logo-text { font-size: 1.4rem; }
}