* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    font-weight: 300;
    min-height: 100vh;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 20px 15px 20px;
    overflow-x: hidden;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 200;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1;
}

.header p {
    color: #666;
    font-size: 1rem;
    line-height: 1;
    margin-top: 5px;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    padding: 16px 24px;
    text-align: center;
    color: #fff;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-card .label {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.releases-section {
    background: #f8f8f8;
    border-radius: 20px;
    padding: 20px 30px 10px 30px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.downloads-section {
    padding-bottom: 20px;
}

.releases-section h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #333;
    line-height: 1;
}

.release-table {
    width: 100%;
    border-collapse: collapse;
}

.release-table th {
    text-align: left;
    padding: 12px 16px;
    background: #1a1a1a;
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.release-table th:first-child {
    border-radius: 10px 0 0 10px;
}

.release-table th:last-child {
    border-radius: 0 10px 10px 0;
}

.release-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

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

.release-table tr:hover td {
    background: #f0f0f0;
    mix-blend-mode: multiply;
}

.build-name {
    font-weight: 600;
    color: #1a1a1a;
    min-width: 100px;
    max-width: 100px;
    width: 100px;
}

.build-name a {
    color: #1a1a1a;
    text-decoration: none;
}

.build-name a:hover {
    color: #7b2ff7;
}

.download-count {
    font-weight: 700;
    color: #5e9eff;
    font-family: 'Orbitron', sans-serif;
    min-width: 150px;
    max-width: 150px;
    width: 150px;
    mix-blend-mode: multiply;
}

.file-size {
    color: #666;
    min-width: 120px;
    max-width: 120px;
    width: 120px;
}

.release-date {
    color: #999;
    font-size: 0.85rem;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #7b2ff7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
    background: #fdf2f2;
    border-radius: 12px;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: #7b2ff7;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.refresh-btn {
    background: linear-gradient(135deg, #7b2ff7, #00d4ff);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 47, 247, 0.3);
}

.last-updated {
    text-align: center;
    color: #999;
    font-size: 0.8rem;
    margin-top: 10px;
}

.chart-container {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 5px;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    width: 60px;
    font-size: 0.85rem;
    font-weight: 600;
}

.bar-label a {
    color: #1a1a1a;
    text-decoration: none;
}

.bar-label a:hover {
    color: #7b2ff7;
}

.bar-track {
    flex: 1;
    height: 28px;
    background: #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7b2ff7, #00d4ff);
    border-radius: 14px;
    transition: width 0.5s ease-out;
    min-width: 30px;
}

.bar-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 700;
    color: #5e9eff;
    font-family: 'Orbitron', sans-serif;
    mix-blend-mode: multiply;
}

@media (max-width: 1200px) {
    .footer-bar {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

@media (max-width: 900px) {
    .hide-mobile {
        display: none;
    }
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .stat-card .number {
        font-size: 1.8rem;
    }

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

    .build-name {
        min-width: 75px;
        max-width: 75px;
        width: 75px;
    }

    .download-count {
        min-width: 110px;
        max-width: 110px;
        width: 110px;
    }

    .file-size {
        min-width: 75px;
        max-width: 75px;
        width: 75px;
    }
}

/* Hide 3rd and 4th stat cards below 600px */
@media (max-width: 599px) {
    .stat-card:nth-child(3),
    .stat-card:nth-child(4) {
        display: none;
    }
}

/* Hide 4th stat card between 675px and 900px */
@media (min-width: 675px) and (max-width: 900px) {
    .stat-card:nth-child(4) {
        display: none;
    }
}

/* Inline style overrides */
.header h1 {
    margin-bottom: 15px;
}

.header p {
    margin-bottom: 25px;
}

.refresh-container {
    text-align: center;
    margin-top: -20px;
}

.error .refresh-btn {
    margin-top: 20px;
}