* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 16px;            /* было наследовано ~14px — увеличили */
    background: #0f1115;
    color: #e6e8eb;
}


.sources {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background: #181b22;
    border-bottom: 1px solid #2a2f3a;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 20px;
    border-right: 1px solid #2a2f3a;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
    /* лёгкое свечение в тон дракону */
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.55));
    transition: filter 0.2s ease, transform 0.2s ease;
}
.brand-logo:hover {
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.9));
    transform: scale(1.05);
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, #c084fc, #a855f7 60%, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.source-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.source-btn, .sport-btn {
    padding: 8px 16px;
    border: 1px solid #2a2f3a;
    background: #20242d;
    color: #cfd3da;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.15s;
}
.source-btn:hover, .sport-btn:hover { background: #2a3040; }
.source-btn.active, .sport-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.layout {
    display: flex;
    min-height: calc(100vh - 57px);
}

.sports {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    width: 180px;
    border-right: 1px solid #2a2f3a;
    background: #13161c;
}
.sport-btn { text-align: left; }

.content { flex: 1; padding: 20px; }

.status { min-height: 22px; margin-bottom: 10px; font-size: 14px; }
.status.loading { color: #93c5fd; }
.status.error { color: #f87171; }

table.matches {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  table-layout: auto;     /* динамические ширины по содержимому + подсказкам */
}
table.matches th, table.matches td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #232833;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Пропорции колонок: турнир = 2 части, соперники = 3 части (2/3) */
table.matches .col-date       { width: 12%; }
table.matches .col-country    { width: 10%; }
table.matches .col-tournament { width: 22%; }   /* 2 части */
table.matches .col-teams      { width: 33%; }   /* 3 части */
table.matches .col-stream     { width: 12%; }

table.matches th {
    background: #1a1e26;
    color: #9aa3b2;
    font-weight: 600;
    position: sticky;
    top: 0;
}
table.matches tr:hover td { background: #171b22; }
td.empty { text-align: center; color: #6b7280; padding: 30px; }

.feed { padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.feed.yes   { background: #14532d; color: #86efac; }
.feed.no    { background: #3f1d1d; color: #fca5a5; }

/* coverage-варианты */
.feed.venue { background: #14532d; color: #86efac; }   /* зелёный — с площадки */
.feed.tv    { background: #1e3a8a; color: #93c5fd; }   /* синий — ТВ */
.feed.plus  { box-shadow: inset 0 0 0 1px currentColor; } /* лёгкая обводка для "+" */

.country-filter {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #2a2f3a;
}
.country-filter label {
    display: block;
    font-size: 12px;
    color: #9aa3b2;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.country-select {
    width: 100%;
    padding: 8px 10px;
    background: #20242d;
    border: 1px solid #2a2f3a;
    border-radius: 6px;
    color: #cfd3da;
    font-size: 14px;
    cursor: pointer;
}
.country-select:hover { background: #2a3040; }
.country-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1115;
  z-index: 1000;
}
.login-screen.hidden { display: none; }

.login-card {
  width: 340px;
  background: #181b22;
  border: 1px solid #2a2f3a;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
}
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-hint { margin: 0 0 18px; color: #9aa3b2; font-size: 14px; }

#login-key {
  width: 100%;
  padding: 10px 12px;
  background: #20242d;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: #e6e8eb;
  font-size: 15px;
  margin-bottom: 10px;
}
#login-key:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
#login-btn {
  width: 100%;
  padding: 10px 12px;
  background: #3b82f6;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
#login-btn:hover { background: #2f6fd0; }
#login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-error {
  min-height: 20px;
  margin-top: 12px;
  color: #f87171;
  font-size: 13px;
}

.lang-switch {
    display: flex;
    gap: 4px;
    margin-left: auto;            /* прижать к правому краю шапки */
    padding-left: 20px;
    border-left: 1px solid #2a2f3a;
    align-self: stretch;
    align-items: center;
}

.lang-btn {
    min-width: 48px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2a2f3a;
    background: #20242d;
    color: #cfd3da;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0 10px;
    transition: 0.15s;
}
.lang-btn:hover {
    background: #2a3040;
    transform: translateY(-1px);
}
.lang-btn.active {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

/* На узких экранах — перенос */
@media (max-width: 700px) {
    .lang-switch {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
    }
    .sources {
        flex-wrap: wrap;
    }
}
