/* ===== Index Page - Main Styles ===== */

/* Custom Variables for Seamless Theme Switching */
:root {
    --bg-main: #F4F6F8;
    --text-main: #0F172A;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-border-solid: #E2E8F0;
    --nav-bg: rgba(244, 246, 248, 0.7);
    --nav-scrolled: rgba(255, 255, 255, 0.95);
}

.dark {
    --bg-main: #030305;
    --text-main: #ffffff;
    --glass-bg: rgba(17, 17, 26, 0.5);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-border-solid: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(3, 3, 5, 0.7);
    --nav-scrolled: rgba(8, 8, 12, 0.9);
}

/* ===== Base Utilities ===== */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ===== Pro Max Glassmorphism ===== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.dark .glass-panel {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* ===== Navigation ===== */
.glass-nav {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-nav.scrolled {
    background: var(--nav-scrolled);
    border-bottom: 1px solid var(--glass-border-solid);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.dark .glass-nav.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

/* ===== Text & Background Gradients ===== */
.text-gradient {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #14B8A6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 5s linear infinite;
}

.bg-gradient-brand {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
}

@keyframes shine {
    to { 
        background-position: 200% center; 
    }
}

/* ===== Feature Card Effects ===== */
.feature-card {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.dark .feature-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

/* ===== Scroll Reveal Animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reveal-delay-1 { 
    transition-delay: 0.15s; 
}

.reveal-delay-2 { 
    transition-delay: 0.3s; 
}

/* ===== Scrollbar Customization ===== */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== Ticker Edge Mask ===== */
.mask-edges {
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* ===== Financial Data Font ===== */
.tabular-data {
    font-variant-numeric: tabular-nums;
}

/* ===== Live Transaction Animation ===== */
@keyframes tx-slide-down {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
        background-color: rgba(20, 184, 166, 0.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        background-color: transparent;
    }
}

.tx-row-enter {
    animation: tx-slide-down 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== Exchange Input Group ===== */
.exchange-input-group {
    position: relative;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border-solid);
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.dark .exchange-input-group {
    background: rgba(17, 17, 26, 0.6);
}

.exchange-input-group:focus-within {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .text-gradient {
        animation: none;
    }

    .glass-nav {
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}
