body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: var(--color-bg);
    color: #333;
}

/*.container {
    max-width: 1800px;
    margin: 0 auto;
}*/

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 300;
}

.github-link {
    margin-top: 10px;
    font-size: 0.9em;
    opacity: 0.8;
}

.github-link a {
    color: white;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.5);
}


/*.test-name {
    font-weight: 500;
    text-align: left;
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
}


.benchmark-selector {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    margin-right: 10px;
    min-width: 250px;
}

.analysis-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.chart-container {
    height: 400px;
    margin: 20px 0;
}*/

/* ================================ Основной контейнер ==================================== */

#results {
    background: white;
    /*padding-top: 25px;*/
    border-radius: 0 8px 8px 8px;
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.05);*/
    position: relative;
}

/* ================================ Основной контейнер ==================================== */

.results-container {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    border-radius: 25px;
}

/* ================================ Основная таблица ==================================== */
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.results-table th {
    background: #2c3e50;
    color: white;    
/*    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;*/
}

.results-table tfoot td.lang_all {
    background: #2c3e50;
    color: white;
}

.results-table td {
    padding: 10px 8px;
    text-align: center;
    /*border-bottom: 2px solid #dee2e6;*/
    border: 0px solid #dee2e6;
}


.results-table thead td,
.results-table thead th {
    border-bottom: 4px solid #2c3e50;
}

.results-table tfoot td {
    border-top: 4px solid #2c3e50;    
}

/* ================================ Основная таблица Подсветка TR ==================================== */
/*.results-table tr {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
*/

.results-table tr:hover {
    background-color: #f8f9fa !important; /* Легкая подсветка фона */
    box-shadow: 0 0 0 4px #2c3e50 inset; /* Слабая рамка */
}

/*.results-table tr:hover td {
    position: relative;
}*/
/*
.results-table tr:hover td:first-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(33, 150, 243, 0.8);
    pointer-events: none;
}*/

/* ================================ Свой цвет для каждого языка ====================================  */
.lang_c { background: #3498db; color: white; }
.lang_cpp { background: #2ecc71; color: white; }
.lang_go { background: #9b59b6; color: white; }
.lang_golang { background: #9b59b6; color: white; }
.lang_crystal { background: #e67e22; color: white; }
.lang_rust { background: #e74c3c; color: white; }
.lang_csharp { background: #1abc9c; color: white; }
.lang_swift { background: #356ba2; color: white; }
.lang_java { background: #f1c40f; color: white; }
.lang_kotlin { background: #7c83ea; color: white; }
.lang_typescript { background: #16a085; color: white; }
.lang_zig { background: #a41111; color: white; }

.results-table .lang_c { background: #3498db; color: white; }
.results-table .lang_cpp { background: #2ecc71; color: white; }
.results-table .lang_go { background: #9b59b6; color: white; }
.results-table .lang_golang { background: #9b59b6; color: white; }
.results-table .lang_crystal { background: #e67e22; color: white; }
.results-table .lang_rust { background: #e74c3c; color: white; }
.results-table .lang_csharp { background: #1abc9c; color: white; }
.results-table .lang_swift { background: #356ba2; color: white; }
.results-table .lang_java { background: #f1c40f; color: white; }
.results-table .lang_kotlin { background: #7c83ea; color: white; }
.results-table .lang_typescript { background: #16a085; color: white; }
.results-table .lang_zig { background: #a41111; color: white; }

/* ================================ Выделение цветом ячеек по результату (всего 10 градиентов) ====================================  */
td.speed_0 { background: #1b5e20e3; font-weight: bold; color: white; } /* best */
td.speed_1 { background: #4caf50aa; }
td.speed_2 { background: #8bc34aaa; }
td.speed_3 { background: #cddc39aa; }
td.speed_4 { background: #ffeb3baa; }
td.speed_5 { background: #ffc107aa; }
td.speed_6 { background: #ff9800aa; }
td.speed_7 { background: #ff5722aa; }
td.speed_8 { background: #f44336aa; }
td.speed_9 { background: #b71c1ce0; font-weight: bold; color: white; } /* worst */


/* ================================ Legend ====================================  */
/*.legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}
*/

.table-legend {
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-top: 30px;
    max-width: 800px;
    
    /* Оформление */
    padding: 12px 15px 12px 40px; /* Отступ слева под иконку */
    background-color: #f8f9fa;
    border-radius: 25px;
    position: relative;
}

/* Псевдо-иконка */
.table-legend::before {
    content: '💡';
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 16px;
}

/*================================ Tabs ===========================================*/
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.tab {
    padding: 12px 24px;
    background: #e9ecef;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.tab:hover {
    background: #ddd;
}

.tab.active {
    background: white;
    border-bottom: 3px solid var(--color-fast);
}

/*.tab-content {
    display: none;
    background: white;
    padding: 25px;
    border-radius: 0 8px 8px 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-content.active {
    display: block;
}
*/
/*================================ Кнопки фильтрации ===========================================*/
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    align-items: center;
    background: #d1e8ee;
}

.filter-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #e9ecef;
}

.filter-btn.active {
    background: #2ecc71;
    color: white;
    border-color: #2ecc71;
}

/*================================ Checkbox ===========================================*/

.ios-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
    position: absolute;
    top: 0;
    right: 5px;
}

.ios-checkbox input {
  display: none;
}

.ios-checkbox-box {
  width: 50px;
  height: 30px;
  background: #e0e0e0;
  border-radius: 15px;
  position: relative;
  transition: all 0.3s;
}

.ios-checkbox-box::before {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.ios-checkbox input:checked + .ios-checkbox-box {
  background: #4CAF50;
}

.ios-checkbox input:checked + .ios-checkbox-box::before {
  transform: translateX(20px);
}


/*================================ History Chart ===========================================*/
#historyChart {
  width: 100% !important;
  height: 500px !important;
}

/* Для мобильных */
@media (max-width: 768px) {
  #historyChart {
    height: 400px !important;
  }
  
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/*================================ badge medals ===========================================*/

.value_badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px 2px 6px;
  border-radius: 15px;
  font-weight: bold;
}
.value_badge.gold {
  background: rgba(255, 215, 0, 0.1);
  border: 2px solid #FFD700;
  color: #E89043;
}
.value_badge.silver {
  background: rgba(192, 192, 192, 0.1);
  border: 2px solid #C0C0C0;
  color: #827A7A;
}
.value_badge.bronze {
  background: rgba(205, 127, 50, 0.1);
  border: 2px solid #CD7F32;
  color: #CD7F32;
}

/*================================ main legend stats ===========================================*/
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(183, 184, 187, 0.66);
}

.stat-card h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

/*================================ language badge ===========================================*/
.language-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  margin-right: 5px;
}
