/* ===== ТЁМНАЯ ТЕМА BLiZ ===== */
:root {
    --primary: #6c5ce7;
    --secondary: #a463f5;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.95);
    --text: #ffffff;
    --text-muted: #a0a0b0;
    --accent: #00d4ff;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text);
}

.container {
    max-width: 1000px;
    width: 100%;
    background: var(--bg-card);
    border-radius: 30px;
    padding: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

h1 {
    font-size: 3em;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.2em;
}

.server-info {
    text-align: center;
    margin-bottom: 50px;
}

.server-badge {
    background: rgba(255,255,255,0.05);
    padding: 12px 35px;
    border-radius: 50px;
    color: var(--accent);
    font-size: 1em;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.test-controls {
    text-align: center;
    margin-bottom: 50px;
}

.start-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 18px 60px;
    font-size: 1.4em;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.3);
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.2);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.5);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.result-card {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(5px);
}

.result-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.05);
    border-color: var(--primary);
}

.result-label {
    color: var(--text-muted);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-value {
    color: var(--accent);
    font-size: 3.2em;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0,212,255,0.3);
}

.result-value.upload {
    color: #ff79c6;
}

.result-unit {
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
}

.test-status {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1em;
    padding: 25px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 20px;
}

@media (max-width: 768px) {
    .container { padding: 30px; }
    h1 { font-size: 2.2em; }
    .results-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .result-value { font-size: 2.5em; }
    .start-button { padding: 15px 40px; font-size: 1.2em; }
}

/* ===== ИСТОРИЯ ТЕСТОВ ===== */
.history-section {
    margin-top: 40px;
    padding: 25px;
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.history-title {
    color: var(--accent);
    font-size: 1.3em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    align-items: center;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.02);
}

.history-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--primary);
}

.history-time {
    color: var(--text-muted);
    font-size: 0.9em;
}

.history-stats {
    display: flex;
    gap: 20px;
    color: var(--text);
}

.history-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.history-stats .ping { color: #ffb74d; }
.history-stats .download { color: #4fc3f7; }
.history-stats .upload { color: #81c784; }

.history-copy {
    padding: 8px 15px;
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.history-copy:hover {
    background: var(--primary);
    color: white;
}

.share-button {
    margin-top: 20px;
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    transition: all 0.2s;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

/* Скроллбар */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}
