@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-main: #07090e;
    --bg-card: rgba(14, 20, 32, 0.75);
    --bg-card-hover: rgba(20, 30, 48, 0.85);
    --bg-card-solid: #0f172a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 229, 255, 0.25);
    
    --primary: #00e5ff;
    --primary-glow: rgba(0, 229, 255, 0.35);
    --primary-dark: #0088a3;
    
    --accent-gold: #f59e0b;
    --accent-gold-glow: rgba(245, 158, 11, 0.3);
    
    --bullish: #10b981;
    --bullish-glow: rgba(16, 185, 129, 0.35);
    --bullish-bg: rgba(16, 185, 129, 0.12);
    
    --bearish: #ef4444;
    --bearish-glow: rgba(239, 68, 68, 0.35);
    --bearish-bg: rgba(239, 68, 68, 0.12);
    
    --neutral: #64748b;
    --neutral-bg: rgba(100, 116, 139, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(0, 229, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 229, 255, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(245, 158, 11, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
    background-attachment: fixed;
    background-size: 140% 140%;
    animation: ambientMeshGlow 18s ease-in-out infinite alternate;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Header & Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(7, 9, 14, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 5.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease;
}

.brand:hover {
    transform: translateY(-1px);
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border-glow);
    box-shadow: 0 0 15px var(--primary-glow);
    animation: logoBreathingGlow 4s ease-in-out infinite alternate;
}

@keyframes logoBreathingGlow {
    0% { box-shadow: 0 0 12px rgba(0, 229, 255, 0.25); border-color: rgba(0, 229, 255, 0.3); }
    100% { box-shadow: 0 0 24px rgba(0, 229, 255, 0.6); border-color: rgba(0, 229, 255, 0.7); }
}

.brand-info h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.35rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(0, 229, 255, 0.06));
    color: var(--primary);
    border: 1px solid var(--primary-glow);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Botón Destacado Robots */
.btn-robots-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-robots-header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: rotate(25deg);
    transition: none;
}

.btn-robots-header:hover::after {
    left: 140%;
    transition: all 0.75s ease-in-out;
}

.btn-robots-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
    color: #000;
}

.online-users-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(14, 21, 37, 0.85);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.12);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.online-users-badge:hover {
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    transform: translateY(-1px);
    color: #fff;
}

.online-users-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--bullish);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--bullish);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--bullish);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 16px var(--bullish); }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* Main Container con Márgenes de Respeto Laterales */
.container {
    max-width: 1420px;
    margin: 0 auto;
    padding: 2.25rem 5.5rem;
}

@media (max-width: 1280px) {
    .navbar { padding: 0.85rem 3.5rem; }
    .container { padding: 2rem 3.5rem; }
}

@media (max-width: 1024px) {
    .navbar { padding: 0.85rem 2rem; }
    .container { padding: 1.5rem 2rem; }
}

@media (max-width: 768px) {
    .navbar { padding: 0.75rem 1.25rem; }
    .container { padding: 1rem 1.25rem; }
}

.view-section {
    display: none;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
    display: block;
}

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

/* Hero Ticker & Top Bar */
.top-ticker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticker-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ticker-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.ticker-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.ticker-value {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
}

.ticker-delta {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Cards & Layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-title i {
    color: var(--primary);
}

/* Termometro Visual Styles */
.consensus-display {
    text-align: center;
    padding: 1.5rem 1rem;
    background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.08), transparent 70%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.consensus-tag {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 0.5rem 1.75rem;
    border-radius: 30px;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 20px currentColor;
}

.consensus-rate {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.meter-bar-container {
    width: 100%;
    height: 18px;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 25%, #eab308 45%, #64748b 50%, #84cc16 55%, #10b981 75%, #00e5ff 100%);
    border-radius: 20px;
    position: relative;
    margin: 1.5rem 0 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 0, 0, 0.4);
}

.meter-center-mark {
    display: none;
}

.meter-pointer-line {
    position: absolute;
    top: -7px;
    left: 50%;
    width: 6px;
    height: 32px;
    background: #ffffff;
    border-radius: 4px;
    transform: translateX(-50%);
    z-index: 5;
    box-shadow: 0 0 12px #ffffff, 0 0 20px rgba(0, 229, 255, 0.9);
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-secondary);
}
}

/* Bank Comparison Cards */
.bank-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
}

