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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00ff88, #00aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.speedometer-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.speedometer {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 0 auto;
}

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

.marker-text {
    fill: #fff;
    font-size: 12px;
    font-weight: 500;
}

#needle {
    transition: transform 0.5s ease-out;
    transform-origin: 100px 100px;
}

.speed-display {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#speed-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ff88;
}

.unit {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 5px;
}

.test-controls {
    margin-bottom: 40px;
}

.test-button {
    background: linear-gradient(45deg, #00ff88, #00aaff);
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.3);
}

.test-button:active {
    transform: translateY(0);
}

.test-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.test-results {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    min-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    opacity: 0.8;
}

.result-value {
    font-weight: 600;
    color: #00ff88;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

footer p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 20px;
}

.ad-placeholder {
    margin-top: 20px;
}

.ad-banner {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 40px;
    font-size: 1rem;
    opacity: 0.6;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .speedometer-container {
        padding: 20px;
    }
    
    .speedometer {
        width: 250px;
        height: 150px;
    }
    
    .test-results {
        min-width: auto;
        width: 100%;
    }
    
    #speed-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .speedometer {
        width: 200px;
        height: 120px;
    }
    
    #speed-value {
        font-size: 1.5rem;
    }
    
    .test-button {
        min-width: 150px;
        padding: 12px 30px;
        font-size: 1rem;
    }
}

