/* Stats Page Styles */
.stats-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

/* Stats Header */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.period-selector {
    padding: 0.9rem 1.5rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-selector:hover {
    border-color: var(--accent-gold);
}

.export-btn {
    padding: 0.9rem 1.8rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

/* Main Stats Grid */
.main-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card-large {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow-light);
    border-color: var(--accent-gold);
}

.stat-icon {
    font-size: 3.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.1), rgba(231, 111, 81, 0.1));
    border-radius: 16px;
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #2ecc71;
}

.stat-change.negative {
    color: #e74c3c;
}

.stat-change.neutral {
    color: var(--text-secondary);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.chart-btn {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-btn:hover {
    background: var(--hover-bg);
}

.chart-content {
    height: 300px;
    margin-bottom: 1.5rem;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Manufacturer Section */
.manufacturer-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.manufacturer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.manufacturer-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.manufacturer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow-light);
    border-color: var(--accent-gold);
}

.manufacturer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.manufacturer-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.ship-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.progress-bar-stat {
    width: 100%;
    height: 8px;
    background: var(--secondary-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill-stat {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.manufacturer-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.manufacturer-details span:first-child {
    color: var(--text-secondary);
}

.manufacturer-details span:last-child {
    color: var(--accent-gold);
    font-weight: 700;
}

/* Top Ships Section */
.top-ships-section {
    margin-bottom: 3rem;
}

.top-ships-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-ship-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.top-ship-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px var(--shadow-light);
    border-color: var(--accent-gold);
}

.rank-badge {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.rank-1 .rank-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: #000;
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    color: #000;
}

.ship-thumb {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover-bg);
    border-radius: 12px;
}

.ship-details-top {
    flex: 1;
}

.ship-details-top h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.ship-details-top p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ship-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

/* Additional Stats */
.additional-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow-light);
    border-color: var(--accent-gold);
}

.stat-box h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Activity Section */
.activity-section {
    margin-bottom: 3rem;
}

.activity-list {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: var(--hover-bg);
}

.activity-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    border-radius: 12px;
    font-size: 1.5rem;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.activity-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .main-stats-grid {
        grid-template-columns: 1fr;
    }

    .manufacturer-grid {
        grid-template-columns: 1fr;
    }

    .additional-stats {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .stats-container {
        padding: 0.5rem;
    }

    .stats-header h1 {
        font-size: 1.4rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.6rem;
    }

    .chart-card {
        padding: 1rem;
        overflow-x: auto;
    }

    .chart-card canvas {
        min-width: 280px;
    }

    .filter-bar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-bar select,
    .filter-bar input {
        width: 100%;
    }
}
