/* ============================================
   Jocoding — Global Stylesheet
   Breakpoints: 1068px (tablet), 735px (mobile)
   Units: px (Apple style)
   ============================================ */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif;
  background: #0f0f1a;
  color: #ffffff;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Navigation
   ============================================ */
nav {
  background: #0f0f1a;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid #333;
}
.nav-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
}
.nav-logo {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  opacity: 0.8;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.nav-links a:hover {
  opacity: 1;
}
.lang-selector {
  position: relative;
  cursor: pointer;
}
.lang-icon {
  font-size: 20px;
}
.lang-selector select {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 22px;
  padding-top: 56px;
  flex: 1;
  width: 100%;
}

/* ============================================
   Index — Hero
   ============================================ */
.hero-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 44px;
  background: #0b0c14;
  background-image:
    radial-gradient(at 30% 20%, rgba(255, 107, 157, 0.08) 0%, transparent 50%),
    radial-gradient(at 70% 80%, rgba(107, 157, 255, 0.08) 0%, transparent 50%);
}
.hero-content {
  text-align: center;
  padding: 0 22px;
}
.hero-content h1 {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.4;
  margin-bottom: 48px;
  background: linear-gradient(135deg, #ff6b9d, #c44dff, #6b9dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.btn-start {
  display: inline-block;
  padding: 90px 288px;
  font-size: 42px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}
.btn-start:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* ============================================
   Game Page
   ============================================ */
.game-header {
  text-align: center;
  padding: 2vh 0;
  position: relative;
}
.back-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid #333;
  color: #aaa;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.back-btn:hover {
  border-color: #c44dff;
  color: #fff;
}
.round-info {
  font-size: 14px;
  color: #888;
  margin-bottom: 2px;
}
.round-name {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.progress-bar {
  width: 100%;
  height: 4px;
  background: #1a1a2e;
  border-radius: 2px;
  margin: 1.5vh 0;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c44dff, #6b9dff);
  border-radius: 2px;
  transition: width 0.3s;
}

/* VS Layout */
.vs-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 2vh 0;
  min-height: calc(100vh - 10rem);
  min-height: calc(100dvh - 10rem);
}
.candidate {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 16px;
  padding: 16px 8px;
}
.candidate:hover {
  background: rgba(196, 77, 255, 0.1);
  transform: scale(1.03);
}
.candidate.selected {
  animation: selectPulse 0.5s ease;
}
.candidate.eliminated {
  opacity: 0.2;
  transform: scale(0.9);
  pointer-events: none;
}
@keyframes selectPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.candidate-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 16px;
  background: #1a1a2e;
  border: 2px solid #333;
  transition: border-color 0.3s;
}
.candidate:hover .candidate-img {
  border-color: #c44dff;
}
.candidate.selected .candidate-img {
  border-color: #c44dff;
  box-shadow: 0 0 20px rgba(196, 77, 255, 0.4);
}
.candidate-img-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a1a2e, #2a2a4e);
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  transition: border-color 0.3s;
}
.candidate:hover .candidate-img-placeholder {
  border-color: #c44dff;
}
.candidate.selected .candidate-img-placeholder {
  border-color: #c44dff;
  box-shadow: 0 0 20px rgba(196, 77, 255, 0.4);
}
.candidate-flag {
  font-size: 24px;
  margin-top: 1vh;
}
.candidate-name {
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
}
.candidate-country {
  font-size: 13px;
  color: #888;
}
.vs-text {
  font-size: 24px;
  font-weight: 800;
  color: #555;
}

/* ============================================
   Result Page
   ============================================ */
