/* Stats Page Specific Styles */

.stats-hero {
    padding: 6rem 0 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    text-align: center;
    color: var(--background-dark);
}

.stats-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.stats-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.stats-dashboard {
    padding: 3rem 0 6rem;
}

.stats-overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Comparison Charts Section */
.comparison-charts-section {
    padding: 2rem 0 4rem;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.comparison-charts-section .section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-charts-section .section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    padding-bottom: 1rem;
    position: relative;
}

.comparison-charts-section .section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.comparison-charts-section .stats-overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.comparison-charts-section .stats-card {
    background: var(--background-card-dark);
    border: 1px solid var(--border-color-dark);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.comparison-charts-section .stats-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color-dark);
}

.comparison-charts-section .stats-card-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-light);
}

.comparison-charts-section .stats-card-body {
    padding: 1.5rem;
}

.comparison-charts-section .stats-chart-container {
    position: relative;
    height: 0;
    padding-bottom: 60%; /* Makes it rectangular and taller */
    width: 100%;
}

.comparison-charts-section .stats-chart-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Today's Stats Display */
.comparison-charts-section .today-stats {
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
}

.comparison-charts-section .today-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.comparison-charts-section .today-value span {
    color: var(--primary-color);
    font-size: 2rem;
}

.comparison-charts-section .today-comparisons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.comparison-charts-section .today-comparison-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comparison-charts-section .color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.comparison-charts-section .exchange-name {
    font-weight: 500;
    color: #ccc;
}

.comparison-charts-section .percentage-value {
    font-weight: 700;
    color: #fff;
}

@media (min-width: 992px) {
    .stats-overview-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
    }
    
    /* Charts are now stacked vertically */
    .comparison-charts-section .stats-overview {
        grid-template-columns: 1fr;
        max-width: 900px;
        margin: 0 auto;
    }
}

.price-section-title {
    margin-top: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.price-section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* TVL Breakdown Styles */
.tvl-breakdown {
    margin-top: 2rem;
}

.tvl-breakdown h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.stablecoin-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stablecoin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 212, 170, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stablecoin-name {
    font-weight: 600;
    color: var(--text-primary);
}

.stablecoin-value {
    font-weight: 700;
    color: var(--primary-color);
}

/* Volume Card Styles */
.volume-card {
    margin-top: 2rem;
}

.volume-card .stats-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.volume-card .stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.volume-card .stats-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.volume-card .change-value {
    font-weight: 600;
}

.volume-card .change-value.positive {
    color: var(--color-success);
}

.volume-card .change-value.negative {
    color: var(--color-danger);
}

.volume-card .stats-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Content Section Styles */
.content-section {
    padding: 4rem 0;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.content-wrapper h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    text-align: center;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.content-item {
    background: var(--background-card);
    border-radius: 12px;
    padding: 1.8rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.content-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 212, 170, 0.3);
}

.content-item h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.content-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper h2 {
        font-size: 1.8rem;
    }
}

/* CTA Section Styles */
.cta-section {
    background: linear-gradient(to right, rgba(0, 212, 170, 0.1), rgba(0, 212, 170, 0.05));
    padding: 5rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 212, 170, 0.2);
    border-bottom: 1px solid rgba(0, 212, 170, 0.2);
}

.cta-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-on-primary);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.btn-primary:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 212, 170, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    padding: 0.95rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(0, 212, 170, 0.1);
    transform: translateY(-2px);
}

.cta-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    text-align: left;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 212, 170, 0.3);
}

.feature-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.feature-text h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 992px) {
    .cta-features {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
}

.stats-card {
    background: var(--background-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stats-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 0 15px var(--shadow-glow);
    transform: translateY(-5px);
}

.stats-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.stats-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-timeframe {
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-timeframe:hover {
    background: rgba(0, 212, 170, 0.2);
}

.btn-timeframe.active {
    background: var(--primary-color);
    color: var(--background-dark);
    border-color: var(--primary-color);
}

.btn-refresh {
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
}

.btn-refresh:hover {
    background: rgba(0, 212, 170, 0.2);
    transform: rotate(180deg);
}

.stats-card-body {
    padding: 1.5rem;
}

.stats-highlight {
    margin-bottom: 2rem;
    text-align: center;
}

.stats-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stats-value span {
    font-size: 2.5rem;
    font-weight: 800;
}

.stats-change {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
}

.change-value {
    font-weight: 600;
}

.change-value.positive {
    color: #00d4aa;
}

.change-value.negative {
    color: #ff4560;
}

.change-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.stats-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

.stats-chart-container {
    height: 300px;
    position: relative;
}

.stats-card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-summary {
    display: flex;
    gap: 2rem;
}

.stats-summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.highlight-ath {
    color: var(--primary-color);
    font-weight: 800;
    transform: scale(1.1);
    text-shadow: 0 0 10px var(--shadow-glow);
}

.stats-source {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Active nav link */
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer Grid Styles */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-value span {
        font-size: 2rem;
    }
}
