/* =========================================
   TURNIERE PAGE
   ========================================= */

.turniere-hero {
  padding: 40px 20px;
  text-align: center;
  background: radial-gradient(circle at 50% -20%, rgba(48,159,106,0.06) 0%, transparent 60%), #0a0a0f;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.turniere-hero h2 {
  color: #fff;
  font-size: 2.5rem;
  margin: 0;
  letter-spacing: 0;
  font-weight: 700;
}
.turniere-hero p {
  color:#aaa;
  font-size:1.1rem;
  margin-top:10px;
  letter-spacing:1px;
}

.turniere-wrap{
  max-width: 900px;
  margin: 20px auto;
  padding: 0 20px;
  min-height: 50vh;
}

.turniere-top-actions{
  text-align: right;
  margin-bottom: 30px;
}

/* Event cards */
.event-card {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 25px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
}
.event-card:hover {
  transform: translateY(-3px);
  border-color: rgba(48,159,106,0.4);
  box-shadow: var(--shadow-sm);
}
.event-card.past-event { opacity: .85; filter: grayscale(20%); }
.event-card.past-event:hover { opacity: 1; filter: none; border-color: rgba(255,255,255,0.1); }

.event-image-wrap {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.event-image-wrap img { width:100%; height:100%; object-fit:cover; transition: transform .4s ease; }
.event-image-wrap:hover img { transform: scale(1.1); }

.event-image-wrap.placeholder {
  background: rgba(255,255,255,0.02);
  display:flex; align-items:center; justify-content:center;
  font-size:3rem;
  border: 1px dashed rgba(255,255,255,0.1);
  cursor: default;
}

.zoom-icon {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  display:flex; align-items:center; justify-content:center;
  font-size:1.8rem;
  opacity:0;
  transition: opacity .3s;
}
.event-image-wrap:hover .zoom-icon { opacity: 1; }

.e-content { flex:1; min-width:150px; }
.e-date-badge {
  display:inline-block;
  background: rgba(48,159,106,0.15);
  color: var(--dart-green);
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
  border: 1px solid rgba(48,159,106,0.3);
}
.e-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #fff;
  letter-spacing: .5px;
}
.e-desc {
  color:#aaa;
  font-size:.95rem;
  line-height:1.5;
  margin:0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.e-chip-external{
  display:inline-block;
  margin-top:8px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.1);
  color:#aaa;
  padding:4px 10px;
  border-radius:4px;
  font-size:.75rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:1px;
}

.e-actions {
  display:flex; gap:10px; flex-wrap:wrap;
  align-items:center; justify-content:flex-end;
  flex-shrink:0;
}

.btn-tourney {
  background: var(--dart-red);
  color:#fff;
  padding:12px 25px;
  border-radius:8px;
  font-weight:600;
  letter-spacing:1px;
  text-decoration:none;
  border:1px solid #c72529;
  box-shadow: none;
  transition: all .3s ease;
}
.btn-tourney:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-icon {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color:#ccc;
  padding:10px;
  font-size:1.1rem;
  border-radius:6px;
  cursor:pointer;
  transition: all .2s;
}
.btn-icon:hover { background: rgba(255,255,255,0.1); color:#fff; transform: translateY(-2px); }
.btn-icon.del:hover { color: var(--dart-red); border-color: rgba(227,41,46,0.3); background: rgba(227,41,46,0.1); }

.section-title {
  font-size:1.4rem;
  color:#fff;
  margin:40px 0 20px 0;
  letter-spacing:1px;
  display:flex; align-items:center; gap:15px;
  font-weight:700;
}
.section-title::after {
  content:'';
  flex:1; height:1px;
  background: linear-gradient(to right, rgba(255,255,255,0.1), transparent);
}

.empty-events {
  text-align:center;
  padding:40px;
  background: rgba(255,255,255,0.02);
  border-radius:12px;
  border:1px dashed #333;
}
.empty-events p{ color:#888; font-size:1.1rem; margin:0; }

/* Modal */
.modal-overlay {
  display:none; position:fixed; inset:0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(5px);
  z-index:10000;
  justify-content:center; align-items:center;
  padding:10px;
}
.modal-box {
  background:#111;
  border:1px solid rgba(255,255,255,0.1);
  border-top:3px solid var(--dart-green);
  border-radius:12px;
  padding:25px;
  width:100%; max-width:500px;
  max-height:85vh;
  overflow-y:auto;
  box-sizing:border-box;
  box-shadow: var(--shadow-md);
}
.modal-box h3{
  color:#fff; margin-top:0; font-size:1.5rem;
}
.modal-box label {
  font-size:.85rem;
  margin-top:15px;
  margin-bottom:5px;
  display:block;
  color:#aaa;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:1px;
}
.modal-box input[type="text"],
.modal-box input[type="datetime-local"],
.modal-box textarea,
.modal-box input[type="file"]{
  box-sizing:border-box;
  width:100%;
  padding:12px;
  font-size:1rem;
  background:#0a0a0f;
  border:1px solid #333;
  border-radius:6px;
  color:#fff;
}
.modal-box input[type="datetime-local"]{ color-scheme: dark; }
.modal-box input:focus, .modal-box textarea:focus{
  border-color: var(--dart-green);
  outline:none;
}

.modal-check-wrap{
  display:flex; align-items:center; gap:12px;
  background:rgba(255,255,255,0.02);
  padding:15px; border-radius:6px;
  border:1px solid rgba(255,255,255,0.05);
  margin-top:20px; cursor:pointer;
  text-transform:none; font-weight:normal;
}
.modal-check-wrap input[type="checkbox"]{
  width:20px; height:20px; margin:0;
}
.modal-check-wrap .t1{
  color:#fff; font-size:1rem; font-weight:500;
}
.modal-check-wrap .t2{
  color:#888; font-weight:normal; font-size:.85rem; display:block;
}

.modal-actions{
  display:flex; gap:10px; margin-top:25px;
}
.modal-actions .btn{ padding:12px; }
.modal-actions .btn.main{ flex:2; }
.modal-actions .btn.alt{
  flex:1;
  background:#333;
  border-color:#444;
}

/* Single image lightbox */
#singleLightbox {
  display:none; position:fixed; z-index:10001; inset:0;
  background-color: rgba(0,0,0,0.95);
  backdrop-filter: blur(10px);
}
#singleLightbox img {
  max-width:90vw; max-height:85vh;
  position:absolute; top:50%; left:50%;
  transform: translate(-50%, -50%);
  border-radius:8px;
  box-shadow: var(--shadow-md);
}
.sl-close {
  position:absolute; top:20px; right:30px;
  color:#fff; font-size:40px; font-weight:300;
  cursor:pointer; transition:color .3s;
}
.sl-close:hover { color:var(--dart-red); }

