/* ========== CUSTOM PROPERTIES ========== */
:root {
  --color-primary: #d30000;
  --color-accent: #ffcc00;
  --color-dark: #1a1a1a;
  --color-light-bg: #f0f0f0;
  --color-text: #333;
  --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--color-light-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.App {
  min-height: 100vh;
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== GLOBAL WRAPPER ========== */
.global-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

.section {
  margin-top: 40px;
  margin-bottom: 40px;
}

/* ========== HEADER ========== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: white;
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 5px solid var(--color-accent);
  height: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-primary);
  font-family: 'Roboto', sans-serif;
}

.desktop-menu {
  display: flex;
  gap: 15px;
}

.menu-link {
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  transition: background-color 0.2s;
}

.menu-link:hover {
  background-color: #f0f0f0;
}

.logout-desktop {
  color: var(--color-primary) !important;
  font-weight: bold;
}

.mobile-menu-dropdown {
  position: relative;
  display: none;
}

.menu-toggle {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
  min-width: 180px;
  z-index: 101;
  padding: 8px 0;
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 20px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #f9f9f9;
}

.logout-mobile {
  color: var(--color-primary) !important;
  font-weight: 500;
}

@media (max-width: 768px) {
  .desktop-menu {
    display: none;
  }
  .mobile-menu-dropdown {
    display: block;
  }
}

@media (min-width: 769px) {
  .mobile-menu-dropdown {
    display: none;
  }
}

/* ========== ANNOUNCEMENT BAR ========== */
.announcement {
  background-color: var(--color-primary);
  color: white;
  height: 40px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 50px;
  z-index: 99;
  width: 100%;
  padding: 0 15px;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
}

.speaker-icon {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  flex-shrink: 0;
}

.speaker-icon path {
  fill: var(--color-accent);
}

.announcement-inner {
  width: 95%;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.announcement-text-wrapper {
  display: inline-block;
  white-space: nowrap;
  animation: slideLeft 15s linear infinite;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding-left: 100%;
  padding-right: 100%;
  padding-top: 13px;
}

@keyframes slideLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ========== MAIN CONTAINER ========== */
.container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px 0;
  margin: 0 auto;
  max-width: 1200px;
  justify-content: center;
}

/* ========== BANNER CAROUSEL ========== */
.banner {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  flex: 1;
  min-width: 300px;
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  animation: bannerFadeIn 0.6s ease-in-out;
}

@keyframes bannerFadeIn {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

.share-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background-color 0.2s;
}

.share-btn:hover {
  background-color: transparent;
}

.share-btn svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
}

/* Banner Dots */
.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background-color 0.2s;
}

.banner-dot.active {
  background-color: white;
}

.banner-dot:hover {
  background-color: white;
}

/* ========== LOGIN / PROFILE BOX ========== */
.login-box,
.profile-box {
  flex: 1;
  min-width: 280px;
  max-width: 425px;
  background-color: #e6e6e6;
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-light);
}

.login-title,
.profile-title {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  color: var(--color-text);
  font-family: 'Roboto', sans-serif;
}

.input-group {
  margin-bottom: 15px;
}

.input-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
}

.input-group input[readonly] {
  background-color: #f9f9f9;
  cursor: not-allowed;
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn,
.logout-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
  font-family: 'Roboto', sans-serif;
}

.register-link,
.password-link {
  text-align: center;
  font-size: 12px;
  color: var(--color-text);
  font-family: 'Roboto', sans-serif;
  margin-top: 10px;
}

.register-link a,
.password-link a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ========== ERROR MESSAGE ========== */
.error-message {
  background-color: #ffebee;
  color: #d32f2f;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
  border-left: 4px solid #d32f2f;
}

/* ========== DAFTAR PERTANDINGAN ========== */
.match-section {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 25px;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.5px;
  padding: 0 15px;
}

.match-grid {
  display: grid;
  gap: 20px;
  padding: 10px 0;
  justify-items: center;
}