.bank-stat:last-child {
    border-bottom: none;
}

.bank-stat span:first-child {
    color: var(--text-secondary);
}

.bank-stat span:last-child {
    font-family: var(--font-mono);
    font-weight: 600;
}

/* Institutional Heatmap */
.heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.heatmap-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.heatmap-bar {
    height: 8px;
    border-radius: 4px;
}

.heatmap-bar.buy {
    background: var(--bullish);
}

.heatmap-bar.sell {
    background: var(--bearish);
}

/* TradingView Container & Drawing System */
.tv-container {
    height: 540px;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #0b0f19;
    box-shadow: var(--shadow-glow);
    position: relative;
}

/* Floating Drawing Toolbar (TradingView Style) */
.drawing-toolbar {
    position: absolute;
    top: 60px;
    left: 12px;
    z-index: 25;
    background: rgba(14, 20, 32, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    padding: 0.35rem;
    gap: 0.35rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.draw-tool-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.draw-tool-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.draw-tool-btn.active {
    background: rgba(0, 229, 255, 0.2);
    color: var(--primary);
    border-color: var(--primary-glow);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.draw-tool-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.15rem 0;
}

/* Overlay Canvas for Direct Drawing */
#chart-drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none; /* Cursor mode by default */
}

#chart-drawing-canvas.active-draw {
    pointer-events: auto;
    cursor: crosshair;
}

/* Indicator Pills & Toggles */
.indicator-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.ind-pill {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.ind-pill:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.ind-pill.active.pill-ema1 {
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
    border-color: #f59e0b;
}

.ind-pill.active.pill-ema2 {
    background: rgba(0, 229, 255, 0.18);
    color: #00e5ff;
    border-color: #00e5ff;
}

.ind-pill.active.pill-ema3 {
    background: rgba(168, 85, 247, 0.18);
    color: #a855f7;
    border-color: #a855f7;
}

.ind-pill.active.pill-rsi {
    background: rgba(236, 72, 153, 0.18);
    color: #ec4899;
    border-color: #ec4899;
}

/* RSI Sub-Chart Pane */
.rsi-pane-container {
    height: 140px;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #0b0f19;
    margin-top: 0.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
}

.tv-selector-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pair-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pair-pill {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pair-pill:hover, .pair-pill.active {
    background: var(--primary);
    color: #05070a;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Downloads Section */
.downloads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
}

.download-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.download-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-glow);
    box-shadow: var(--shadow-glow);
}

.download-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid var(--primary-glow);
    color: var(--primary);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.download-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, #00e5ff 0%, #00a3cc 100%);
    color: #05070a;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 229, 255, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    background: #0d131f;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    position: relative;
    animation: modalIn 0.25s ease;
}

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

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* RSI Sub-Chart Pane */
.rsi-pane-container {
    position: relative;
    width: 100%;
    height: 240px;
    background: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease;
}

.rsi-pane-container:hover {
    border-color: rgba(236, 72, 153, 0.4);
}

/* ============================================================= */
/* CONTENEDOR DE TRADING & HERRAMIENTAS DE DIBUJO (TRADINGVIEW) */
/* ============================================================= */
.tv-container {
    position: relative;
    width: 100%;
    height: 540px;
    background: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Canvas de Dibujo Transparente */
#chart-drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
    cursor: default;
}

#chart-drawing-canvas.active-draw {
    pointer-events: auto;
    cursor: crosshair;
}

/* Barra Lateral de Herramientas de Dibujo */
.drawing-toolbar {
    position: absolute;
    top: 55px;
    left: 14px;
    z-index: 25;
    background: rgba(14, 20, 32, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

.draw-tool-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.draw-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: scale(1.05);
}

.draw-tool-btn.active {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.draw-tool-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 2px 0;
}

/* ============================================================= */
/* BARRA FLOTANTE DE LÍNEA SELECCIONADA (ESTILO TRADINGVIEW)     */
/* ============================================================= */
.drawing-context-toolbar {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 6px;
    padding: 4px 6px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.15);
    z-index: 45;
    user-select: none;
    transform: translate(-50%, -100%) translateY(-14px);
    animation: fadeInCtx 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInCtx {
    from { opacity: 0; transform: translate(-50%, -100%) translateY(-6px) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -100%) translateY(-14px) scale(1); }
}

.line-tool-item {
    position: relative;
}

