a {
    text-decoration: none;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
}
h1, h2 {
    text-align: center;
}

.content {
    width: 90%;
    align-content: center;
    margin: auto;
}
table {
    border-collapse: collapse;
    width: 100%;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

th {
    background: linear-gradient(#0056b3, #520569);
    color: white;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.05em;
    padding: 12px;
    border-bottom: 2px solid #520569;
}

td {
    padding: 10px 14px;
    border-bottom: 1px solid #ddd;
    font-size: 15px;
    color: #333;
    text-align: center;
}

tr:nth-child(even) td {
    background-color: #f9f9f9;
}

tr:hover td {
    background-color: #eef4ff;
}

.flex-wrap {
    display: flex;
    /* width: 70%; */
    align-content: center;
    margin: auto;
    padding-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.results-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.match-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
}
.match-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}
.score-buttons, .bottom-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.score-buttons button,
.bottom-buttons button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 15px;
    cursor: pointer;
}
button {
    background: linear-gradient(#0056b3, #520569);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 15px;
    cursor: pointer;
}
  

.score-buttons button:hover,
.bottom-buttons button:hover {
    background: #0056b3;
}
.bottom-buttons .danger {
    background: #dc3545;
}
.bottom-buttons .danger:hover {
    background: #a71d2a;
}
.bottom-toggle {
    text-align: right;
    margin-bottom: 5px;
}
.danger {
    background: #dc3545;
}
.score-buttons .toggle-actions-btn {
    background: #363636;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0px 10px;
    font-size: 24px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
  }
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
  }
  .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }
  input:checked + .slider {
    background-color: #28a745;
  }
  input:checked + .slider:before {
    transform: translateX(22px);
  }
.danger {
    background-color: #dc3545;
}
.danger:hover {
    background-color: #a71d2a;
}
.active {
    font-weight: bold;
    background: #28a745 !important;
}
.toggle-container,
.view-pairings {
    width: 100%;
    text-align: center;
    margin-top: 30px;
}
.toggle-container button,
.view-pairings button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.toggle-container button.active-toggle {
    background-color: #28a745;
}
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
}
.modal h3 {
    margin-top: 0;
}
.dropped{
    text-decoration: line-through;
    opacity: .7;
}
.winner{
    color: #28a745;
}
.loser{
    color: rgb(43, 43, 43);
}
.draw{
    color: rgb(119, 119, 119);
}
.hidden {
    display: none !important;
}
.toggle-container button.active-toggle {
    background: #28a745;
}


/* css from tournaments */
body {
    font-family: Arial, sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 20px;
}

h1 {
    text-align: center;
}

button {margin: 2px;}

.tournament-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.tournament-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 330px;
    box-sizing: border-box;
    transition: transform 0.2s;
    cursor: pointer;
}


.tournament-card:hover {
    transform: translateY(-3px);
}

.tournament-card h3 {
    margin: 0 0 10px;
}

.tournament-card p {
    margin: 5px 0;
    color: #555;
}

.add-button {
    display: block;
    margin: 20px auto;
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.add-button:hover {
    background: #0056b3;
}

/* Modal Styling */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay.show {
    display: flex;
}
/* Modal overlay stays fixed and allows internal scrolling */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;               /* breathing room on small screens */
  overflow: auto;              /* overlay can scroll if needed */
  z-index: 9999;
}

/* Modal itself scrolls internally */
.modal {
  width: min(900px, 100%);
  max-height: calc(100vh - 32px); /* leaves room for overlay padding */
  overflow: auto;                 /* <-- this is the important part */
}

/* Optional: keep action buttons visible while scrolling */
.modal .modal-actions {
  position: sticky;
  bottom: 0;
  background: inherit;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.15);
}

.modal-overlay.show {
    display: flex;
}
.modal {
    background: white;
    border-radius: 10px;
    padding: 30px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.modal h2 {
    margin-top: 0;
}

.modal input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    font-size: 16px;
}

.game-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.game-buttons button {
    flex: 1 1 45%;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    background: #696969;
    border: none;
    border-radius: 6px;
}

.game-buttons button.selected {
    background-color: #28a745;
    color: white;
    font-weight: bold;
}

.modal-actions {
    text-align: right;
    margin-top: 20px;
}

