* { box-sizing: border-box; }

:root{
  --bg: #0b0b12;
  --bg-soft: #11111a;
  --card: #151521;
  --card-2: #101018;
  --line: rgba(139, 92, 246, 0.24);
  --line-2: rgba(255,255,255,0.08);
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --primary-3: #c084fc;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #facc15;
  --orange: #fb923c;
  --text: #ffffff;
  --muted: #b7b1c9;
  --shadow: 0 14px 40px rgba(0,0,0,0.35);
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(124,58,237,0.20), transparent 30%),
    linear-gradient(180deg, #0b0b12 0%, #07070c 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,16,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 0 18px rgba(124,58,237,0.22);
  padding: 18px 12px 14px;
  text-align: center;
}

header img {
  height: 50px;
  max-width: 100%;
  margin-bottom: 12px;
}

.social-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-nav a {
  text-decoration: none;
  color: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  min-width: 110px;
  text-align: center;
  transition: .2s ease;
  border: 1px solid rgba(255,255,255,0.08);
}

.social-nav a:hover {
  transform: translateY(-1px);
  opacity: .95;
}

.whatsapp { background: #25D366; }
.telegram { background: #0088cc; }
.facebook { background: #3b5998; }
.daftar { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 14px 40px;
  overflow: visible;
}

h2 {
  text-align: center;
  margin: 4px 0 6px;
  font-size: 30px;
  letter-spacing: .4px;
}

.desc {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.panel {
  background: linear-gradient(180deg, rgba(124,58,237,0.06), rgba(255,255,255,0.01)), var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: visible;
  position: relative;
  z-index: 20;
}

.panel-body {
  padding: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.field {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.field label {
  display: block;
  font-size: 13px;
  color: #ddd6fe;
  margin-bottom: 6px;
  font-weight: 700;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--card-2);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: .2s ease;
}

input::placeholder {
  color: #8f88a6;
}

input:focus,
.custom-trigger:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.14);
}

button {
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: .2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.btn-add {
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #43ed3a, #43ed3a);
  color: #000;
  min-width: 110px;
  box-shadow: 0 8px 20px rgba(124,58,237,0.25);
}

.btn-remove {
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  min-width: 92px;
}

.summary-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.summary-box {
  flex: 1;
  min-width: 180px;
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.summary-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.10), transparent);
  transform: translateX(-120%);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-120%); }
  30% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

.summary-odds {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.summary-total {
  background: linear-gradient(135deg, #d8b4fe, #f3e8ff);
  color: #1f1136;
}

.status-text {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.slip {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: visible;
  position: relative;
  z-index: 1;
}

.slip::before,
.slip::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1px;
  border-top: 1px dashed rgba(255,255,255,0.10);
  pointer-events: none;
}

.slip::before {
  top: 58px;
}

.slip::after {
  bottom: 74px;
}

.slip-header {
  padding: 16px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slip-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .06em;
}

.slip-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(124,58,237,0.16);
  border: 1px solid #43ed3a;
  color: #43ed3a;
  font-size: 12px;
  font-weight: 700;
}

.matches {
  padding: 18px 14px 28px;
  display: grid;
  gap: 14px;
  overflow: visible;
  position: relative;
}

.match-card {
  background: linear-gradient(180deg, rgba(124,58,237,0.04), rgba(255,255,255,0.01)), #12121b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.match-card.open-select {
  z-index: 5000;
}

.match-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.match-name {
  font-size: 15px;
  font-weight: 800;
  color: #f5f3ff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-name::before {
  content: "🎟️";
  font-size: 14px;
}

.match-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  overflow: visible;
}

.custom-select {
  position: relative;
  width: 100%;
  z-index: 5;
}

.custom-select.active {
  z-index: 99999;
}

.custom-trigger {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--card-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  text-align: left;
}

.custom-trigger .arrow {
  margin-left: 10px;
  color: #ddd6fe;
  transition: .2s ease;
  flex-shrink: 0;
}

.custom-select.active .arrow {
  transform: rotate(180deg);
}

.custom-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #151522;
  border: 1px solid rgba(124,58,237,0.30);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.35);
  display: none;
  z-index: 999999;
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
}

.custom-select.active .custom-menu {
  display: block;
}

.custom-option {
  padding: 11px 13px;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  background: #151522;
  transition: .18s ease;
  user-select: none;
}

.custom-option:hover {
  background: rgba(124,58,237,0.20);
}

.custom-option.selected {
  background: var(--primary);
}

.slip-footer {
  padding: 14px 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}

.slip-note {
  color: var(--muted);
  font-size: 12px;
}

.slip-minbet {
  color: #e9d5ff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(124,58,237,0.14);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(124,58,237,0.20);
}

.dynamic-odds-label {
  color: var(--yellow) !important;
  text-shadow: 0 0 10px rgba(251, 146, 60, 0.18);
}

@media (max-width: 600px) {
  .toolbar,
  .match-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-box {
    min-width: 100%;
  }

  .social-nav a {
    flex: 1 1 45%;
  }

  .custom-menu {
    max-height: 220px;
  }
}