/* ========================================
   MODERN CRYPTO SECTION STYLES
   Trading Platform Design - Cryptocurrency Markets
   ======================================== */

/* Section Container */
.modern-crypto-section {
    position: relative;
    padding: 120px 0;
    background: #112025;
    overflow: hidden;
}

/* Animated Background Pattern */
.crypto-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.4;
    pointer-events: none;
}

.pattern-mesh {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(59, 130, 246, 0.03) 0px,
            transparent 1px,
            transparent 40px,
            rgba(59, 130, 246, 0.03) 41px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(16, 185, 129, 0.03) 0px,
            transparent 1px,
            transparent 40px,
            rgba(16, 185, 129, 0.03) 41px
        );
    animation: meshMove 20s linear infinite;
}

@keyframes meshMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.pattern-grid-crypto {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Gradient Orbs */
.gradient-orb.orb-crypto-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%);
    border-radius: 50%;
    filter: blur(120px);
    top: -200px;
    left: -200px;
    animation: floatOrbCrypto 15s ease-in-out infinite;
    pointer-events: none;
}

.gradient-orb.orb-crypto-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
    border-radius: 50%;
    filter: blur(120px);
    bottom: -150px;
    right: -150px;
    animation: floatOrbCrypto 18s ease-in-out infinite reverse;
    pointer-events: none;
}

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

/* Section Badge */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-badge svg {
    width: 18px;
    height: 18px;
}

/* Section Title */
.section-title {
    font-size: 48px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Description */
.section-description {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* Crypto Card */
.crypto-card {
    position: relative;
    background: rgba(17, 32, 37, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.crypto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0) 0%,
        rgba(59, 130, 246, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.crypto-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.crypto-card:hover::before {
    opacity: 1;
}

/* Card Header */
.crypto-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* Crypto Icon Wrapper */
.crypto-icon-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.crypto-icon-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15),
        rgba(16, 185, 129, 0.15));
    border-radius: 14px;
    transition: all 0.4s ease;
}

.crypto-card:hover .crypto-icon-bg {
    transform: rotate(10deg) scale(1.1);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.3),
        rgba(16, 185, 129, 0.3));
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.crypto-icon {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    z-index: 2;
    transition: transform 0.4s ease;
}

.crypto-card:hover .crypto-icon {
    transform: scale(1.05);
}

/* Crypto Details */
.crypto-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crypto-symbol {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.crypto-card:hover .crypto-symbol {
    color: #3b82f6;
}

.crypto-name {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Live Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

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

.live-text {
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Price Section */
.crypto-price-section {
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.current-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.currency-symbol {
    font-size: 18px;
    font-weight: 600;
    color: #94a3b8;
}

.price-value {
    font-size: 28px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
    transition: color 0.3s ease;
}

.crypto-card:hover .price-value {
    color: #3b82f6;
}

/* Price Change Colors */
.text-success,
.text--success {
    color: #10b981 !important;
}

.text-danger,
.text--danger {
    color: #ef4444 !important;
}

/* Change Section */
.crypto-change {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.change-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.change-badge[data-change="positive"] {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.change-badge[data-change="negative"] {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.crypto-card:hover .change-badge[data-change="positive"] {
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.crypto-card:hover .change-badge[data-change="negative"] {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.change-arrow {
    width: 16px;
    height: 16px;
}

.change-value {
    line-height: 1;
}

.change-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Mini Chart */
.mini-chart {
    height: 50px;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.chart-line {
    width: 100%;
    height: 100%;
}

.chart-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

.chart-path.positive {
    stroke: #10b981;
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.5));
}

.chart-path.negative {
    stroke: #ef4444;
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.5));
}

.crypto-card:hover .chart-path {
    stroke-width: 2.5;
}

/* Card Footer */
.crypto-card-footer {
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.trade-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15),
        rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: #3b82f6;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.trade-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(59, 130, 246, 0.3),
        transparent);
    transition: left 0.5s ease;
}

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

.trade-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.trade-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.trade-btn:hover svg {
    transform: translateX(4px);
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.crypto-card:hover .card-glow {
    opacity: 1;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    margin-bottom: 24px;
    color: #3b82f6;
}

.empty-icon svg {
    width: 80px;
    height: 80px;
}

.empty-title {
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 12px;
}

.empty-description {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

/* View All Button */
.btn-large {
    padding: 16px 40px;
    font-size: 16px;
}

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

.btn-modern svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-modern-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-modern-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-modern-primary:hover::before {
    left: 100%;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.5);
}

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

/* Decorative Wave */
.crypto-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

.crypto-wave svg {
    width: 100%;
    height: auto;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .modern-crypto-section {
        padding: 100px 0;
    }

    .section-title {
        font-size: 42px;
    }

    .crypto-card {
        padding: 20px;
    }

    .price-value {
        font-size: 24px;
    }
}

@media (max-width: 991px) {
    .modern-crypto-section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 36px;
    }

    .section-description {
        font-size: 16px;
    }

    .crypto-icon-wrapper,
    .crypto-icon {
        width: 44px;
        height: 44px;
    }

    .crypto-symbol {
        font-size: 16px;
    }

    .price-value {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .modern-crypto-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 30px;
    }

    .section-description {
        font-size: 15px;
    }

    .crypto-card {
        padding: 20px;
    }

    .gradient-orb {
        display: none;
    }
}

@media (max-width: 575px) {
    .section-badge {
        padding: 8px 20px;
        font-size: 13px;
    }

    .section-title {
        font-size: 26px;
    }

    .crypto-icon-wrapper,
    .crypto-icon {
        width: 40px;
        height: 40px;
    }

    .crypto-symbol {
        font-size: 15px;
    }

    .crypto-name {
        font-size: 12px;
    }

    .price-value {
        font-size: 20px;
    }

    .change-badge {
        padding: 6px 10px;
        font-size: 12px;
    }

    .trade-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Animation Enhancements */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    .modern-crypto-section {
        background: linear-gradient(180deg, 
            rgba(248, 250, 252, 0.95) 0%,
            rgba(241, 245, 249, 0.9) 50%,
            rgba(248, 250, 252, 0.95) 100%);
    }

    .crypto-card {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(203, 213, 225, 0.3);
    }

    .section-title {
        background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .crypto-symbol,
    .price-value {
        color: #0f172a;
    }

    .crypto-name,
    .section-description {
        color: #475569;
    }

    .empty-title {
        color: #0f172a;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .crypto-card,
    .crypto-icon,
    .trade-btn,
    .pattern-mesh,
    .gradient-orb,
    .live-dot,
    .chart-path {
        animation: none;
        transition: none;
    }

    .crypto-card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .modern-crypto-section {
        background: white;
        padding: 40px 0;
    }

    .crypto-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    .gradient-orb,
    .crypto-bg-pattern,
    .card-glow,
    .crypto-wave {
        display: none;
    }

    .trade-btn {
        display: none;
    }
}