/* Mobile: 1 kolom */
@media (max-width: 766px) {
  .match-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 767px) and (max-width: 768px) {
  .match-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Tablet: 2 kolom */
@media (min-width: 769px) and (max-width: 1024px) {
  .match-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop: auto-fit (3+ kolom) */
@media (min-width: 1025px) {
  .match-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.match-card {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(135deg, var(--color-dark), #333);
  border-radius: 12px;
  padding: 20px;
  color: #fff;
  box-shadow: var(--shadow-heavy);
  border: 1px solid #444;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.match-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.match-league-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.match-league {
  font-size: 12px;
  font-weight: bold;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.match-prize {
  font-size: 12px;
  font-weight: bold;
  color: var(--color-accent);
  background: rgba(255, 204, 0, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.match-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
}

.match-home,
.match-away {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
}

.match-home {
  text-align: right;
  padding-right: 10px;
}

.match-away {
  text-align: left;
  padding-left: 10px;
}

.match-vs {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-accent);
  margin: 0 10px;
}

.match-time {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  background: rgba(255, 204, 0, 0.2);
  padding: 8px;
  border-radius: 8px;
  color: var(--color-accent);
  letter-spacing: 0.5px;
}

.match-cta {
  text-align: center;
  margin-top: 15px;
  padding: 8px;
  background: rgba(211, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

/* ========== WINNERS & PROMO GRID ========== */
.winners-promo-section {
  max-width: 1200px;
  margin: 20px auto;
  /* padding: 0 20px; */
}

.winners-promo-grid {
  display: grid;
  gap: 20px;
}

/* Tampilkan 3 kolom di tablet & desktop */
@media (min-width: 769px) {
  .winners-promo-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Hanya 1 kolom di mobile, sembunyikan Promotion */
@media (max-width: 768px) {
  .winners-promo-grid {
    grid-template-columns: 1fr;
  }

  .promotion-section {
    display: none !important;
  }
}

/* Gaya header seragam */
.winner-header,
.lucky-spin-section .winner-header,
.promotion-section .winner-header {
  background: linear-gradient(135deg, var(--color-primary), #8b0000);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(211, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.winner-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--color-accent), #ff9800);
}

.winner-title {
  text-align: center;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 400;
  color: #fff;
  margin-bottom: 20px;
  font-family: 'Roboto', sans-serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
  padding: 0 15px;
}

.winner-list-container,
.promo-list-container {
  background: #fff;
  border-radius: 10px;
  padding: 5px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #ffe0e0;
}

.winner-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 15px;
  font-family: 'Roboto', sans-serif;
  color: var(--color-text);
  transition: background-color 0.2s;
}

.winner-item:hover {
  background-color: #fff9f9;
}

.winner-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.winner-rank {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #ff6b6b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.winner-username {
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.winner-match {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.winner-score {
  font-weight: bold;
  color: var(--color-primary);
}

.winner-date {
  font-size: 12px;
  color: #777;
  font-style: italic;
}

.winner-prize-badge {
  color: var(--color-primary);
  font-weight: bold;
  font-size: 16px;
  background: linear-gradient(135deg, #fff0f0, #ffe0e0);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #ffd0d0;
  white-space: nowrap;
  align-self: center;
}

/* ========== PROMO CAROUSEL ========== */
.promo-image-container {
  padding: 10px;
  text-align: center;
}

.promo-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
  object-fit: cover;
  max-width: 100%;
  animation: fadeIn 0.5s ease-in-out;
}

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.2s;
}

.promo-dot.active {
  background-color: var(--color-accent);
}

.promo-dot:hover {
  background-color: var(--color-accent);
}

/* Scrollbar */
.winner-list-container::-webkit-scrollbar,
.promo-list-container::-webkit-scrollbar {
  width: 6px;
}

.winner-list-container::-webkit-scrollbar-track,
.promo-list-container::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.winner-list-container::-webkit-scrollbar-thumb,
.promo-list-container::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 10px;
}

/* ========== INFORMATION SECTION ========== */
.info-section {
  margin-top: 40px;
  margin-bottom: 60px;
}

.info-box {
  background: linear-gradient(135deg, #fff, #f9f9f9);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.info-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 25px;
  font-family: 'Roboto', sans-serif;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
}

.info-list li {
  background: #fafafa;
  margin: 10px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  font-family: 'Roboto', sans-serif;
}

.info-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px dashed #ddd;
}

.info-footer p {
  margin-bottom: 20px;
  font-size: 15px;
  color: #555;
  font-family: 'Roboto', sans-serif;
}

.info-button {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(211, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'Roboto', sans-serif;
}

.info-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(211, 0, 0, 0.4);
}

/* ========== PROMO SECTION (bawah) ========== */
.promo-section {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 40px auto;
}

.welcome {
  background-color: var(--color-primary);
  color: white;
  padding: 20px;
  border-radius: 8px;
  flex: 1;
  min-width: 250px;
}

.welcome h2 {
  margin: 0 0 15px 0;
  font-size: 24px;
  font-family: 'Roboto', sans-serif;
}

.welcome p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-family: 'Roboto', sans-serif;
}

.promo-card {
  flex: 1 1 calc(25% - 10px);
  min-width: 200px;
  background-color: var(--color-primary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.promo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.promo-text {
  padding: 10px;
  text-align: center;
  font-size: 14px;
  color: white;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
}

/* Responsive Promo Cards */
@media (max-width: 768px) {
  .promo-section {
    flex-direction: column;
  }

  .promo-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .promo-card {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (min-width: 1025px) {
  .promo-card {
    flex: 1 1 calc(25% - 10px);
  }
}


/* ========== WATERMARK UNTUK PEMENANG ========== */
.winner-item {
  position: relative;
  /* Pastikan konten utama tetap di atas */
}

.winner-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 28px;
  font-weight: bold;
  color: rgba(211, 0, 0, 0.08); /* Merah transparan */
  pointer-events: none; /* Agar tidak mengganggu klik */
  z-index: 0;
  white-space: nowrap;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Roboto', sans-serif;
}

.winner-info {
  position: relative;
  z-index: 1; /* Pastikan teks utama di atas watermark */
}

.winner-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 28px;
  font-weight: bold;
  color: rgba(211, 0, 0, 0.08);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Roboto', sans-serif;
}

.winner-item {
  position: relative;
}

.winner-info {
  position: relative;
  z-index: 1;
}