/* ============================================
   MODERN HERO SECTION - TRADING PLATFORM
   ============================================ */

:root {
    --hero-primary: #3b82f6;
    --hero-primary-dark: #2563eb;
    --hero-success: #10b981;
    --hero-danger: #ef4444;
    --hero-warning: #f59e0b;
    --hero-dark: #112025;
    --hero-darker: #0a1216;
    --hero-gray: #64748b;
    --hero-light-gray: #e2e8f0;
    --hero-card-bg: rgba(17, 32, 37, 0.6);
    --hero-card-border: rgba(59, 130, 246, 0.15);
    --hero-glass-bg: rgba(17, 32, 37, 0.8);
    --hero-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --hero-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --hero-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ============================================
   HERO SECTION BASE
   ============================================ */
.modern-hero-section {
    position: relative;
    min-height: 100vh;
    padding: 140px 0 80px;
    background: #112025;
    overflow: hidden;
}

@media (max-width: 991px) {
    .modern-hero-section {
        padding: 120px 0 60px;
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .modern-hero-section {
        padding: 100px 0 50px;
    }
}

/* ============================================
   ANIMATED GRID BACKGROUND
   ============================================ */
.hero-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    z-index: 0;
}

.grid-line {
    position: absolute;
    background: linear-gradient(180deg, transparent, #3b82f6, transparent);
}

.grid-line-v {
    width: 1px;
    height: 100%;
    animation: pulseVertical 4s ease-in-out infinite;
}

.grid-line-h {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    animation: pulseHorizontal 4s ease-in-out infinite;
}

@keyframes pulseVertical {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

@keyframes pulseHorizontal {
    0%, 100% { opacity: 0.3; transform: scaleX(1); }
    50% { opacity: 0.8; transform: scaleX(1.2); }
}

/* ============================================
   GRADIENT ORBS
   ============================================ */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: 0;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--hero-gradient-1);
    top: -250px;
    left: -250px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--hero-gradient-2);
    bottom: -200px;
    right: -200px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--hero-gradient-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

@media (max-width: 991px) {
    .gradient-orb {
        filter: blur(60px);
    }
    .orb-1 { width: 300px; height: 300px; }
    .orb-2 { width: 250px; height: 250px; }
    .orb-3 { width: 200px; height: 200px; }
}

/* ============================================
   HERO CONTENT
   ============================================ */
.hero-content {
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out;
}

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

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--hero-card-bg);
    border: 1px solid var(--hero-card-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    color: #60a5fa;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.hero-badge svg {
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Title */
.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 24px;
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
    animation: slideInLeft 0.8s ease-out 0.3s both;
}

