* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0b131f;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.dashboard-container {
    width: 100%;
    max-width: 1000px;
    background: #111a28;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid #1e2d42;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 { font-size: 26px; margin-bottom: 8px; }
.header p { font-size: 14px; color: #8a99ad; }

.main-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 850px) {
    .main-content { grid-template-columns: 1fr; }
}

.gauge-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #182335;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #22334d;
}

.gauge-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: conic-gradient(#00d2ff 0%, #1e2d42 0%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.1);
    transition: background 0.2s;
}

.gauge-center {
    width: 190px;
    height: 190px;
    background-color: #182335;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#speed { font-size: 42px; font-weight: bold; color: #00d2ff; }
.gauge-unit { font-size: 16px; color: #8a99ad; }
.test-label { font-size: 12px; color: #00e676; margin-top: 5px; font-weight: bold; }

button {
    margin-top: 25px;
    background: linear-gradient(135deg, #00d2ff, #0072ff);
    color: #fff;
    border: none;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.5);
}

button:disabled {
    background: #2a3b50;
    cursor: not-allowed;
    box-shadow: none;
    color: #8a99ad;
}

#status { margin-top: 15px; font-size: 14px; color: #8a99ad; }

/* حاوية الرسم البياني */
.chart-container {
    width: 100%;
    height: 120px;
    margin-top: 20px;
}

/* بطاقة المعلومات */
.info-card {
    background: #182335;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #22334d;
    height: 100%;
}

.info-card h3 { font-size: 16px; color: #00d2ff; margin-bottom: 20px; }
.info-card ul { list-style: none; }
.info-card li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #22334d;
    font-size: 14px;
}
.info-card li:last-child { border-bottom: none; }
.info-card span { color: #8a99ad; }
.info-card strong { color: #fff; text-align: left; }

/* النتائج */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 650px) {
    .results-grid { grid-template-columns: 1fr; }
}

.result-card {
    background: #182335;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #22334d;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
}

.download-card .card-icon { background: rgba(0, 210, 255, 0.1); color: #00d2ff; }
.upload-card .card-icon { background: rgba(162, 0, 255, 0.1); color: #a200ff; }
.latency-card .card-icon { background: rgba(255, 171, 0, 0.1); color: #ffab00; }

.card-title { display: block; font-size: 13px; color: #8a99ad; margin-bottom: 5px; }
.card-value { font-size: 24px; font-weight: bold; }
.card-value small { font-size: 13px; color: #8a99ad; font-weight: normal; }

/* سجل الفحوصات */
.history-section {
    background: #182335;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #22334d;
}

.history-section h3 {
    font-size: 16px;
    color: #00d2ff;
    margin-bottom: 20px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #22334d;
}

th { color: #8a99ad; font-weight: normal; }
td { color: #fff; }
tbody tr:hover { background-color: rgba(255, 255, 255, 0.02); }