:root {
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #2c3e50;
    --muted: #777;

    --primary: #2c3e50;
    --primary-hover: #1f2d3a;

    --border: #e0e0e0;
}
*, *::before, *::after {
    box-sizing: border-box;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #e5e7eb;
    --muted: #94a3b8;

    --primary: #334155;
    --primary-hover: #475569;

    --border: #334155;
}

body {
    font-family: system-ui, sans-serif;
    margin: 0;
    padding: 2rem;
    background: var(--bg);
    color: var(--text);
}
.app {
    max-width: 75vw;
    margin: 0 auto;
    min-height: 100vh;
    text-align: center;
    display: flex;
    flex-direction: column;
}

h1, h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text);
}
.subtitle,
.meta {
    color: var(--muted);
}

a {
    color: inherit;
}
.arbiter {
    color: var(--muted);
    font-size: 0.9rem;
}
.col-name,
.col-club,
.col-license {
    text-align: left;
}

.col-score,
.col-extra {
    text-align: right;
}

.col-place {
    text-align: center;
    font-weight: 600;
}
.tournament-link {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
/* ===== ACTIONS ===== */

.actions {
    display: grid;
    gap: 1.5rem;
    max-width: 480px;
    margin: 0 auto;
}

.action {
    display: block;
    padding: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
}
.action:hover {
    background: var(--primary-hover);
}

.hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #d0d0d0
}

/* ===== FORMS ===== */

.field {
    margin-bottom: 1.5rem;
}

label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.form {
    min-width: 50vw;
    margin: 0 auto 2rem auto;
    padding: 2rem;
    background: var(--card);
    border-radius: 2em;
}
.form-error {
    margin-top: 1rem;
    color: #ef4444;        /* czerwony, ale nie agresywny */
    font-size: 0.9rem;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 0.75rem 1rem;

    background: var(--bg);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 10px;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.35);
}


button {
    display: block;
    margin: 1.5rem auto 0 auto;
    padding: 0.7rem 2rem;
    font-size: 1rem;
    font-weight: 500;

    background: var(--primary);
    color: #fff;

    border: none;
    border-radius: 999px;
    cursor: pointer;
}

button:hover {
    background: var(--primary-hover);
}

/* ===== TABLE ===== */

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;

    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);

    padding: 0.75rem 1rem;
}
td {
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    color: var(--text);
}

.theme-toggle {
    position: absolute;
    top: 0;
    right: 0;

    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;

    font-size: 1rem;
}

.theme-toggle:hover {
    background: var(--card);
}
.logo {
    border-radius: 2em;
}
.statement {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}
@media (max-width: 768px) {

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    background: var(--card);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
  }

  td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border: none;
    font-size: 0.95rem;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .col-score {
    font-weight: 600;
  }

  .col-place {
    font-weight: 700;
  }
}