.result-container {
  text-align: center;
  padding: 3vh 0;
}
.trophy {
  font-size: 64px;
  margin-bottom: 1.5vh;
}
.result-title {
  font-size: 19px;
  color: #888;
  margin-bottom: 2.5vh;
}
.winner-card {
  background: #1a1a2e;
  border-radius: 24px;
  padding: 3vh 24px;
  margin-bottom: 2.5vh;
  border: 1px solid #333;
}
.winner-img {
  width: 200px;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1.5vh;
  border: 3px solid #c44dff;
  box-shadow: 0 0 30px rgba(196, 77, 255, 0.3);
}
.winner-img-placeholder {
  width: 200px;
  aspect-ratio: 3/4;
  border-radius: 16px;
  margin: 0 auto 1.5vh;
  background: linear-gradient(135deg, #1a1a2e, #2a2a4e);
  border: 3px solid #c44dff;
  box-shadow: 0 0 30px rgba(196, 77, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}
.winner-flag {
  font-size: 32px;
}
.winner-name {
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
}
.winner-country {
  font-size: 16px;
  color: #aaa;
  margin-top: 2px;
}
.winner-traits {
  font-size: 15px;
  color: #c44dff;
  margin-top: 1vh;
  font-style: italic;
}

/* ============================================
   Buttons
   ============================================ */
.action-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 3vh;
}
.btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-primary {
  background: linear-gradient(135deg, #c44dff, #6b9dff);
  color: #fff;
}
.btn-secondary {
  background: #1a1a2e;
  color: #fff;
  border: 1px solid #333;
}
.btn:hover {
  transform: scale(1.02);
}

/* ============================================
   Premium CTA
   ============================================ */
.premium-card {
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  border: 1px solid rgba(196, 77, 255, 0.2);
  border-radius: 20px;
  padding: 3vh 24px;
  margin-bottom: 3vh;
}
.premium-icon {
  font-size: 29px;
  margin-bottom: 8px;
}
.premium-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
.premium-desc {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 12px;
}
.premium-btn {
  display: inline-block;
  padding: 10px 28px;
  border: none;
  border-radius: 980px;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.premium-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(196, 77, 255, 0.3);
}

/* ============================================
   Ad Placeholder
   ============================================ */
.ad-slot {
  background: #1a1a2e;
  border: 1px dashed #333;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin: 2vh 0;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot p {
  font-size: 13px;
  color: #555;
}

/* ============================================
   Footer
   ============================================ */
footer {
  padding: 20px 0;
  background: #0f0f1a;
  border-top: 1px solid #1a1a2e;
}
.footer-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
  text-align: center;
  font-size: 13px;
  color: #555;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}
.footer-links a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #aaa;
}
.footer-links span {
  color: #555;
}

/* ============================================
   Toast
   ============================================ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #c44dff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.3s;
  z-index: 1000;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   Tablet (max-width: 1068px)
   ============================================ */
@media (max-width: 1068px) {
  .hero-content h1 {
    font-size: 45px;
  }
  .btn-start {
    padding: 70px 200px;
    font-size: 36px;
  }
  .round-name {
    font-size: 21px;
  }
  .vs-container {
    gap: 8px;
  }
  .candidate {
    padding: 11px 6px;
  }
  .candidate-img,
  .candidate-img-placeholder {
    border-radius: 14px;
  }
  .candidate-flag {
    font-size: 21px;
  }
  .candidate-name {
    font-size: 14px;
  }
  .candidate-country {
    font-size: 12px;
  }
  .vs-text {
    font-size: 20px;
  }
  .trophy {
    font-size: 51px;
  }
  .result-title {
    font-size: 18px;
  }
  .winner-img,
  .winner-img-placeholder {
    width: 160px;
  }
  .winner-name {
    font-size: 21px;
  }
  .winner-country {
    font-size: 14px;
  }
  .winner-traits {
    font-size: 14px;
  }
  .premium-title {
    font-size: 18px;
  }
  .premium-desc {
    font-size: 14px;
  }
  .premium-btn {
    font-size: 15px;
  }
}

/* ============================================
   Mobile (max-width: 735px)
   ============================================ */
@media (max-width: 735px) {
  .nav-links {
    gap: 16px;
  }
  .hero-content h1 {
    font-size: 32px;
  }
  .btn-start {
    padding: 50px 100px;
    font-size: 28px;
  }
  .round-name {
    font-size: 19px;
  }
  .vs-container {
    gap: 6px;
  }
  .candidate {
    padding: 6px 4px;
  }
  .candidate-img,
  .candidate-img-placeholder {
    border-radius: 12px;
  }
  .candidate-img-placeholder {
    font-size: 32px;
  }
  .candidate-flag {
    font-size: 18px;
  }
  .candidate-name {
    font-size: 13px;
  }
  .candidate-country {
    font-size: 11px;
  }
  .vs-text {
    font-size: 16px;
  }
  .trophy {
    font-size: 40px;
  }
  .result-title {
    font-size: 16px;
  }
  .winner-img,
  .winner-img-placeholder {
    width: 136px;
  }
  .winner-img-placeholder {
    font-size: 48px;
  }
  .winner-flag {
    font-size: 24px;
  }
  .winner-name {
    font-size: 19px;
  }
  .winner-country {
    font-size: 14px;
  }
  .winner-traits {
    font-size: 13px;
  }
  .btn {
    padding: 10px;
    font-size: 14px;
  }
  .premium-card {
    border-radius: 16px;
  }
  .premium-title {
    font-size: 16px;
  }
  .premium-desc {
    font-size: 13px;
  }
  .premium-btn {
    font-size: 14px;
  }
}