/* =========================
   LIGHT MODE
   ========================= */
html[data-theme="light"] .turniere-hero{
  background: radial-gradient(circle at 50% -20%, rgba(48,159,106,0.06) 0%, transparent 60%), #f6f9ff;
  border-bottom: 1px solid #d8e3f2;
}
html[data-theme="light"] .turniere-hero h2{
  color:#0f172a;
  text-shadow:none;
}
html[data-theme="light"] .turniere-hero p{ color:#64748b; }

html[data-theme="light"] .event-card{
  background:#fff;
  border:1px solid #d6e1ef;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}
html[data-theme="light"] .event-card:hover{
  border-color:#9bc8ae;
  box-shadow: 0 14px 30px rgba(15,23,42,.12);
}
html[data-theme="light"] .event-card.past-event{
  opacity:.92;
  filter:none;
}
html[data-theme="light"] .event-image-wrap{
  border-color:#cfdced;
  box-shadow:0 5px 15px rgba(15,23,42,.12);
}
html[data-theme="light"] .event-image-wrap.placeholder{
  background:#f4f8ff;
  border-color:#d6e1ef;
}
html[data-theme="light"] .zoom-icon{ background: rgba(15,23,42,.45); }

html[data-theme="light"] .e-date-badge{
  background:#e8f7ef;
  border-color:#8ac6a6;
  color:#14532d;
}
html[data-theme="light"] .e-title{ color:#0f172a; }
html[data-theme="light"] .e-desc{ color:#475569; }
html[data-theme="light"] .e-chip-external{
  background:#eef3fb;
  border-color:#c9d6ea;
  color:#475569;
}

html[data-theme="light"] .btn-icon{
  background:#f8fbff;
  border-color:#cfdced;
  color:#334155;
}
html[data-theme="light"] .btn-icon:hover{
  background:#eef4fd;
  border-color:#b8cbe3;
  color:#0f172a;
}
html[data-theme="light"] .btn-icon.del:hover{
  background:#fff1f2;
  border-color:#fca5a5;
  color:#b91c1c;
}

html[data-theme="light"] .section-title{ color:#0f172a; }
html[data-theme="light"] .section-title::after{
  background: linear-gradient(to right, rgba(15,23,42,.18), transparent);
}

html[data-theme="light"] .empty-events{
  background:#f8fbff;
  border-color:#d6e1ef;
}
html[data-theme="light"] .empty-events p{ color:#64748b; }

/* modal light */
html[data-theme="light"] .modal-overlay{
  background: rgba(15,23,42,.55);
}
html[data-theme="light"] .modal-box{
  background:#fff;
  border-color:#d6e1ef;
  box-shadow: 0 20px 45px rgba(15,23,42,.20);
}
html[data-theme="light"] .modal-box h3{ color:#0f172a; }
html[data-theme="light"] .modal-box label{ color:#475569; }
html[data-theme="light"] .modal-box input[type="text"],
html[data-theme="light"] .modal-box input[type="datetime-local"],
html[data-theme="light"] .modal-box textarea,
html[data-theme="light"] .modal-box input[type="file"]{
  background:#f8fbff;
  border-color:#cfdced;
  color:#0f172a;
}
html[data-theme="light"] .modal-box input[type="datetime-local"]{ color-scheme: light; }
html[data-theme="light"] .modal-check-wrap{
  background:#f8fbff;
  border-color:#d6e1ef;
}
html[data-theme="light"] .modal-check-wrap .t1{ color:#0f172a; }
html[data-theme="light"] .modal-check-wrap .t2{ color:#64748b; }

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  .turniere-hero h2 { font-size: 2rem; }

  .turniere-wrap{
    padding: 0 12px;
  }

  .event-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 15px;
    padding: 25px 15px;
  }
  .event-image-wrap {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 50%;
  }
  .e-actions {
    justify-content: center;
    margin-top: 10px;
  }
  .btn-tourney {
    width: 100%;
    box-sizing: border-box;
  }

  .modal-actions{
    flex-direction: column;
  }
}