.modal-actions button {
    padding: 8px 16px;
    font-size: 14px;
    margin-left: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.modal-actions .submit-btn {
    background-color: #007bff;
    color: white;
    border: none;
}

.modal-actions .cancel-btn {
    background-color: #ccc;
    border: none;
}

.modal-actions .submit-btn:hover {
    background-color: #0056b3;
}

.modal-actions .cancel-btn:hover {
    background-color: #999;
}
.new-card {
    background-color: #e0f7fa;
    border: 2px dashed #007bff;
    color: #007bff;
    cursor: pointer;
    transition: background 0.3s;
}
.new-card:hover {
    background-color: #b2ebf2;
}
.headers{
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Main style */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f0f5;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
header {
  background-color: #222;
  color: #fff;
  position: relative;            /* anchor absolute children like user panel */
  min-height: 64px;              /* prevents overlap on small headers */
  box-sizing: border-box;
}

@media (max-width: 720px) {
  header {
    padding-right: 16px;         /* don't reserve space on mobile */
  }
}
.user-panel-wrapper {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 9999;
  min-width: 220px;              /* your dropdown is effectively this anyway */
}
footer {
    bottom: 0px;
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
}
.nav-links {
     margin-top: 10px;
}
.nav-links a {
    margin: 0 1rem;
    color: #00bcd4;
    text-decoration: none;
    font-weight: bold;
}

.feature-slot-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .feature-slot {
    flex: 1;
    min-width: 180px;
    min-height: 120px;
    padding: 8px;
    border: 2px solid #ccc;
    opacity: 0.5;
    background-color: rgba(0, 0, 0, 0.03);
    transition: opacity 0.3s ease;
  }
  
  .feature-slot .slot-title {
    font-weight: bold;
    margin-bottom: 6px;
    text-align: center;
    text-transform: uppercase;
  }
  
  .feature-buttons {
    display: inline-flex;
    gap: 3px;
    margin-left: 8px;
  }
  
  .feature-btn {
    width: 16px !important;
    height: 16px !important;
    border-radius: 4px; /* Rounded corners */
    background-color: transparent;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
  }
  
  .feature-btn.active {
    opacity: 1;
    border: 2px solid #333;
    transform: scale(1.1);
  }
  
  /* Actual color fills */
  .color-blue   { background: #1e90ff !important; border: 2px solid #1e90ff;}
  .color-red    { background: #e63946 !important; border: 2px solid #e63946;}
  .color-green  { background: #2a9d8f !important; border: 2px solid #2a9d8f;}
  .color-black { background: #9d4edd !important; border: 2px solid #9d4edd;}
  .color-white { background: #c9b037 !important; border: 2px solid #c9b037;}

  .feature-slots {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .feature-slot {
    flex: 1;
    min-height: 150px;
    border-radius: 6px;
    border: 2px dashed #ccc;
    padding: 10px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
  }
  
  .feature-slot.filled {
    opacity: 1;
  }

  .feature-slot .match-card {
    border: none;
    background: transparent;
    padding: 0;
  }
  
  .feature-slot .placeholder {
    text-align: center;
    font-style: italic;
    color: #999;
  }
  
  .feature-slot.slot-blue   { background-color: rgba(30, 144, 255, 0.1); }
  .feature-slot.slot-red    { background-color: rgba(230, 57, 70, 0.1); }
  .feature-slot.slot-green  { background-color: rgba(42, 157, 143, 0.1); }
  .feature-slot.slot-black { background-color: rgba(157, 78, 221, 0.1); }
  .feature-slot.slot-white { background-color: rgba(201, 176, 55, 0.12); }
  .feature-slot.slot-blue2   { background-color: rgba(30, 144, 255, 0.1); }
  .feature-slot.slot-red2    { background-color: rgba(230, 57, 70, 0.1); }
  .feature-slot.slot-green2  { background-color: rgba(42, 157, 143, 0.1); }
  .feature-slot.slot-black2 { background-color: rgba(157, 78, 221, 0.1); }
  .feature-slot.slot-white2 { background-color: rgba(201, 176, 55, 0.12); }
  
  .feature-slot.filled {
    border-style: solid;
    opacity: 1;
  }
  
  .language-flag img,
  .client-flag img {
    height: 20px;
    width: auto;
    margin-right: 4px;
    vertical-align: middle;
    border-radius: 1px
  }
  
  .client-flag img.small {
    height: 16px;
    opacity: 0.7;;
  }
  
  .feed-quality {
    font-weight: bold;
    color: #555;
    margin-left: 8px;
  }
  
  .match-card .swap-btn {
    padding: 4px 10px;
  }
  
  .high-quality {
    color:green;
  }
  .medium-quality {
    color: rgb(253, 114, 0);
  }
  .low-quality {
    color:red;
  }
  .no-quality {
    color:rgb(107, 0, 0);
  }

  body {
  font-family: Arial, sans-serif;
  background: #f0f2f5;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}
/* Photo modal overlay */
.photo-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.photo-modal.is-open{
  display: block;
}

.photo-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}

.photo-modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0,0,0,.42);
  padding: 14px;
}

.photo-modal__close{
  position: sticky;
  top: 0;
  float: right;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.photo-modal__figure{
  margin: 0;
  padding-top: 10px;
}

.photo-modal__img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.photo-modal__cap{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
