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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
    animation: bgShift 8s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% { 
        background-position: 0% 0%;
        opacity: 1;
    }
    50% { 
        opacity: 0.8;
    }
}

.container {
    width: 100%;
    max-width: 900px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 25px;
    box-shadow: 
        0 0 60px rgba(102, 126, 234, 0.4),
        0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    backdrop-filter: blur(10px);
    position: relative;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, rgba(102, 126, 234, 0.03) 0%, transparent 100%);
    pointer-events: none;
    animation: shimmerBg 4s ease-in-out infinite;
}

@keyframes shimmerBg {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: glow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.8;
    }
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

header h1,
header p {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Logo Styling */
.logo-container {
    margin-bottom: 20px;
}

.logo {
    max-width: 300px;
    height: auto;
    width: 100%;
    max-height: 120px;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.main-content {
    padding: 40px 20px;
}

/* Test Phases */
.test-phases {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.phase-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
}

.phase-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.phase-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: scale(1.08);
    box-shadow: 
        0 8px 20px rgba(102, 126, 234, 0.4),
        0 0 30px rgba(102, 126, 234, 0.3);
    animation: phaseGlow 1s ease-in-out infinite;
}

@keyframes phaseGlow {
    0%, 100% { 
        box-shadow: 
            0 8px 20px rgba(102, 126, 234, 0.4),
            0 0 30px rgba(102, 126, 234, 0.3);
    }
    50% { 
        box-shadow: 
            0 12px 30px rgba(102, 126, 234, 0.5),
            0 0 50px rgba(102, 126, 234, 0.5);
    }
}

.phase-item.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.phase-icon {
    font-size: 2em;
    margin-bottom: 8px;
    display: inline-block;
}

.phase-name {
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-value {
    font-size: 1.2em;
    font-weight: bold;
}

.phase-arrow {
    display: none;
    font-size: 1.5em;
    color: #ddd;
    margin: 0 5px;
}

@media (min-width: 768px) {
    .test-phases {
        flex-wrap: nowrap;
    }
    .phase-arrow {
        display: block;
    }
}

.speedometer {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    animation: slideDown 0.6s ease-out;
    position: relative;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.speedometer-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 250px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.gauge {
    position: relative;
    width: 300px;
    height: 170px;
    filter: drop-shadow(0 10px 30px rgba(102, 126, 234, 0.25));
    z-index: 2;
}

.gauge-svg {
    width: 100%;
    height: 100%;
}

.gauge-bg {
    stroke: #e0e0e0;
    stroke-width: 15;
    fill: none;
}

.gauge-fill {
    stroke: url(#speedGradient);
    stroke-width: 15;
    fill: none;
    stroke-linecap: round;
    transform-origin: 100px 80px;
    transition: all 0.3s ease;
}

.speed-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.speed-value {
    font-size: 3.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.3));
}

.speed-unit {
    font-size: 1em;
    color: #999;
    margin-top: 5px;
}

.test-button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.test-button,
.stop-button {
    padding: 16px 60px;
    font-size: 1.15em;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 220px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.test-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.test-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.test-button:hover:not(:disabled) {
    transform: translateY(-6px);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.6),
        0 0 40px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.test-button:hover:not(:disabled)::before {
    left: 100%;
}

.test-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.test-button:active:not(:disabled) {
    transform: translateY(-3px);
}

.stop-button {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.stop-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.stop-button:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 15px 40px rgba(239, 68, 68, 0.6),
        0 0 40px rgba(239, 68, 68, 0.4);
}

.stop-button:hover::before {
    left: 100%;
}

.stop-button:active {
    transform: translateY(-3px);
}

.status {
    text-align: center;
    font-size: 1.05em;
    color: #333;
    margin-bottom: 30px;
    min-height: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    font-weight: 600;
    animation: statusPulse 0.8s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        border-left-color: #667eea;
    }
    50% {
        opacity: 0.85;
        border-left-color: #764ba2;
    }
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.6s ease;
}

.result-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.result-card:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f3ff 0%, #ede9fe 100%);
    transform: translateY(-12px);
    box-shadow: 
        0 12px 30px rgba(102, 126, 234, 0.25),
        0 0 30px rgba(102, 126, 234, 0.1);
}

.result-card:hover::before {
    top: -25%;
    right: -25%;
}

.result-card:hover::after {
    opacity: 1;
}

.result-label {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    font-size: 2.2em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.result-unit {
    font-size: 0.85em;
    color: #ccc;
    margin-top: 5px;
}

.progress-section {
    margin-bottom: 40px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 20px;
    border-radius: 12px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #333;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 14px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #667eea 50%, #764ba2 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.history-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.history-section h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #333;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.history-item:hover::before {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.history-time {
    font-size: 0.85em;
    color: #999;
}

.history-speeds {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
}

.history-speed {
    font-weight: bold;
    color: #667eea;
}

.empty-history {
    text-align: center;
    color: #999;
    padding: 20px;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.9em;
    border-top: 1px solid #e9ecef;
}

footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Info Section */
.info-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 2px solid #667eea;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    animation: slideDown 0.6s ease-out;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.info-icon {
    font-size: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-header h3 {
    color: #667eea;
    font-size: 1.3em;
    margin: 0;
    font-weight: 700;
}

.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    background: white;
    padding: 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.info-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    border-left-color: #764ba2;
}

.info-label {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
    font-size: 1.05em;
}

.info-item p {
    margin: 0;
    color: #333;
    font-size: 0.95em;
    line-height: 1.6;
}

.info-item strong {
    color: #764ba2;
}

@media (max-width: 768px) {
    .info-content {
        grid-template-columns: 1fr;
    }

    .info-section {
        padding: 18px;
    }

    .info-header h3 {
        font-size: 1.1em;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }

    .speed-value {
        font-size: 2.2em;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .test-button,
    .stop-button {
        padding: 12px 30px;
        font-size: 0.95em;
        min-width: 150px;
    }

    .main-content {
        padding: 20px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.testing {
    animation: pulse 1s infinite;
}
/* History Section */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.history-controls {
    display: flex;
    gap: 10px;
}

.export-button,
.clear-button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    color: #333;
}

.export-button:hover,
.clear-button:hover {
    background: #f0f0f0;
    border-color: #999;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.export-button:active,
.clear-button:active {
    transform: translateY(0);
}

.history-item {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border-left-color: #764ba2;
}

.history-time {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.history-speeds {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.95em;
}

.history-speeds span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
}

.history-speed {
    font-weight: bold;
    color: #667eea;
}

.history-item:hover .history-speed {
    color: #764ba2;
}

/* Statistics Section */
.statistics-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
}

.statistics-section h2 {
    margin-bottom: 20px;
    color: #0f172a;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-4px);
}

.stat-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-unit {
    font-size: 0.85em;
    color: #999;
}

/* Enhanced result cards */
.result-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.result-card:hover {
    border-color: #667eea;
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.result-card:hover::before {
    left: 100%;
}

/* Improved buttons */
.test-button,
.stop-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.test-button:hover:not(:disabled),
.stop-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
    letter-spacing: 1px;
}

.test-button:active:not(:disabled),
.stop-button:active:not(:disabled) {
    transform: translateY(-1px);
}

/* Loading indicator */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .statistics-section {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-speeds {
        gap: 12px;
    }

    .history-controls {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .statistics-section h2,
    .history-header h2 {
        font-size: 1.2em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .history-speeds {
        flex-direction: column;
        gap: 6px;
    }
}