.line-ctx-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #d1d4dc;
    padding: 4px 8px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 28px;
}

.line-ctx-btn:hover {
    background: #2a2e39;
    color: #fff;
}

.line-ctx-btn .color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #2a2e39;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.line-ctx-btn.btn-trash {
    color: #ef4444;
}

.line-ctx-btn.btn-trash:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ff5c5c;
    border-color: rgba(239, 68, 68, 0.4);
}

.ctx-divider {
    width: 1px;
    height: 18px;
    background: #2a2e39;
    margin: 0 2px;
}

/* Menús Desplegables de Color, Grosor y Estilo */
.line-dropdown-palette {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 6px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
    z-index: 60;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.color-swatch:hover {
    transform: scale(1.18);
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.line-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
    z-index: 60;
    min-width: 125px;
}

.line-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #d1d4dc;
    font-family: inherit;
    font-size: 0.78rem;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.line-dropdown-menu .dropdown-item:hover {
    background: #2a2e39;
    color: #fff;
}

/* User Referral Badge in Navbar */
.user-ref-badge {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f8fafc;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-ref-badge:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.user-ref-badge strong {
    font-family: var(--font-mono);
    color: var(--accent-gold);
    letter-spacing: 0.5px;
}

/* Badge Counter for Pending Requests */
.badge-counter {
    background: var(--bearish);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    margin-left: 0.2rem;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: pulse 1.8s infinite;
}

/* Table Hover State */
tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* =======================================================
   SISTEMA DE MODALES GLASSMORFICAS Y FORMULARIOS MODERNOS
   ======================================================= */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 9, 20, 0.48);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    box-sizing: border-box;
}

.modal-backdrop.active {
    display: flex;
    animation: modalBackdropFade 0.25s ease-out;
}

.modal-card {
    background: linear-gradient(145deg, rgba(14, 21, 37, 0.96), rgba(8, 12, 22, 0.97));
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 229, 255, 0.2);
    padding: 2.25rem;
    width: 100%;
    max-width: 480px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1), modalBorderGlow 6s ease-in-out infinite alternate;
    box-sizing: border-box;
}

@keyframes modalBackdropFade {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(8px); }
}

@keyframes modalCardPop {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalBorderGlow {
    0% {
        border-color: rgba(0, 229, 255, 0.25);
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 229, 255, 0.12);
    }
    50% {
        border-color: rgba(245, 158, 11, 0.35);
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(245, 158, 11, 0.18);
    }
    100% {
        border-color: rgba(0, 229, 255, 0.25);
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 229, 255, 0.12);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.3px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    position: relative;
}

/* Formularios y Controles */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
    transition: color 0.2s ease;
}

.form-group:focus-within label {
    color: var(--primary);
}

.form-control {
    width: 100%;
    background: rgba(7, 11, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: #f8fafc;
    font-family: var(--font-main);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
    background: rgba(10, 17, 30, 0.98);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #475569;
    font-size: 0.88rem;
}

/* Botones de Acción */
.btn-primary {
    background: linear-gradient(135deg, #00e5ff 0%, #0088a3 100%);
    color: #040914;
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 0.92rem;
    padding: 0.75rem 1.4rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: rotate(25deg);
    transition: none;
}

.btn-primary:hover::after {
    left: 140%;
    transition: all 0.75s ease-in-out;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.65);
    filter: brightness(1.1);
    color: #040914;
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary:active {
    transform: scale(0.97);
}

/* Tarjetas y Contenedores Elevados */
.ticker-card, .chart-card, .termometro-card, .stats-card, .card {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.ticker-card:hover, .chart-card:hover, .termometro-card:hover, .stats-card:hover, .card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 229, 255, 0.35);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 229, 255, 0.15);
}

/* =======================================================
   SUITE DE ANIMACIONES PROFESIONALES DE ALTO NIVEL
   ======================================================= */

