/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.2;
    color: #ffffff;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    min-height: 100vh;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ===== HEADER STYLES ===== */
.header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ffd700;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.header-content {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}

.logo i {
    font-size: 1.5rem;
    color: #000000;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    padding: 0.5rem;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.5);
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* ===== MAIN CONTENT STYLES ===== */
.main-content {
    margin-bottom: 0.8rem;
}

/* ===== TEST CONTROL STYLES ===== */
.test-control {
    margin-bottom: 0.5rem;
}

.control-card {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.control-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(255, 215, 0, 0.4);
    border-color: #ffed4e;
}

.control-card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.control-card p {
    color: #cccccc;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ===== BUTTON STYLES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000000;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
    background: linear-gradient(45deg, #ffed4e, #ffd700);
}

.btn-secondary {
    background: linear-gradient(45deg, #333333, #555555);
    color: #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    border: 2px solid #ffd700;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000000;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: #ffd700;
    border: 2px solid #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.btn-outline:hover {
    background: #ffd700;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

/* ===== TEST STATUS STYLES ===== */
.test-status {
    margin-bottom: 0.5rem;
}

.status-card {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-2px);
    border-color: #ffed4e;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.status-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.running {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: glow 2s infinite;
}

.status-text {
    font-weight: 500;
    color: #ffd700;
    font-size: 0.9rem;
}

.progress-container {
    margin-top: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: #333333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.progress-text {
    text-align: center;
    color: #cccccc;
    font-weight: 500;
    font-size: 0.8rem;
}

/* ===== RESULTS DASHBOARD STYLES ===== */
.results-dashboard {
    margin-bottom: 0.8rem;
}

.results-dashboard h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffd700;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

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

.result-card {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(255, 215, 0, 0.4);
    border-color: #ffed4e;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.card-header i {
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    color: #000000;
}

.download-card .card-header i {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.upload-card .card-header i {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.ping-card .card-header i {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
}

.card-content {
    text-align: center;
}

.speed-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.speed-unit {
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.speed-bar {
    width: 100%;
    height: 5px;
    background: #333333;
    border-radius: 4px;
    overflow: hidden;
}

.speed-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease;
}

.download-fill {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.upload-fill {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.ping-indicator {
    margin-top: 0.5rem;
}

.ping-bar {
    width: 100%;
    height: 5px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 4px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ===== TEST INFO STYLES ===== */
.test-info {
    margin-bottom: 0.8rem;
}

.info-card {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    border-color: #ffed4e;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 0.8rem;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 237, 78, 0.1));
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: transform 0.2s ease;
}

.info-item:hover {
    transform: translateX(2px);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 237, 78, 0.2));
    border-color: rgba(255, 215, 0, 0.5);
}

.info-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    color: #ffd700;
    font-size: 0.9rem;
}

/* ===== ERROR SECTION STYLES ===== */
.error-section {
    margin-bottom: 0.8rem;
}

.error-card {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    transition: transform 0.3s ease;
}

.error-card:hover {
    transform: translateY(-2px);
    border-color: #ffed4e;
}

.error-card i {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: pulse 2s infinite;
}

.error-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.error-card p {
    color: #cccccc;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ===== FOOTER STYLES ===== */
.footer {
    text-align: center;
    padding: 0.5rem 0;
    color: rgba(255, 215, 0, 0.8);
    font-size: 0.7rem;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 1);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.8);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 8px;
    }
    
    .header {
        padding: 0.4rem 0;
        margin-bottom: 0.4rem;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .logo i {
        font-size: 1.3rem;
        padding: 0.4rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .control-card,
    .status-card,
    .result-card,
    .info-card,
    .error-card {
        padding: 0.8rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .speed-value {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.3rem 0;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.2rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .control-card,
    .status-card,
    .result-card,
    .info-card,
    .error-card {
        padding: 0.6rem;
    }
    
    .speed-value {
        font-size: 1.6rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in {
    animation: slideIn 0.5s ease;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    }
    
    .control-card,
    .status-card,
    .result-card,
    .info-card,
    .error-card {
        background: rgba(0, 0, 0, 0.95);
        color: #ffffff;
    }
    
    .control-card h2,
    .status-header h3,
    .card-header h3,
    .info-card h3,
    .error-card h3 {
        color: #ffd700;
    }
    
    .control-card p,
    .progress-text,
    .speed-unit {
        color: #cccccc;
    }
    
    .speed-value {
        color: #ffffff;
    }
}


