/* ═══════════════════════════════════════════════════════════════════
   TRADING HUB - BASE CSS
   Reset, tipografía, utilidades y animaciones
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Reset ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
}
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}


/* ─── Links ─── */
a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-gold-dark);
}

/* ─── Imágenes ─── */
img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ─── Listas ─── */
ul, ol {
    list-style: none;
}

/* ─── Formularios ─── */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ─── Scrollbar personalizado ─── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* ─── Selection ─── */
::selection {
    background: rgba(var(--color-gold-rgb), 0.3);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════
   TIPOGRAFÍA
   ═══════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: clamp(28px, 5vw, 42px); }
h2 { font-size: clamp(24px, 4vw, 32px); }
h3 { font-size: clamp(20px, 3vw, 26px); }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

.text-gradient-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════════
   CLASES UTILITARIAS
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Colores de texto ─── */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent-gold); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }

/* ─── Estados positivo/negativo ─── */
.positive { color: var(--accent-green) !important; }
.negative { color: var(--accent-red) !important; }
.neutral { color: var(--accent-gold) !important; }

/* ─── Alineación ─── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ─── Display ─── */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* ─── Flexbox ─── */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* ─── Espaciado ─── */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

/* ─── Container ─── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-sm {
    max-width: 600px;
}

.container-lg {
    max-width: 1400px;
}

/* ─── Fuente mono ─── */
.font-mono {
    font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════════
   ANIMACIONES
   ═══════════════════════════════════════════════════════════════════ */

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

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

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

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

@keyframes glow {
    0%, 100% { box-shadow: var(--shadow-glow-gold); }
    50% { box-shadow: var(--shadow-glow-gold-xl); }
}

/* ─── Clases de animación ─── */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade {
    animation: fadeIn 0.4s ease forwards;
}

.animate-scale {
    animation: fadeInScale 0.4s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ─── Delays para animaciones escalonadas ─── */
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════ */

/* Mobile first approach */
@media (min-width: 640px) {
    /* Tablet */
    .container {
        padding: 0 var(--spacing-lg);
    }
}

@media (min-width: 1024px) {
    /* Desktop */
    .container {
        padding: 0 var(--spacing-xl);
    }
}