/* 1. Cascada de Entrada Suave (Staggered Reveals) */
.container > * {
    animation: cardRevealUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.top-ticker {
    animation: cardRevealUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.top-ticker .ticker-card:nth-child(1) {
    animation: cardRevealUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.top-ticker .ticker-card:nth-child(2) {
    animation: cardRevealUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#section-tradingview {
    animation: cardRevealUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.grid-2 > .card:nth-child(1) {
    animation: cardRevealUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.grid-2 > .card:nth-child(2) {
    animation: cardRevealUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardRevealUp {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 2. Destellos Dinámicos de Actualización de Precios (Price Flash Up/Down) */
.price-flash-up {
    animation: priceFlashGreen 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.price-flash-down {
    animation: priceFlashRed 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes priceFlashGreen {
    0% {
        background-color: rgba(16, 185, 129, 0.35);
        color: #34d399;
        text-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
        transform: scale(1.03);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes priceFlashRed {
    0% {
        background-color: rgba(239, 68, 68, 0.35);
        color: #f87171;
        text-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
        transform: scale(1.03);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* 3. Radar Sonar Pulsante de Estado En Vivo */
.live-badge {
    position: relative;
    overflow: visible;
}

.pulse-dot {
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    transform: translate(-50%, -50%);
    animation: radarWave 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    z-index: 0;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    transform: translate(-50%, -50%);
    animation: radarWave 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    animation-delay: 0.75s;
    z-index: 0;
}

@keyframes radarWave {
    0% {
        width: 8px;
        height: 8px;
        opacity: 0.9;
    }
    100% {
        width: 26px;
        height: 26px;
        opacity: 0;
    }
}

/* 4. Resplandor de Neón y Haz Láser del Termómetro */
.meter-pointer-line {
    animation: laserGlowPulse 2.5s ease-in-out infinite alternate;
}

@keyframes laserGlowPulse {
    0% {
        box-shadow: 0 0 10px #ffffff, 0 0 18px rgba(0, 229, 255, 0.8);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 16px #ffffff, 0 0 28px rgba(0, 229, 255, 1), 0 0 40px rgba(0, 229, 255, 0.5);
        filter: brightness(1.25);
    }
    100% {
        box-shadow: 0 0 10px #ffffff, 0 0 18px rgba(0, 229, 255, 0.8);
        filter: brightness(1);
    }
}

/* 5. Shimmer Dorado Exclusivo Botón Descargar Robots */
.btn-robots-header {
    animation: goldBorderPulse 3s infinite alternate ease-in-out;
}

@keyframes goldBorderPulse {
    0% {
        box-shadow: 0 0 14px rgba(245, 158, 11, 0.35), inset 0 0 8px rgba(255, 255, 255, 0.2);
    }
    100% {
        box-shadow: 0 0 26px rgba(245, 158, 11, 0.65), inset 0 0 14px rgba(255, 255, 255, 0.4);
    }
}

/* 6. Animación Flotante y Micro-interacciones para Badges */
.user-ref-badge i.fa-gift {
    animation: gentleWiggle 3s infinite ease-in-out;
    display: inline-block;
}

@keyframes gentleWiggle {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(-12deg); }
    30% { transform: rotate(10deg); }
    45% { transform: rotate(-6deg); }
    60% { transform: rotate(4deg); }
    75% { transform: rotate(0deg); }
}

/* 7. Barras de Heatmap con Crecimiento Suave */
.heatmap-bar {
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* 8. Botón Recargar Rotación Activa */
.btn-secondary:hover i.fa-rotate {
    animation: spinIcon 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spinIcon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 9. Transición de Pestañas y Vistas Fluidas */
.view-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 10. Bordes con Brillo Holográfico en Focus de Inputs */
.form-control:focus {
    animation: inputBorderPulse 2s infinite alternate ease-in-out;
}

@keyframes inputBorderPulse {
    0% {
        border-color: rgba(0, 229, 255, 0.6);
        box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
    100% {
        border-color: rgba(0, 229, 255, 1);
        box-shadow: 0 0 25px rgba(0, 229, 255, 0.55);
    }
}

/* 11. Contador de Usuarios en Línea */
.online-users-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    color: #10b981;
    font-weight: 600;
    transition: all 0.25s ease;
}

.online-users-badge:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 1.8s infinite ease-in-out;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #10b981; }
    50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px #10b981; }
    100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #10b981; }
}

/* 12. Píldoras de Nota Interna de Usuario */
.user-note-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px dashed rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 0.25rem;
    cursor: pointer;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.user-note-pill:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #f59e0b;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-add-note {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    color: var(--text-muted);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-size: 0.68rem;
    cursor: pointer;
    margin-top: 0.25rem;
    transition: all 0.2s ease;
}

.btn-add-note:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 229, 255, 0.08);
}



