/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.logo i {
    font-size: 28px;
    color: #ffd700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.security-badge i {
    color: #4caf50;
}

/* Main Test Interface */
.test-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 40px;
}

/* Gauges Grid */
.gauges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 20px;
}

.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.gauge-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-canvas {
    position: absolute;
    top: 0;
    left: 0;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.gauge-center {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.speed-value {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.speed-unit {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

.gauge-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.gauge-label i {
    font-size: 20px;
    color: #ffd700;
}

/* Ping Gauge Special Styling */
.ping-gauge {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.ping-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ping-value {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ping-unit {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

.ping-animation {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 8px;
}

.ping-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pingPulse 1.5s infinite;
}

.ping-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.ping-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes pingPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Control Section */
.control-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.test-button {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(238, 90, 36, 0.4);
    overflow: hidden;
}

.test-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(238, 90, 36, 0.6);
}

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

.test-button.testing {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    animation: pulse 2s infinite;
}

.test-button.completed {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.button-content i {
    font-size: 32px;
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.test-button.testing .button-content {
    opacity: 0;
}

.test-button.testing .button-loader {
    opacity: 1;
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 15px 50px rgba(255, 215, 0, 0.8);
    }
}

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

.test-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Connection Panel */
.connection-panel {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.connection-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.connection-item i {
    color: #ffd700;
    font-size: 16px;
}

/* Hidden SEO Content */
.seo-content {
    display: none;
    visibility: hidden;
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.seo-content h1,
.seo-content h2,
.seo-content h3,
.seo-content p,
.seo-content ul,
.seo-content li,
.seo-content table,
.seo-content tr,
.seo-content th,
.seo-content td {
    font-size: 0;
    line-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gauges-grid {
        gap: 40px;
    }
    
    .connection-panel {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .gauges-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gauge-wrapper {
        width: 160px;
        height: 160px;
    }
    
    .gauge-canvas {
        width: 160px;
        height: 160px;
    }
    
    .speed-value {
        font-size: 36px;
    }
    
    .test-button {
        width: 160px;
        height: 160px;
        font-size: 16px;
    }
    
    .connection-panel {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .test-interface {
        padding: 20px 15px;
        gap: 30px;
    }
    
    .gauge-wrapper {
        width: 140px;
        height: 140px;
    }
    
    .gauge-canvas {
        width: 140px;
        height: 140px;
    }
    
    .speed-value {
        font-size: 28px;
    }
    
    .test-button {
        width: 140px;
        height: 140px;
    }
}