/* CSS Reset and Base Variables */
body {
  background: #0f1115;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(194, 19, 21, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(15, 100, 205, 0.08) 0%, transparent 50%);
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

* {
  box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
}

/* Layout */
.main-content {
  flex-grow: 1;
  padding-bottom: 60px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 20px 140px;
  background-size: cover;
  background-position: center;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(11, 14, 20, 0.5) 0%, rgba(11, 14, 20, 1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 20px;
  text-transform: uppercase;
}

.hero h1 span {
  background: linear-gradient(135deg, #C21315, #0F64CD);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Form Container */
.form-container {
  background: rgba(30, 30, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  margin-top: -80px;
  position: relative;
  z-index: 10;
}

/* Rules Box */
.rules-box {
  background: rgba(194, 19, 21, 0.05);
  border-left: 4px solid #C21315;
  padding: 20px 25px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 40px;
  text-align: left;
}

.rules-box h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 10px;
  margin-top: 20px;
}

.rules-box h3:first-child {
  margin-top: 0;
}

.rules-box p, .rules-box ul {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0 0 10px;
}

.rules-box ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.rules-box li {
  margin-bottom: 5px;
}

/* Countdown */
.countdown-wrapper {
  text-align: center;
  margin-bottom: 35px;
}

.match-date-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(15, 100, 205, 0.2);
  border: 1px solid rgba(15, 100, 205, 0.4);
  border-radius: 99px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.countdown-label {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 15px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.time-block .num {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.time-block .unit {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

/* Match Card */
.match-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.team .flag {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team .flag img {
  height: 100%;
  width: auto;
  max-width: 100px;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  object-fit: cover;
}

.team .name {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.divider {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
}

/* Score Inputs */
.score-input {
  width: 80px;
  height: 80px;
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.3s ease;
}

.score-input:focus {
  outline: none;
  border-color: #0F64CD;
  box-shadow: 0 0 15px rgba(15, 100, 205, 0.5);
  background: rgba(0, 0, 0, 0.5);
}

/* Hide spin buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Form Inputs */
.input-row {
  display: flex;
  gap: 20px;
}

.input-row .input-group {
  flex: 1;
}

.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  border-color: #0F64CD;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(15, 100, 205, 0.2);
}

/* Buttons */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #C21315, #E53935);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(194, 19, 21, 0.4);
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(194, 19, 21, 0.6);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* States & Error */
.error-message {
  background: rgba(220, 38, 38, 0.1);
  color: #ef4444;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  margin-bottom: 20px;
  font-weight: 500;
  text-align: center;
}

.text-center {
  text-align: center;
}

.state-section {
  padding: 40px 20px;
}

.state-section h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: #fff;
}

.state-section p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 25px;
}

.icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  font-size: 40px;
  line-height: 80px;
  border-radius: 50%;
  margin: 0 auto 25px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.ty-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 16px;
  margin-bottom: 30px;
}

.ty-card p {
  margin-bottom: 10px;
}

.ty-card p:last-child {
  margin-bottom: 0;
}

.small-text {
  font-size: 0.9rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

#wbx-powered-by-slot {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 30px;
  display: flex;
  justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 60px 20px 100px;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .form-container {
    padding: 25px;
    margin-top: -40px;
    border-radius: 20px;
  }
}

@media (max-width: 600px) {
  .input-row {
    flex-direction: column;
    gap: 0;
  }
  .match-card {
    flex-direction: column;
    padding: 30px 20px;
  }
  .divider {
    transform: rotate(90deg);
    margin: 10px 0;
  }
  .team {
    width: 100%;
  }
}