
/* CryptoVista Dashboard Pro - Enhanced Styles */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    font-feature-settings: "ss01", "ss02", "cv01", "cv02";
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0ea5e9 0%, #d946ef 100%);
    border-radius: 6px;
    border: 3px solid #0f172a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #e879f9 100%);
}

/* Selection */
::selection {
    background: rgba(14, 165, 233, 0.3);
    color: #fff;
}
/* Enhanced Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(2deg);
    }
    66% {
        transform: translateY(5px) rotate(-1deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(14, 165, 233, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.6), 0 0 40px rgba(14, 165, 233, 0.2);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.float-animation {
    animation: float 8s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.shimmer {
    background: linear-gradient(90deg, 
        rgba(15, 23, 42, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 50%,
        rgba(15, 23, 42, 0.8) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

.gradient-flow {
    background: linear-gradient(-45deg, #0ea5e9, #d946ef, #0ea5e9);
    background-size: 400% 400%;
    animation: gradient-flow 5s ease infinite;
}

.slide-in-right {
    animation: slide-in-right 0.5s ease-out;
}

.fade-in-up {
    animation: fade-in-up 0.6s ease-out;
}

/* Stagger animations */
.stagger-child > * {
    opacity: 0;
    animation: fade-in-up 0.5s ease-out forwards;
}

.stagger-child > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-child > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-child > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-child > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-child > *:nth-child(5) { animation-delay: 0.5s; }
/* Enhanced Card Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center bottom;
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(14, 165, 233, 0.2);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.3);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}
/* Enhanced Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0ea5e9 0%, #d946ef 50%, #0ea5e9 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-flow 3s linear infinite;
}

.gradient-text-static {
    background: linear-gradient(135deg, #0ea5e9 0%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* Enhanced Glass Morphism */
.glass {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-light {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-hover:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(14, 165, 233, 0.3);
}
/* Enhanced Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0ea5e9 0%, #d946ef 100%);
    color: white;
    font-weight: 500;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary::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.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid rgba(71, 85, 105, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: #64748b;
    transform: translateY(-1px);
}
/* Enhanced Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.badge-primary {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(217, 70, 239, 0.2) 100%);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-secondary {
    background: rgba(217, 70, 239, 0.15);
    color: #e879f9;
    border: 1px solid rgba(217, 70, 239, 0.3);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Enhanced Loading Spinner */
.spinner {
    border: 3px solid rgba(14, 165, 233, 0.1);
    border-top: 3px solid #0ea5e9;
    border-right: 3px solid #0ea5e9;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

@keyframes spin {
    0% { 
        transform: rotate(0deg);
        border-top-color: #0ea5e9;
        border-right-color: rgba(14, 165, 233, 0.5);
    }
    100% { 
        transform: rotate(360deg);
        border-top-color: #d946ef;
        border-right-color: rgba(217, 70, 239, 0.5);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(30, 41, 59, 0.5) 25%,
        rgba(51, 65, 85, 0.5) 50%,
        rgba(30, 41, 59, 0.5) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
}

/* Enhanced Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(71, 85, 105, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    pointer-events: none;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}
/* Enhanced Crypto Symbol */
.crypto-symbol {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.5);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    color: #cbd5e1;
    font-size: 0.875rem;
}

/* Enhanced Notification Dot */
.notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    border-radius: 50%;
    border: 2px solid #0f172a;
    animation: pulse-glow 2s infinite;
    z-index: 10;
}

.notification-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.3);
    animation: pulse-glow 2s infinite 0.5s;
}

/* Enhanced Price Change Indicator */
.price-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.price-change.positive {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.price-change.positive::before {
    content: '↗';
    font-size: 0.75rem;
}

.price-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.price-change.negative::before {
    content: '↘';
    font-size: 0.75rem;
}
/* Enhanced Typography */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

.heading-1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.heading-2 {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: #f1f5f9;
}

.heading-3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: #e2e8f0;
}

.body-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.caption {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #94a3b8;
}

@media (max-width: 640px) {
    .heading-1 {
        font-size: 1.875rem;
    }
    
    .heading-2 {
        font-size: 1.5rem;
    }
    
    .heading-3 {
        font-size: 1.125rem;
    }
    
    .body-text {
        font-size: 0.9375rem;
    }
}
/* Enhanced Patterns */
.crypto-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(14, 165, 233, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(217, 70, 239, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    position: relative;
    overflow: hidden;
}

.crypto-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
}

/* Trading View Container */
.tradingview-widget-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu Animation */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Focus Styles */
*:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

*:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

/* Custom Range Slider */
.range-slider {
    appearance: none;
    height: 6px;
    background: rgba(71, 85, 105, 0.5);
    border-radius: 3px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #0ea5e9, #d946ef);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #0f172a;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
    transition: all 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.8);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #0ea5e9, #d946ef);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #0f172a;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}
/* Enhanced Gradient Border */
.gradient-border {
    position: relative;
    border-radius: 16px;
    padding: 1px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #0ea5e9, #d946ef, #0ea5e9);
    background-size: 200% 200%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: gradient-flow 3s ease infinite;
}

/* Enhanced Crypto Table */
.crypto-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.crypto-table th {
    text-align: left;
    padding: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    border-bottom: 1px solid rgba(71, 85, 105, 0.5);
    background: rgba(15, 23, 42, 0.5);
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.crypto-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    color: #cbd5e1;
    transition: background-color 0.2s ease;
}

.crypto-table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
}

.crypto-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.7);
    transform: translateX(4px);
}

.crypto-table tbody tr:active {
    transform: translateX(2px) scale(0.995);
}

/* Enhanced Network Status */
.network-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.network-status.online::before {
    content: '';
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #10b981, #22c55e);
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
}

.network-status.offline::before {
    content: '';
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    border-radius: 50%;
}

/* New: Data Visualization */
.data-visualization {
    position: relative;
    overflow: hidden;
}

.data-visualization::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(14, 165, 233, 0.1) 50%,
        transparent 100%);
    animation: shimmer 2s infinite linear;
    pointer-events: none;
}

/* New: Interactive Elements */
.interactive-element {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.interactive-element:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* New: Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* New: Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* New: Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .system-dark-adjust {
        filter: brightness(0.95) contrast(1.05);
    }
}

/* New: Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* New: High Contrast Mode */
@media (prefers-contrast: high) {
    .high-contrast {
        border-width: 2px !important;
    }
}

/* New: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
