/* ═══════════════════════════════════════════════════════════
   GAME SECTION, FOOTER & SOCIAL MEDIA FIXES
   Pure solid backgrounds with no gray
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   1. GAME SECTION - PURE WHITE BACKGROUND (Light Mode)
   ═══════════════════════════════════════════════════════════ */
#debug-runner-section,
#debug-runner-section.bg-gray-50,
section#debug-runner-section {
    background: var(--card-surface-light) !important;
    background-color: var(--card-surface-light) !important;
    background-image: none !important;
    background-blend-mode: normal !important;
}

/* ═══════════════════════════════════════════════════════════
   2. GAME CONTAINER - Clean Border, No Gray 
   ═══════════════════════════════════════════════════════════ */
#debug-runner-container {
    max-width: 800px !important;
    margin: 0 auto !important;
    background: transparent !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    border: 2px solid var(--card-border-light) !important;
    box-shadow: var(--shadow-lg) !important;
}

html.dark #debug-runner-container {
    border: 2px solid var(--card-border-light) !important;
    box-shadow: var(--shadow-dark-lg) !important;
}

/* ═══════════════════════════════════════════════════════════
   3. GAME CANVAS - PURE WHITE Background in Light Mode
   ═══════════════════════════════════════════════════════════ */
#debug-runner-canvas {
    display: block !important;
    width: 100% !important;
    max-width: 800px !important;
    height: auto !important;
    border-radius: 16px !important;
    /* PURE WHITE - not gray, not off-white */
    background: var(--card-surface-light) !important;
    background-color: var(--card-surface-light) !important;
    /* Crisp rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}


/* ═══════════════════════════════════════════════════════════
   3.5 GAME CONTROL CARDS - Premium Design
   ═══════════════════════════════════════════════════════════ */

/* Game Control Card */
.game-control-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

html.dark .game-control-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.game-control-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.15);
    border-color: rgba(0, 113, 227, 0.3);
}

html.dark .game-control-card:hover {
    box-shadow: 0 8px 24px rgba(41, 151, 255, 0.2);
    border-color: rgba(41, 151, 255, 0.4);
}

/* Game Key (Keyboard Key) */
.game-key {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 40px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0071e3 0%, #0a84ff 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

/* Game Key Label */
.game-key-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6e6e73;
}

html.dark .game-key-label {
    color: #98989d;
}

/* Game Wrapper - Clean Container for Canvas */
.game-wrapper {
    display: flex;
    justify-content: center;
    padding: 24px;
    background: #f5f5f7;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

html.dark .game-wrapper {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

/* Game Container inside wrapper */
.game-container {
    max-width: 800px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

html.dark .game-container {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* ═══════════════════════════════════════════════════════════
   4. FOOTER - SOLID WHITE/BLACK (No Gray)
   ═══════════════════════════════════════════════════════════ */
footer {
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 24px 0 !important;
}

html.dark footer {
    background: #000000 !important;
    background-color: #000000 !important;
}

/* Footer wrapper styling */
footer .wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Footer border separator */
footer .border-t {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html.dark footer .border-t {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ═══════════════════════════════════════════════════════════
   5. SOCIAL MEDIA ICONS - Proper Spacing (Keep Original Style)
   ═══════════════════════════════════════════════════════════ */

/* Add vertical spacing to social icons wrapper to prevent overlap */
.wrapper {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

/* Contact section social icons - good spacing after description */
#contact .wrapper {
    margin-top: 8px !important;
    margin-bottom: 28px !important;
}

/* Follow Me section border in dark mode */
html.dark #contact .contact-section[style*="border-top"] {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Ensure tooltip z-index is correct */
.wrapper .tooltip {
    z-index: 1001 !important;
}

/* Floating elements stay on top */
#chatbot-toggle,
#chatbot-widget,
#go-to-top {
    z-index: 100000 !important;
}
