/* Market Page Styles */

/* Hero Section */
.market-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 80px 0 60px;
    color: #1c2025;
    text-align: center;
}

.market-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1c2025;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.quick-stat {
    text-align: center;
}

.quick-stat-label {
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.quick-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #f59e0b;
}

/* Market Table Section */
.market-table-section {
    background: #ffffff;
    padding: 60px 0;
}

.table-controls {
    margin-bottom: 32px;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    font-size: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #f79009;
    box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.1);
}

/* Table Container */
.table-container {
    overflow-x: auto;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.market-table thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
}

.market-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.market-table th.rank-col {
    width: 60px;
    text-align: center;
}

.market-table th.name-col {
    min-width: 200px;
}

.market-table th.price-col,
.market-table th.change-col {
    text-align: right;
}

.market-table th.market-cap-col,
.market-table th.volume-col {
    text-align: right;
    min-width: 130px;
}

.market-table td {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

.market-table tr {
    cursor: pointer;
    transition: background 0.2s ease;
}

.market-table tr:hover {
    background: #f8fafc;
}

.market-table tr:last-child td {
    border-bottom: none;
}

/* Loading State */
.loading-cell {
    text-align: center;
    padding: 60px 20px !important;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f1f5f9;
    border-top-color: #f79009;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-cell p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Rank Column */
.rank {
    display: inline-block;
    width: 32px;
    text-align: center;
    font-weight: 600;
    color: #64748b;
}

/* Name Column */
.crypto-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crypto-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.crypto-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crypto-name-text {
    font-weight: 600;
    color: #1c2025;
}

.crypto-symbol {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Price Column */
.price {
    text-align: right;
    font-weight: 600;
    color: #1c2025;
}

/* 24h Change Column */
.change {
    text-align: right;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.change.positive {
    color: #059669;
    background: #d1fae5;
}

.change.negative {
    color: #dc2626;
    background: #fee2e2;
}

.change.neutral {
    color: #64748b;
    background: #f1f5f9;
}

/* Market Cap Column */
.market-cap {
    text-align: right;
    color: #1c2025;
}

/* Volume Column */
.volume {
    text-align: right;
    color: #64748b;
}

/* Market Intro Content */
.market-intro-content {
    background: #ffffff;
    padding: 60px 0 40px;
}

.market-intro-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1c2025;
    margin-bottom: 24px;
    text-align: center;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
}

.intro-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 16px;
}

/* FAQ Section */
.market-faq {
    background: #f8fafc;
    padding: 80px 0;
}

.market-faq h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1c2025;
    margin-bottom: 40px;
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.faq-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.faq-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1c2025;
    margin-bottom: 16px;
}

.faq-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: #64748b;
}

/* Table section h3 */
.market-table-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1c2025;
    margin-bottom: 24px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .market-hero {
        padding: 60px 0 40px;
    }

    .market-hero h1 {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 20px;
        margin-bottom: 32px;
    }

    .quick-stats {
        gap: 24px;
        flex-wrap: wrap;
        margin-top: 32px;
    }

    .quick-stat {
        flex: 1 1 calc(50% - 12px);
        min-width: 120px;
    }

    .quick-stat-label {
        font-size: 0.75rem;
    }

    .quick-stat-value {
        font-size: 1.5rem;
    }

    .market-table-section {
        padding: 40px 0;
    }

    .search-input {
        max-width: 100%;
        font-size: 0.9rem;
        padding: 10px 16px;
    }

    .table-container {
        margin: 0 -24px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .market-table th,
    .market-table td {
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    .market-table th.name-col {
        min-width: 0;
        max-width: 150px;
    }

    .crypto-name {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .crypto-logo {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .crypto-info {
        flex-direction: column;
        gap: 1px;
        min-width: 0;
    }

    .crypto-name-text {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
    }

    .crypto-symbol {
        font-size: 0.75rem;
    }

    .market-cap,
    .volume {
        font-size: 0.75rem;
    }

    /* Hide some columns on mobile */
    .market-table th.change-col,
    .market-table td.change-col {
        display: none;
    }

    .market-table th.market-cap-col,
    .market-table td.market-cap-col {
        display: none;
    }
}

@media (max-width: 480px) {
    .market-hero {
        padding: 40px 0 30px;
    }

    .market-hero h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0 16px;
    }

    .quick-stats {
        flex-direction: column;
        gap: 16px;
        margin-top: 24px;
    }

    .quick-stat {
        flex: 1 1 100%;
    }

    .quick-stat-value {
        font-size: 1.25rem;
    }

    .search-input {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .market-table th,
    .market-table td {
        padding: 8px 4px;
        font-size: 0.75rem;
    }

    .market-table th.name-col {
        min-width: 120px;
        max-width: 120px;
    }

    .crypto-logo {
        width: 16px;
        height: 16px;
    }

    .crypto-name-text {
        font-size: 0.8rem;
        max-width: 80px;
    }

    .crypto-symbol {
        font-size: 0.7rem;
    }

    .price {
        font-size: 0.8rem;
    }

    .volume {
        font-size: 0.7rem;
    }

    .market-intro-content h2 {
        font-size: 1.5rem;
    }

    .intro-text p {
        font-size: 1rem;
    }

    .market-faq {
        padding: 40px 0;
    }

    .market-faq h2 {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .faq-item {
        padding: 24px;
    }

    .faq-item h3 {
        font-size: 1.1rem;
    }

    .faq-item p {
        font-size: 0.95rem;
    }
}

