/* GameFunTV Desktop Edition Stylesheet */

:root {
    --bg-dark: #070913;
    --bg-card: rgba(15, 20, 36, 0.88);
    --bg-card-hover: rgba(22, 30, 54, 0.95);
    --border-card: rgba(86, 114, 184, 0.28);
    --border-active: #3b82f6;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-blue: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-glow: rgba(37, 99, 235, 0.35);
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-green: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

/* ==================== DESKTOP AUTH (LOGIN & REGISTER) ==================== */
.desktop-auth-body {
    overflow-y: auto;
    background: radial-gradient(circle at 50% 20%, #151d38 0%, #070913 70%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.desktop-auth-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.3s ease-out;
}

.auth-brand-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-tag {
    color: #60a5fa;
}

.badge-status {
    color: #34d399;
}

.desktop-auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-header {
    text-align: center;
    margin-bottom: 6px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    margin-bottom: 12px;
}

.auth-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}

.auth-logo .logo-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-logo .logo-title em {
    font-style: normal;
    color: #60a5fa;
    font-size: 14px;
    background: rgba(59, 130, 246, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.auth-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.desktop-alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
}

.form-group input {
    background: rgba(7, 9, 19, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus {
    border-color: var(--border-active);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.desktop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, background-color 0.15s, box-shadow 0.15s;
    border: none;
}

.desktop-btn:hover {
    transform: translateY(-1px);
}

.desktop-btn:active {
    transform: translateY(0);
}

.desktop-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.desktop-btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

.desktop-btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-links a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.vr-switch-hint {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed rgba(148, 163, 184, 0.15);
}

.desktop-features-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.showcase-item {
    background: rgba(15, 20, 36, 0.6);
    border: 1px solid rgba(86, 114, 184, 0.15);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showcase-item .icon {
    font-size: 16px;
    color: #60a5fa;
}

.showcase-item strong {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
}

.showcase-item p {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

/* ==================== DESKTOP IN-GAME HUD & WORKSPACE ==================== */
#vr-root {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#vr-root canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    outline: none;
}

.desktop-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hud-interactive {
    pointer-events: auto;
}

/* Top bar */
.desk-topbar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(7, 9, 19, 0.85) 0%, rgba(7, 9, 19, 0) 100%);
}

.desk-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.desk-brand {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.desk-brand .brand-pill {
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.desk-user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
}

.desk-tokens {
    color: var(--accent-amber);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.desk-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desk-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.desk-nav-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.desk-nav-btn.danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* Controls reminder (WASD & Mouse) */
.desk-move-hud {
    pointer-events: auto;
    position: fixed;
    left: 20px;
    bottom: 90px;
    background: rgba(11, 15, 29, 0.75);
    border: 1px solid rgba(86, 114, 184, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: #cbd5e1;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 260px;
    transition: opacity 0.2s;
}

.desk-move-hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: #60a5fa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.desk-move-hud ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.desk-move-hud kbd {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 10px;
    font-family: inherit;
    font-weight: 700;
    color: #fff;
    margin-right: 4px;
}

/* Bottom Game Launcher Dock */
.desk-dock-container {
    pointer-events: auto;
    display: flex;
    justify-content: center;
    padding-bottom: 16px;
}

.desk-dock {
    background: rgba(11, 15, 29, 0.85);
    border: 1px solid rgba(86, 114, 184, 0.35);
    border-radius: 14px;
    padding: 6px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.dock-item {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.dock-item .dock-key {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    color: #cbd5e1;
}

.dock-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-2px);
}

.dock-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.4), rgba(59, 130, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.dock-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
}

/* Start screen overlay on desktop */
.desk-start-overlay {
    pointer-events: auto;
    position: fixed;
    inset: 0;
    background: rgba(7, 9, 19, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.25s;
}

.desk-start-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.desk-start-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 520px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.desk-start-modal h2 {
    font-size: 26px;
    font-weight: 800;
}

.desk-start-modal p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.desk-start-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* Loading spinner bar */
.desk-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(11, 15, 29, 0.9);
    border: 1px solid rgba(86, 114, 184, 0.3);
    padding: 24px 32px;
    border-radius: 12px;
    text-align: center;
    z-index: 100;
    transition: opacity 0.3s;
}

.desk-loading.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.desk-loading-bar {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.desk-loading-bar span {
    display: block;
    height: 100%;
    width: 40%;
    background: #3b82f6;
    animation: loadSlide 1.2s infinite ease-in-out;
}

@keyframes loadSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Guest banner */
.desk-guest-banner {
    background: rgba(245, 158, 11, 0.15);
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
    color: #fde68a;
    font-size: 12px;
    text-align: center;
    padding: 6px 12px;
    pointer-events: auto;
}

.desk-guest-banner a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}
