/* markets.css */

/* ===================== */
/* Markets Hero Section */
/* ===================== */
.markets-hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.markets-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(255, 107, 53, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 140, 90, 0.08) 0%, transparent 40%);
    z-index: 1;
}

.markets-hero .container {
    position: relative;
    z-index: 2;
}

.markets-hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
    padding: 8px 20px;
    border-radius: 30px;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.markets-hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-light);
}

.markets-hero h1 span {
    color: var(--accent-color);
    text-shadow: 0 0 40px rgba(255, 107, 53, 0.5);
}

.markets-hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    max-width: 500px;
    line-height: 1.8;
}

.market-stats-mini {
    display: flex;
    gap: 40px;
}

.stat-mini {
    display: flex;
    flex-direction: column;
}

.stat-mini-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

.stat-mini-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Floating Cards Animation */
.markets-hero-visual {
    position: relative;
    height: 350px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: linear-gradient(145deg, var(--secondary-color), #1a1a1a);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 16px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.floating-card span {
    font-weight: 600;
    color: var(--text-light);
}

.floating-card .price-up {
    color: #4caf50 !important;
    font-size: 0.9rem;
}

.floating-card .price-down {
    color: #f44336 !important;
    font-size: 0.9rem;
}

.floating-card.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card.card-2 {
    top: 45%;
    right: 5%;
    animation-delay: 2s;
}

.floating-card.card-3 {
    bottom: 15%;
    left: 25%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ===================== */
/* Market Filters Section */
/* ===================== */
.market-filters {
    padding: 30px 0;
    background: rgba(20, 20, 20, 0.95);
    position: sticky;
    top: 70px;
    z-index: 50;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.filter-tab:hover {
    border-color: var(--accent-color);
    color: var(--text-light);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--accent-color), #e55a2b);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 12px 45px 12px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* ===================== */
/* Markets Table Section */
/* ===================== */
.markets-table-section {
    padding: 60px 0 100px;
    background: var(--primary-color);
    position: relative;
    z-index: 2;
}

.markets-table-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.market-category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.category-icon.crypto-color {
    background: linear-gradient(135deg, #f7931a, #ffab40);
    box-shadow: 0 5px 20px rgba(247, 147, 26, 0.4);
}

.category-icon.gold-color {
    background: linear-gradient(135deg, #ffd700, #ffec8b);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.category-icon.oil-color {
    background: linear-gradient(135deg, #ff6b35, #ff8c5a);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.market-category-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
}

.category-count {
    background: rgba(255, 107, 53, 0.15);
    color: var(--accent-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.markets-table-container {
    background: linear-gradient(145deg, var(--secondary-color), #151515);
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 53, 0.15);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.markets-table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
}

.markets-table thead {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.12), rgba(255, 107, 53, 0.05));
}

.markets-table th {
    padding: 18px 15px;
    text-align: right;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 107, 53, 0.15);
    white-space: nowrap;
}

.markets-table th:first-child {
    padding-right: 25px;
}

.markets-table th:last-child {
    text-align: center;
}

.markets-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.markets-table tbody tr:hover {
    background: rgba(255, 107, 53, 0.06);
}

.markets-table tbody tr:last-child {
    border-bottom: none;
}

.markets-table td {
    padding: 18px 15px;
    vertical-align: middle;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Asset Info */
.asset-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.asset-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    position: relative;
}

.asset-icon::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
}

/* Crypto Icons */
.asset-icon.bitcoin {
    background: linear-gradient(135deg, #f7931a, #ffab40);
}

.asset-icon.ethereum {
    background: linear-gradient(135deg, #627eea, #8c9eff);
}

.asset-icon.tether {
    background: linear-gradient(135deg, #26a17b, #4ecba0);
}

.asset-icon.bnb {
    background: linear-gradient(135deg, #f3ba2f, #ffd54f);
}

.asset-icon.solana {
    background: linear-gradient(135deg, #9945ff, #14f195);
}

.asset-icon.cardano {
    background: linear-gradient(135deg, #0033ad, #3366ff);
}

.asset-icon.xrp {
    background: linear-gradient(135deg, #23292f, #4a5568);
}

.asset-icon.dogecoin {
    background: linear-gradient(135deg, #c2a633, #e5c85c);
}

/* Metals Icons */
.asset-icon.gold {
    background: linear-gradient(135deg, #ffd700, #ffec8b);
}

.asset-icon.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
}

/* Energy Icons */
.asset-icon.oil {
    background: linear-gradient(135deg, #ff6b35, #ff8c5a);
}

.asset-details {
    display: flex;
    flex-direction: column;
}

.asset-name {
    font-weight: 700;
    font-size: 1rem;
}

.asset-symbol {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* Price */
.asset-price {
    font-weight: 700;
    font-size: 1.05rem;
    font-family: 'Dana', monospace;
}

/* Change Percentage */
.change-percent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.change-percent.positive {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.change-percent.negative {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

/* High/Low */
.high-low {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.high-value {
    color: #4caf50;
    font-size: 0.9rem;
}

.low-value {
    color: #f44336;
    font-size: 0.9rem;
}

/* Volume */
.volume {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Trade Buttons */
.trade-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-trade {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

.btn-buy {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    color: white;
}

.btn-sell {
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: white;
}

.btn-sell:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
    color: white;
}

/* ===================== */
/* Info Cards */
/* ===================== */
.info-card {
    background: linear-gradient(145deg, var(--secondary-color), #151515);
    border: 1px solid rgba(255, 107, 53, 0.1);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.15);
}

.info-card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-color), #e55a2b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.6rem;
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.info-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-light);
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* ===================== */
/* Price Ticker */
/* ===================== */
.price-ticker {
    background: var(--secondary-color);
    border-top: 1px solid rgba(255, 107, 53, 0.1);
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
    padding: 15px 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    animation: ticker 30s linear infinite;
    width: max-content;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 30px;
    white-space: nowrap;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-item:last-child {
    border-left: none;
}

.ticker-symbol {
    font-weight: 700;
    color: var(--text-light);
}

.ticker-price {
    font-weight: 600;
    color: var(--text-light);
}

.ticker-change {
    font-size: 0.85rem;
    font-weight: 600;
}

.ticker-change.up {
    color: #4caf50;
}

.ticker-change.down {
    color: #f44336;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ===================== */
/* CTA Section */
/* ===================== */
.markets-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--accent-color), #e55a2b);
    text-align: center;
    position: relative;
    z-index: 2;
}

.markets-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 30%);
}

.markets-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
}

.markets-cta p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    position: relative;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.btn-outline-white {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 15px 40px;
    font-weight: 700;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline-white:hover {
    background: white;
    color: var(--accent-color);
}

/* ===================== */
/* Trade Modal */
/* ===================== */
.modal-content {
    background: linear-gradient(145deg, var(--secondary-color), #151515);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 20px;
    color: var(--text-light);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 25px;
}

.modal-title {
    font-weight: 700;
    font-size: 1.3rem;
}

.modal-title span {
    color: var(--accent-color);
}

.btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 25px;
}

.trade-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.trade-type-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.trade-type-btn.active {
    border-color: var(--accent-color);
    background: rgba(255, 107, 53, 0.1);
    color: var(--text-light);
}

.trade-type-btn.active[data-type="buy"] {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.trade-type-btn.active[data-type="sell"] {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.trade-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
}

.trade-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-info-row:last-child {
    border-bottom: none;
}

.trade-info-row span:first-child {
    color: var(--text-muted);
}

.trade-amount {
    margin-bottom: 20px;
}

.trade-amount label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.trade-amount input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    color: var(--text-light);
    font-size: 1rem;
}

.trade-amount input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.trade-summary {
    background: rgba(255, 107, 53, 0.1);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.total-value {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.btn-trade-submit {
    background: linear-gradient(135deg, var(--accent-color), #e55a2b);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-trade-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

/* ===================== */
/* Responsive */
/* ===================== */
@media (max-width: 991px) {
    .markets-hero h1 {
        font-size: 2.5rem;
    }

    .markets-hero-visual {
        display: none;
    }

    .market-stats-mini {
        gap: 25px;
    }

    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs {
        justify-content: center;
    }

    .search-box {
        width: 100%;
    }

    .markets-table-container {
        overflow-x: auto;
    }

    .markets-table {
        min-width: 800px;
    }
}

@media (max-width: 576px) {
    .markets-hero {
        padding: 150px 0 60px;
    }

    .markets-hero h1 {
        font-size: 2rem;
    }

    .market-stats-mini {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-mini {
        flex: 1 1 30%;
    }

    .filter-tab {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .filter-tab i {
        display: none;
    }

    .trade-actions {
        flex-direction: column;
    }

    .btn-trade {
        width: 100%;
    }
}