:root {
    --primary: #1E293B;
    --primary-light: #334155;
    --primary-dark: #0F172A;
    --accent: #FFFFFF;
    --accent-light: #F8FAFC;
    --background-primary: #000000;
    --background-secondary: #0F172A;
    --background-tertiary: #1E293B;
    --background-card: #334155;
    --text-primary: #FFFFFF;
    --text-secondary: #E2E8F0;
    --text-muted: #94A3B8;
    --border-primary: #475569;
    --border-accent: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000000;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

*::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none; /* WebKit */
}

body {
    overflow-x: hidden;
    background: linear-gradient(135deg, #000000 0%, #0F172A 50%, #1E293B 100%);
    min-height: 100vh;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    transition: all 0.3s ease;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 32px;
    height: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.1);
}

.logo:hover {
    transform: scale(1.1) rotate(2deg);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4)) brightness(1.2);
}

.site-name {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.site-name:hover {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--background-tertiary);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger:hover span {
    background: var(--text-primary);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.main-container {
    min-height: 100vh;
    padding-top: 70px;
    display: flex;
    flex-direction: row;
    position: relative;
}

.content-section {
    flex: 1;
    padding: 1rem 2rem 2rem 2rem;
    position: relative;
    z-index: 5;
    background: transparent;
    min-height: calc(100vh - 70px);
    overflow-y: auto;
    margin-right: 550px;
    box-sizing: border-box;
}

.version-selection {
    width: 100%;
    opacity: 1;
    transform: translateY(0);
}

.selected-version-panel {
    position: fixed;
    top: 70px;
    right: 0;
    bottom: 0;
    width: 550px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 100;
    overflow-y: auto;
    transform: translateX(0);
    opacity: 1;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.version-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.version-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    min-height: 200px;
}

.version-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.version-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(30, 41, 59, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.version-card:hover::after {
    opacity: 1;
}

.version-card:hover, .version-card.selected {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.15);
    background: rgba(30, 41, 59, 0.8);
}

.version-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

.version-card-content {
    padding: 0.25rem 1.5rem 1.5rem 1.5rem;
}

.version-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.version-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    opacity: 0.8;
}

.version-details-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.version-preview-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.version-details-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.version-details-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    max-height: 120px;
    overflow-y: auto;
}

.version-controls {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
}

.control-group {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.control-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.control-group:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

.control-group:hover::before {
    left: 100%;
}

.control-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.control-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 1;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-primary);
    transition: .3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.toggle-switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.client-selector-container {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    padding: 1rem 1rem 1.25rem 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.client-selector-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.client-selector-container:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

.client-selector-container:hover::before {
    left: 100%;
}

.client-logos {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.client-logo {
    width: 59px;
    height: 59px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.client-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.client-logo:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.client-logo.selected {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.client-logo.selected::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #22c55e;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.client-logo.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
}

.client-logo.disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.launch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1.125rem 2rem;
    border: none;
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(30, 41, 59, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
    letter-spacing: -0.025em;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    text-transform: uppercase;
}

.launch-button-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.launch-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease-out;
}

.launch-button:hover::before {
    left: 100%;
}

.launch-button:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 40px rgba(30, 41, 59, 0.6), 0 8px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-color: rgba(255, 255, 255, 0.2);
}

.launch-button:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.1s ease;
}

.launch-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.online-indicator {
    position: absolute;
    bottom: -8px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 100px;
    z-index: 10;
    animation: float 3s ease-in-out infinite;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.online-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.5), 0 4px 15px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, rgba(34, 197, 94, 1), rgba(22, 163, 74, 1));
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

.loading-pulse {
    animation: loadingPulse 1.5s ease-in-out infinite alternate;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: loading-spin 0.8s ease-in-out infinite;
}

/* Enhanced loading states for launch button */
.launch-button.launching {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

.launch-button.launching::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loading-wave 1.5s ease-in-out infinite;
}

.launch-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.launch-button-text {
    transition: all 0.3s ease;
}

.launch-button.launching .launch-button-icon {
    animation: loading-spin 1s linear infinite;
}

