.markets-section {
    padding: 8rem 4rem;
    position: relative;
    background: linear-gradient(180deg, rgba(57, 255, 20, 0.02) 0%, rgba(10, 15, 10, 0.02) 100%);
}

.markets-container {
    max-width: 1400px;
    margin: 0 auto;
}

.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.market-card {
    background: rgba(10, 15, 10, 0.95);
    border: 1px solid #f371ffb3;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.market-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient( 90deg, transparent, var(--neon-green), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.market-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-green);
    box-shadow: 0 8px 32px rgba(57, 255, 20, 0.1);
}

.market-card:hover::before {
    opacity: 1;
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(57, 255, 20, 0.1);
    gap: 1rem;
}

.market-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.market-title h3 {
    color: var(--neon-green);
    font-size: 1.6rem;
    font-family: 'Source Code Pro', monospace;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1;
    font-weight: 600;
}

.market-name {
    color: var(--terminal-green);
    font-size: 0.85rem;
    opacity: 0.8;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.market-price {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.current-price {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    font-family: 'Source Code Pro', monospace;
    letter-spacing: -0.5px;
    line-height: 1;
}

.price-change {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: 'Source Code Pro', monospace;
    font-weight: 500;
    min-width: 90px;
    text-align: center;
}

.price-change.positive {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.price-change.negative {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.market-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(57, 255, 20, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(57, 255, 20, 0.05);
}

.stat:hover {
    background: rgba(57, 255, 20, 0.05);
    border-color: rgba(57, 255, 20, 0.1);
}

.stat-label {
    color: var(--terminal-green);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.stat-value {
    color: #fff;
    font-family: 'Source Code Pro', monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.loading {
    text-align: center;
    padding: 4rem;
    color: var(--terminal-green);
    font-family: 'Source Code Pro', monospace;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-green);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error {
    text-align: center;
    padding: 4rem;
    color: #ff0000;
    font-family: 'Source Code Pro', monospace;
    font-size: 1.2rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */

@media (max-width: 1200px) {
    .markets-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .markets-section {
        padding: 4rem 2rem;
    }
    .markets-grid {
        grid-template-columns: 1fr;
    }
    .market-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .market-title h3 {
        font-size: 1.5rem;
    }
    .current-price {
        font-size: 1.2rem;
    }
}

.markets-grid.collapsed {
    max-height: 1000px;
    /* Approximately 2 rows of cards */
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.markets-grid {
    max-height: 5000px;
    transition: max-height 0.5s ease;
}

.view-all-container {
    text-align: center;
    margin-top: 3rem;
}

.view-all-button {
    background: transparent;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 1rem 2.5rem;
    font-family: 'Source Code Pro', monospace;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-all-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient( 90deg, transparent, #f371ffb3, transparent);
    transition: 0.5s;
}

.view-all-button:hover {
    background: rgba(57, 255, 20, 0.1);
    box-shadow: 0 0 20px #f371ffb3;
    transform: translateY(-2px);
}

.view-all-button:hover::before {
    left: 100%;
}

/* Responsive adjustments */

@media (max-width: 1400px) {
    .market-stats {
        gap: 0.75rem;
    }
    .stat {
        padding: 0.75rem;
    }
    .stat-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .market-card {
        padding: 1.5rem;
    }
    .market-title h3 {
        font-size: 1.4rem;
    }
    .current-price {
        font-size: 1.2rem;
    }
    .market-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .stat {
        padding: 1rem;
    }
}

.market-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(57, 255, 20, 0.1);
}

.dex-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--terminal-green);
    text-decoration: none;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.dex-link:hover {
    background: rgba(57, 255, 20, 0.05);
    color: var(--neon-green);
    opacity: 1;
    transform: translateX(5px);
}

.dex-icon {
    transition: transform 0.3s ease;
}

.dex-link:hover .dex-icon {
    transform: rotate(15deg);
}

.market-tracking-section .section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.market-tracking-section .section-header h2 {
    font-size: 3.5rem;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    font-family: 'Source Code Pro', monospace;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 10px #ff6bda80, 0 0 20px #fb96ff4d, 0 0 30px #f371ffb3;
}

.market-tracking-section .section-header h2::before {
    content: '<';
    position: absolute;
    left: -2rem;
    opacity: 0.5;
}

.market-tracking-section .section-header h2::after {
    content: '/>';
    position: absolute;
    right: -2.5rem;
    opacity: 0.5;
}

.market-tracking-section .section-header p {
    font-size: 1.2rem;
    color: var(--terminal-green);
    font-family: 'Source Code Pro', monospace;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    padding: 1rem;
    background: rgba(57, 255, 20, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(57, 255, 20, 0.1);
    backdrop-filter: blur(5px);
}