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

  html { font-size: 12px; overflow-x: hidden; }

  body {
    color: #e2e8f0;
    min-height: 100vh;
    padding: 2rem 1rem;
    overflow-x: hidden;
  }

  .container { max-width: 1100px;
    width: 95%;
    margin-top: 100px;
    margin-left: auto;
    margin-right: auto;
  }

  header {
    text-align: center;
    margin-bottom: 2rem;
  }
  header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: .3rem;
  }
  header p {
    color: #94a3b8;
    font-size: .9rem;
  }
  .badge {
    display: inline-block;
    background: #1e40af;
    color: #bfdbfe;
    font-size: .75rem;
    padding: .2rem .6rem;
    border-radius: 9999px;
    margin-top: .4rem;
  }

  .form-row {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 2rem;
  }
  .form-row input[type=number] {
    padding: .5rem .8rem;
    border-radius: .5rem;
    border: 1px solid #334155;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 1rem;
    width: 160px;
  }
  .form-row button {
    padding: .5rem 1.2rem;
    border-radius: .5rem;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s;
  }
  .form-row button:hover { background: #1d4ed8; }

  .category-title {
    font-size: 2rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #1e3a5f;
  }

  .grid {
    width: 100%;
    border-collapse: collapse;
    background: #1e293b;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 32px rgba(0,0,0,.4);
  }

  .grid thead tr {
    background: #0f2744;
    color: #7dd3fc;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
  }
  .grid th, .grid td {
    padding: .7rem .9rem;
    text-align: left;
  }
  .grid th { font-weight: 600; }

  .grid tbody tr {
    border-bottom: 1px solid #0f172a;
    transition: background .15s;
  }
  .grid tbody tr:hover { background: #263552; }
  .grid tbody tr:last-child { border-bottom: none; }

  /* Medal rows */
  .rank-1 { background: linear-gradient(90deg, rgba(251,191,36,.12) 0%, transparent 60%); }
  .rank-2 { background: linear-gradient(90deg, rgba(148,163,184,.1) 0%, transparent 60%); }
  .rank-3 { background: linear-gradient(90deg, rgba(180,83,9,.12) 0%, transparent 60%); }

  .pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem; height: 1.8rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
  }
  .pos-1 { background: #fbbf24; color: #1c1917; }
  .pos-2 { background: #94a3b8; color: #0f172a; }
  .pos-3 { background: #b45309; color: #fff8f0; }
  .pos-other { background: #1e3a5f; color: #7dd3fc; }

  .name { font-weight: 600; color: #5c5c5c;}
  .club { font-size: 1rem; color: #5c5c5c; margin-top: .15rem; }
  .nameTD { background-color: #d8edf8; border-radius: 7px; width: auto;}
  .rankTD { width:50px;}

  .score-block { text-align: right; }
  .score-main { font-weight: 600; font-size: 1.3rem; }
  .score-rank { font-size: 1.25rem; color: #cfcfcf; }

  .total-score {
    font-size: 1.35rem;
    font-weight: 700;
    color: #38bdf8;
    border: 1px solid;
    padding: 3px;
    border-radius: 4px;
  }

  /* Mini bar */
  .bar-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
  }
  .bar-bg {
    flex: 1;
    height: 6px;
    background: #0f172a;
    border-radius: 9999px;
    overflow: hidden;
  }
  .bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width .5s ease;
  }

  .note-badge {
    display: inline-block;
    background: #7c3aed;
    color: #ede9fe;
    font-size: .7rem;
    padding: .1rem .4rem;
    border-radius: .3rem;
    margin-left: .3rem;
  }

  .tens-nines { color: #acacac; font-size: 1.1rem; }

  /* Cut line */
  tr.cut-divider td {
    padding: 0;
    border: none;
  }
  .cut-line-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .45rem 1rem;
    background: #1e293b;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ef4444 40%, #ef4444 60%, transparent);
  }

  /* Rows below the cut — dimmed */
  tr.eliminated td { opacity: .5; }
  tr.eliminated:hover td { opacity: .75; }
  tr.eliminated .total-score { color: #cfcfcf; }
  tr.eliminated .bar-fill { background: linear-gradient(90deg, #475569, #cfcfcf); }

  .empty { text-align: center; padding: 3rem; color: #cfcfcf; font-size: 0.5em;}

  @media (max-width: 640px) {

    html { font-size: 11px }
    #navbar { font-size: 0.6em; }

    .hide-mobile { display: none; }
    .grid th, .grid td { padding: .5rem .6rem; font-size: .85rem; }
    .nameTD {width: auto;}

  }

/******************** other styles  */
.selectize-control {
    text-align: left;
    font-size: 0.7em !important;
}

.selectize-input{
    position: relative;
    width: 100%;
    padding-right: 50px !important;
    text-align: left;
    font-size: 0.6em !important;
    background-color: #ffffff75 !important;
    border-radius: 8px;
    color: white !important;
    font-weight: 400 !important;
    border: none;
}

.selectize-input > input {
    color: white !important;
    font-size: 0.6em !important;
    font-weight: 400 !important;
}

.selectize-control.single .selectize-input { height: auto;}
label {
    display: block;
    font-size: 0.6em;
    text-align: left;
}
#listContainer .item {
    border-bottom: 3px dotted #ffffff75;
}
#listContainer .item.header {
    border-bottom: 3px solid #ffffff75;
}