:root {
  --primary: #E53935; /* bright red */
  --secondary: #4CAF50; /* vibrant green */
  --accent: #FFCA28; /* sunny yellow */
  --text-main: #333333;
  --text-light: #666666;
  --bg-color: #F9F9F9;
  --card-bg: #FFFFFF;
  --font-head: 'Fredoka One', cursive;
  --font-body: 'Nunito', sans-serif;
  --radius: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 202, 40, 0.15) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(76, 175, 80, 0.15) 0%, transparent 40%);
  background-attachment: fixed;
}

.hidden {
  display: none !important;
}

#app-container, #status-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.75rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
}

.hero-section {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid rgba(0,0,0,0.05);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.hero-text {
  padding: 2.5rem;
}

.hero-text h1 {
  font-family: var(--font-head);
  font-size: 2.5rem;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.15rem;
  color: var(--text-light);
}

.form-section {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
}

.form-section h2 {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.form-section p {
  margin-bottom: 2rem;
  color: var(--text-light);
  font-size: 1.1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid #eaeaea;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: #fdfdfd;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 202, 40, 0.2);
}

.btn-primary, .btn-secondary {
  font-family: var(--font-head);
  font-size: 1.15rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.25);
  margin-top: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(229, 57, 53, 0.35);
  background-color: #D32F2F;
}

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

.error {
  color: #D32F2F;
  background: #FFEBEE;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  border-left: 4px solid #D32F2F;
  font-size: 0.95rem;
}

/* Spinner */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Result State */
#result-state {
  text-align: center;
  padding: 1rem 0;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.share-box {
  margin-top: 2rem;
  background: rgba(255, 202, 40, 0.1);
  border: 2px dashed var(--accent);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: left;
}

.share-box h3 {
  font-family: var(--font-head);
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.share-box p {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.share-input-group {
  display: flex;
  gap: 0.5rem;
}

.share-input-group input {
  flex: 1;
  background: #fff;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  font-family: var(--font-body);
}

.btn-secondary {
  width: auto;
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.25);
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
}

.btn-secondary:hover {
  background: #388E3C;
  transform: translateY(-2px);
}

.social-shares {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-btn {
  flex: 1;
  text-decoration: none;
  color: white;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  transition: opacity 0.2s, transform 0.2s;
  display: block;
}

.social-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.social-btn.fb { background: #1877F2; }
.social-btn.tw { background: #000000; }

/* Status Container */
#status-container {
  align-items: center;
  justify-content: center;
}

.status-card {
  background: #fff;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.status-card h1 {
  font-family: var(--font-head);
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.status-card p {
  font-size: 1.15rem;
  color: var(--text-light);
}

#countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.countdown-block {
  background: var(--secondary);
  color: #fff;
  padding: 1.25rem 1rem;
  border-radius: 16px;
  min-width: 90px;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.countdown-block span {
  display: block;
  font-family: var(--font-head);
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.countdown-block label {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#wbx-powered-by-slot {
  margin-top: 2.5rem;
  text-align: center;
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .hero-section {
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }
  .hero-text, .form-section {
    padding: 2rem 1.5rem;
  }
  .social-shares {
    flex-direction: column;
    gap: 0.5rem;
  }
}