/* Full-screen loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.loading-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
    max-width: 400px;
    padding: 2rem;
}

.loading-spinner-large {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--accent);
    animation: loading-spin 1s linear infinite;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.loading-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.loading-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.loading-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: loading-pulse 2s ease-in-out infinite alternate;
}

.loading-tips {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.8;
}

@keyframes loading-wave {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes loading-pulse {
    0% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Online indicator text styling */
.online-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.025em;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.online-count-display {
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-right: 0.25rem;
}

/* Offline state styling */
.online-indicator.offline {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.9), rgba(75, 85, 99, 0.9));
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.online-indicator.offline .online-dot {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

/* Error state styling */
.online-indicator.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes loading-spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes loadingPulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Game client iframe - optimized */
#client-iframe {
    display: none;
    width: 100vw;
    height: 100vh;
    border: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
}

/* Defensive: force-hide any legacy back button if present */
/* Defensive rule to hide any dynamically created back buttons */
#back-button { display: none !important; visibility: hidden !important; }

/* Debug Panel */
.debug-panel {
    position: fixed;
    top: 20px;
    right: -400px;
    width: 380px;
    height: calc(100vh - 40px);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    font-size: 13px;
}

.debug-panel.show {
    right: 20px;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--primary-dark);
}

.debug-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.debug-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.debug-close:hover {
    background: var(--primary-light);
}

.debug-content {
    padding: 20px;
}

.debug-section {
    margin-bottom: 20px;
}

.debug-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--accent);
}

.debug-section div {
    background: var(--background-tertiary);
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .debug-panel {
        width: calc(100vw - 20px);
        right: -100vw;
    }
    
    .debug-panel.show {
        right: 10px;
    }
}



#loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3001;
}

#loading-spinner::before {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    border: 4px solid rgba(79, 70, 229, 0.2);
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 10px rgba(79, 70, 229, 0.3));
}

#loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced focus states for accessibility */
.nav-link:focus,
.launch-button:focus,
.version-card:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Text selection */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Responsive design for sidebar layout */
@media screen and (max-width: 1400px) {
    .selected-version-panel {
        width: 550px;
    }
    
    .content-section {
        margin-right: 550px;
    }
}

@media screen and (max-width: 1200px) {
    .selected-version-panel {
        width: 450px;
    }
    
    .content-section {
        margin-right: 450px;
    }
}

@media screen and (max-width: 1200px) and (min-width: 969px) {
    .selected-version-panel {
        width: 450px;
    }
    
    .content-section {
        margin-right: 450px;
    }
}

@media screen and (max-width: 968px) {
    .main-container {
        flex-direction: column;
    }
    
    .selected-version-panel {
        position: static;
        width: 100%;
        animation: fadeInUp 1s ease-out 0.4s both;
        transform: translateY(20px);
        opacity: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(30, 41, 59, 0.7);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
    }
    
    .content-section {
        margin-right: 0;
    }
    
    .version-details-card {
        background: rgba(30, 41, 59, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 24px;
        padding: 2rem;
        margin: 1rem;
    }
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {


    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        height: 70px;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
        padding: 0.5rem;
        border-radius: var(--radius-md);
        transition: background-color 0.2s ease;
    }

    .hamburger:hover {
        background: var(--background-card);
    }

    .navbar-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0 0 20px 20px;
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
    }

    .navbar-right.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .logo {
        width: 36px;
        height: 36px;
    }

    body {
        padding-top: 70px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .version-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .version-card {
        min-height: 150px;
    }

    .version-details-card {
        position: static;
        height: auto;
    }

    .content-section {
        padding: 1rem;
    }

    .online-indicator {
        bottom: -4px;
        right: -4px;
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        min-width: 70px;
    }

    .site-name {
        font-size: 1.125rem;
    }

    .nav-link {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        margin: 0.25rem 0;
        border-radius: var(--radius-lg);
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .navbar {
        padding: 0.5rem 0.75rem;
        height: 60px;
    }

    body {
        padding-top: 60px;
    }

    .version-card-content {
        padding: 1rem;
    }

    .version-details-card {
        padding: 1.5rem;
    }

    .online-indicator {
        bottom: -3px;
        right: -3px;
        padding: 0.35rem 0.5rem;
        font-size: 0.65rem;
        min-width: 60px;
    }

    .site-name {
        font-size: 1rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