.hero-title .text--base,
.hero-title .text-highlight {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

@media (max-width: 1199px) {
    .hero-title {
        font-size: 52px;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 38px;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 32px;
    }
}

/* Hero Description */
.hero-description {
    font-size: 20px;
    line-height: 1.7;
    color: #cbd5e1;
    max-width: 600px;
    margin-bottom: 32px;
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.hero-description .text-highlight {
    color: #60a5fa;
    font-weight: 600;
}

@media (max-width: 767px) {
    .hero-description {
        font-size: 18px;
    }
}

/* ============================================
   MODERN BUTTONS
   ============================================ */
.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
    animation: slideInLeft 0.8s ease-out 0.5s both;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn-modern:hover::before {
    transform: translateX(0);
}

.btn-modern-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
    color: #ffffff;
}

.btn-modern-primary svg {
    transition: transform 0.3s ease;
}

.btn-modern-primary:hover svg {
    transform: translateX(5px);
}

.btn-modern-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-modern-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

@media (max-width: 575px) {
    .btn-modern {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ============================================
   HERO STATS
   ============================================ */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--hero-card-bg);
    border: 1px solid var(--hero-card-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    animation: slideInLeft 0.8s ease-out 0.6s both;
}

.stat-item {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--hero-card-border);
}

@media (max-width: 767px) {
    .hero-stats {
        gap: 16px;
        padding: 20px;
    }
    .stat-value {
        font-size: 22px;
    }
    .stat-label {
        font-size: 11px;
    }
}

@media (max-width: 575px) {
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
    .stat-divider {
        display: none;
    }
    .stat-item {
        text-align: center;
    }
}

/* ============================================
   HERO VISUAL - TRADING CARD
   ============================================ */
.hero-visual {
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (max-width: 991px) {
    .hero-visual {
        margin-top: 60px;
    }
}

.trading-card {
    background: var(--hero-glass-bg);
    border: 1px solid var(--hero-card-border);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: floatCard 6s ease-in-out infinite;
}

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

.trading-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hero-card-border);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.card-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-indicator.connected {
    color: #10b981;
}

.card-indicator.connected .indicator-dot {
    background: #10b981;
    animation: blink 2s ease-in-out infinite;
}

.card-indicator.connecting {
    color: #f59e0b;
}

.card-indicator.connecting .indicator-dot {
    background: #f59e0b;
    animation: pulse 1s ease-in-out infinite;
}

.card-indicator.disconnected {
    color: #ef4444;
}

.card-indicator.disconnected .indicator-dot {
    background: #ef4444;
    animation: none;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.trading-card-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Crypto Pair */
.crypto-pair {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pair-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pair-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.pair-name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.pair-label {
    font-size: 13px;
    color: #94a3b8;
}

.pair-price {
    text-align: right;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.price-change {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
}

.price-change.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.price-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Price Flash Animations */
.price-value {
    transition: all 0.3s ease;
}

.price-value.price-flash-up {
    animation: flashGreen 0.5s ease;
}

.price-value.price-flash-down {
    animation: flashRed 0.5s ease;
}

@keyframes flashGreen {
    0% { color: #ffffff; }
    50% { 
        color: #10b981; 
        text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
        transform: scale(1.05);
    }
    100% { color: #ffffff; }
}

@keyframes flashRed {
    0% { color: #ffffff; }
    50% { 
        color: #ef4444; 
        text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
        transform: scale(1.05);
    }
    100% { color: #ffffff; }
}

/* Mini Chart */
.mini-chart {
    margin: 16px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--hero-card-border);
}

.quick-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label-sm {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
}

.stat-value-sm {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

@media (max-width: 767px) {
    .trading-card {
        padding: 24px;
    }
    .pair-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .pair-name {
        font-size: 18px;
    }
    .price-value {
        font-size: 20px;
    }
}

/* ============================================
   FLOATING ELEMENTS
   ============================================ */
.floating-element {
    position: absolute;
    z-index: 5;
}

.float-1 {
    top: 10%;
    right: -50px;
    animation: floatElement 4s ease-in-out infinite;
}

.float-2 {
    bottom: 15%;
    left: -50px;
    animation: floatElement 4s ease-in-out infinite 2s;
}

@keyframes floatElement {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.float-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--hero-glass-bg);
    border: 1px solid var(--hero-card-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.float-icon {
    font-size: 24px;
}

.float-text {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .float-1 { right: -30px; }
    .float-2 { left: -30px; }
}

@media (max-width: 991px) {
    .floating-element {
        display: none;
    }
}

/* ============================================
   TICKER CONTAINER
   ============================================ */
.ticker-container {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--hero-card-bg);
    border: 1px solid var(--hero-card-border);
    border-radius: 16px;
    padding: 16px 24px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.ticker-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
    padding-right: 20px;
    border-right: 1px solid var(--hero-card-border);
}

.ticker-title svg {
    color: #60a5fa;
}

.ticker-tape {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    gap: 40px;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-tape:hover .ticker-content {
    animation-play-state: paused;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.ticker-badge {
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ticker-text {
    font-size: 14px;
    color: #cbd5e1;
}

.ticker-link {
    display: flex;
    align-items: center;
    color: #60a5fa;
    transition: all 0.3s ease;
}

.ticker-link:hover {
    color: #3b82f6;
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .ticker-container {
        padding: 12px 16px;
    }
    .ticker-title {
        font-size: 12px;
        padding-right: 12px;
    }
    .ticker-item {
        gap: 8px;
    }
    .ticker-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    .ticker-text {
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .ticker-title {
        display: none;
    }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 991px) {
    .hero-content {
        text-align: center;
    }
    .hero-badge {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta-group {
        justify-content: center;
    }
    .hero-stats {
        margin-left: auto;
        margin-right: auto;
        max-width: 500px;
    }
}

/* ============================================
   DARK MODE ENHANCEMENTS
   ============================================ */
[data-theme="dark"] .modern-hero-section,
.dark-mood .modern-hero-section {
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.btn-modern:focus,
.ticker-link:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .modern-hero-section {
        background: #ffffff;
        color: #000000;
    }
    .gradient-orb,
    .hero-grid-bg,
    .floating-element {
        display: none;
    }
}
