/* ========================================
   THEME FIXES - Critical Corrections
   1. Language buttons same style as section buttons
   2. Card descriptions visible in light theme
   3. Mobile background dark in dark theme
   ======================================== */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FIX 1: LANGUAGE BUTTONS - Same style as section buttons
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Desktop language buttons - Same gradient as section buttons */
.language-selector .lang-btn {
    background: linear-gradient(135deg, #01dba2 0%, #a9d9df 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(1, 219, 162, 0.3) !important;
}

.language-selector .lang-btn:hover {
    background: linear-gradient(135deg, #a9d9df 0%, #01dba2 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(1, 219, 162, 0.4) !important;
}

.language-selector .lang-btn.active {
    background: linear-gradient(135deg, #a9d9df 0%, #01dba2 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 8px 20px rgba(1, 219, 162, 0.5) !important;
}

/* Mobile language buttons - Same style */
.mobile-language-selector .lang-btn {
    background: linear-gradient(135deg, #01dba2 0%, #a9d9df 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(1, 219, 162, 0.3) !important;
}

.mobile-language-selector .lang-btn:hover {
    background: linear-gradient(135deg, #a9d9df 0%, #01dba2 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(1, 219, 162, 0.4) !important;
}

.mobile-language-selector .lang-btn.active {
    background: linear-gradient(135deg, #a9d9df 0%, #01dba2 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 8px 20px rgba(1, 219, 162, 0.5) !important;
}

/* Light theme - Keep same gradient */
[data-theme="light"] .language-selector .lang-btn,
[data-theme="light"] .mobile-language-selector .lang-btn {
    background: linear-gradient(135deg, #01dba2 0%, #a9d9df 100%) !important;
    color: #FFFFFF !important;
}

[data-theme="light"] .language-selector .lang-btn:hover,
[data-theme="light"] .mobile-language-selector .lang-btn:hover {
    background: linear-gradient(135deg, #a9d9df 0%, #01dba2 100%) !important;
    color: #FFFFFF !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FIX 2: CARD TEXT - Visible in light theme (Titles + Descriptions)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* MAXIMUM PRIORITY - Card titles WHITE on cyan background */
[data-theme="light"] .card-final-title,
[data-theme="light"] h3.card-final-title,
[data-theme="light"] .platform-card-final .card-final-title,
[data-theme="light"] .cards-final-grid .card-final-title {
    color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* MAXIMUM PRIORITY - Card descriptions WHITE on cyan background */
[data-theme="light"] .card-final-description,
[data-theme="light"] p.card-final-description,
[data-theme="light"] .platform-card-final .card-final-description,
[data-theme="light"] .cards-final-grid .card-final-description {
    color: #ffffff !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    opacity: 0.95 !important;
    visibility: visible !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
}

/* CRITICAL: Card backgrounds use BRAND CYAN COLOR in light theme */
[data-theme="light"] .platform-card-final,
[data-theme="light"] .cards-final-grid .platform-card-final {
    background: linear-gradient(135deg, #00ffb3 0%, #00cc8f 100%) !important;
    background-color: #00ffb3 !important;
    border: 1.5px solid rgba(0, 255, 179, 0.4) !important;
    box-shadow: 0 4px 16px rgba(0, 255, 179, 0.3), 0 2px 8px rgba(0, 204, 143, 0.2) !important;
}

[data-theme="light"] .platform-card-final:hover {
    border-color: rgba(0, 255, 179, 0.6) !important;
    box-shadow: 0 8px 24px rgba(0, 255, 179, 0.4), 0 4px 12px rgba(0, 204, 143, 0.3) !important;
    transform: translateY(-6px) !important;
}

/* Logo container in light mode - White background for contrast */
[data-theme="light"] .card-logo-container {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Platform card descriptions in light theme - WHITE on cyan */
[data-theme="light"] .platform-card .card-description,
[data-theme="light"] .featured-card .card-description {
    color: #ffffff !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    opacity: 0.95 !important;
    visibility: visible !important;
}

/* Modal descriptions in light theme */
[data-theme="light"] .modal-description {
    color: #2a2a2a !important;
    font-weight: 500 !important;
    text-shadow: none !important;
}

/* ALL paragraphs in cards in light theme - WHITE on cyan */
[data-theme="light"] .platform-card-final p,
[data-theme="light"] .cards-final-grid p {
    color: #ffffff !important;
    opacity: 0.95 !important;
    visibility: visible !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* COMPREHENSIVE: ALL text elements in cards WHITE on cyan in light theme */
[data-theme="light"] .platform-card-final h1,
[data-theme="light"] .platform-card-final h2,
[data-theme="light"] .platform-card-final h3,
[data-theme="light"] .platform-card-final h4,
[data-theme="light"] .platform-card-final h5,
[data-theme="light"] .platform-card-final h6,
[data-theme="light"] .platform-card-final span,
[data-theme="light"] .platform-card-final li,
[data-theme="light"] .cards-final-grid h1,
[data-theme="light"] .cards-final-grid h2,
[data-theme="light"] .cards-final-grid h3,
[data-theme="light"] .cards-final-grid h4,
[data-theme="light"] .cards-final-grid h5,
[data-theme="light"] .cards-final-grid h6,
[data-theme="light"] .cards-final-grid span,
[data-theme="light"] .cards-final-grid li {
    color: #ffffff !important;
    opacity: 0.95 !important;
    visibility: visible !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FIX 3: MOBILE BACKGROUND - Dark in dark theme
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* CRITICAL: Ensure body is PURE BLACK in dark theme - ALL DEVICES */
body {
    background: #000000 !important;
    background-color: #000000 !important;
    background-image: none !important;
}

/* CRITICAL: Ensure ALL sections are transparent */
section,
.hero-section,
.platform-section,
.featured-section,
.p2p-section,
.exchanges-section,
.hot-wallets-section,
.crypto-cards-section,
.digital-banks-section,
.cold-wallets-section,
.dexs-section,
.bridges-section {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Remove any gradient overlays */
body::before,
body::after,
section::before,
section::after {
    display: none !important;
}

/* Mobile menu in dark theme - Should be dark */
.mobile-menu-overlay {
    background: rgba(0, 0, 0, 0.95) !important;
}

.mobile-menu-content {
    background: rgba(26, 26, 26, 0.98) !important;
    backdrop-filter: blur(30px) !important;
}

/* Light theme - Override only when light theme is active */
[data-theme="light"] body {
    background: linear-gradient(
        180deg,
        #fdfcfb 0%,
        #f8f6f3 50%,
        #fdfcfb 100%
    ) !important;
    background-attachment: fixed !important;
}

[data-theme="light"] section,
[data-theme="light"] .hero-section,
[data-theme="light"] .platform-section,
[data-theme="light"] .featured-section {
    background: transparent !important;
}

[data-theme="light"] .mobile-menu-overlay {
    background: rgba(248, 246, 243, 0.93) !important;
}

[data-theme="light"] .mobile-menu-content {
    background: rgba(255, 254, 252, 0.98) !important;
}

/* Light theme - restore gradient overlays */
[data-theme="light"] body::before {
    display: block !important;
    content: '' !important;
    position: fixed !important;
    inset: 0 !important;
    background: radial-gradient(
        circle at 20% 50%,
        rgba(255, 215, 0, 0.03) 0%,
        transparent 50%
    ),
    radial-gradient(
        circle at 80% 50%,
        rgba(255, 165, 0, 0.02) 0%,
        transparent 50%
    ) !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE SPECIFIC FIXES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {
    /* CRITICAL: Force dark background on mobile in dark theme */
    body {
        background: #000000 !important;
        background-color: #000000 !important;
    }

    /* Ensure all sections are transparent */
    section,
    .platform-section,
    .featured-section,
    .hero-section {
        background: transparent !important;
        background-color: transparent !important;
    }

    /* Light theme mobile */
    [data-theme="light"] body {
        background: linear-gradient(
            180deg,
            #fdfcfb 0%,
            #f8f6f3 50%,
            #fdfcfb 100%
        ) !important;
        background-attachment: fixed !important;
    }

    /* Mobile cards - Keep proper backgrounds */
    .platform-card-final {
        background: #1a1a1a !important;
    }

    [data-theme="light"] .platform-card-final {
        background: rgba(255, 254, 252, 0.96) !important;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADDITIONAL CONSISTENCY FIXES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Connect and Pro buttons - Ensure they match section buttons */
.connect-button,
.pro-button,
.mobile-connect-button,
.mobile-pro-button {
    background: linear-gradient(135deg, #01dba2 0%, #a9d9df 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
}

.connect-button:hover,
.pro-button:hover,
.mobile-connect-button:hover,
.mobile-pro-button:hover {
    background: linear-gradient(135deg, #a9d9df 0%, #01dba2 100%) !important;
    color: #ffffff !important;
}

/* Light theme - All buttons keep same gradient */
[data-theme="light"] .connect-button,
[data-theme="light"] .pro-button,
[data-theme="light"] .mobile-connect-button,
[data-theme="light"] .mobile-pro-button {
    background: linear-gradient(135deg, #01dba2 0%, #a9d9df 100%) !important;
    color: #ffffff !important;
}

[data-theme="light"] .connect-button:hover,
[data-theme="light"] .pro-button:hover,
[data-theme="light"] .mobile-connect-button:hover,
[data-theme="light"] .mobile-pro-button:hover {
    background: linear-gradient(135deg, #a9d9df 0%, #01dba2 100%) !important;
    color: #ffffff !important;
}
