/* === RESET & BASE === */
:root {
  --primary: #4CAF50; /* Green */
  --primary-dark: #388E3C;
  --secondary: #1E88E5; /* Bright Blue */
  --secondary-dark: #1565C0;
  --accent: #FFCA28; /* Sunny Yellow */
  --accent-dark: #FFB300;
  --success: #66BB6A;
  --error: #E53935; /* Bright Red */
  --error-dark: #C62828;
  --text-dark: #2C3E50;
  --text-light: #607D8B;
  --bg-color: #F0F9FF; /* Soft Sky Blue */
  --card-bg: #FFFFFF;
  --border-radius: 20px;
  --border-radius-sm: 12px;
  --shadow: 0 10px 30px rgba(30, 136, 229, 0.15);
  --shadow-solid: 0 6px 0 rgba(0,0,0,0.1);
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--text-dark); }
.section-title { font-size: 2rem; margin-bottom: 0.5rem; color: var(--primary); }
.section-subtitle { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; }

/* Utilities */
.hidden { display: none !important; }
.w-100 { width: 100%; }
.mt-4 { margin-top: 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* === STATUS BANNER === */
.status-banner {
  background: var(--accent);
  color: var(--text-dark);
  text-align: center;
  padding: 1rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 100;
}
.status-banner.ended { background: var(--error); color: white; }

/* === HERO SECTION === */
.hero {
  position: relative;
  padding: 4rem 2rem;
  text-align: center;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 350px;
}
.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(rgba(255,255,255,0.2), rgba(240,249,255,1)), url('https://offertabs.s3.amazonaws.com/offer/oza6oa/site/media/69f8cb7368cf53.76604798.png');
  background-size: cover;
  background-position: center 30%;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 4px solid white;
}
.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--text-dark);
  padding: 0.4rem 1.2rem;
  border-radius: 99px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  box-shadow: 0 3px 0 var(--accent-dark);
}

.site-logo {
  max-width: 100%;
  width: 450px;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-dark);
  font-weight: 600;
}

/* === MAIN LAYOUT === */
.main-container {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
}
.tab-btn {
  background: white;
  border: 3px solid transparent;
  color: var(--primary); /* Updated to green */
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.tab-btn:hover {
  transform: translateY(-2px);
  color: var(--primary-dark);
}
.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 8px 0 var(--primary-dark), 0 15px 20px rgba(76, 175, 80, 0.3);
  transform: translateY(-4px);
}
.tab-btn.active:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--primary-dark);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 4px solid white;
}
.form-card { max-width: 700px; margin: 0 auto; }

/* Guidelines */
.guidelines-card { max-width: 700px; margin: 0 auto; }
.guidelines-header { text-align: center; margin-bottom: 2rem; }
.guidelines-list { list-style: none; margin: 0 auto 3rem; max-width: 550px; padding: 0; }
.guidelines-list li {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;
  font-size: 1.1rem; color: var(--text-dark); font-weight: 600;
  background: #F8FDFF; padding: 1rem 1.5rem;
  border-radius: var(--border-radius-sm); border: 2px solid #E1F5FE;
}
.gl-icon {
  background: var(--success); color: white;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.guidelines-action { text-align: center; }

/* === FORM STYLES === */
.form-row { display: flex; gap: 1.5rem; }
.form-row .form-group { flex: 1; }
.form-group { margin-bottom: 1.5rem; text-align: left; }
label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}
.req { color: var(--error); }
.opt { color: var(--text-light); font-weight: normal; font-size: 0.9em; margin-left: 0.25rem; font-family: var(--font-body); }

.input-field {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid #E0E0E0;
  border-radius: var(--border-radius-sm);
  background: #FAFAFA;
  transition: var(--transition);
  color: var(--text-dark);
}
.input-field:focus {
  outline: none;
  border-color: var(--secondary);
  background: white;
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1);
}
select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231E88E5' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 3rem;
}

/* File Upload Area */
.file-upload-wrapper { margin-bottom: 0.5rem; }
.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  border: 3px dashed #B0BEC5;
  border-radius: var(--border-radius);
  background: #F8FDFF;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.file-upload-label:hover {
  border-color: var(--secondary);
  background: #E1F5FE;
}
.upload-icon {
  color: var(--secondary);
  margin-bottom: 1rem;
  background: white;
  padding: 1rem;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.upload-text { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; color: var(--text-dark); }
.upload-hint { font-size: 0.9rem; color: var(--text-light); margin-top: 0.5rem; }

/* Image Preview */
#file-preview {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 5;
}
#file-preview.hidden { display: none !important; }
#preview-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  object-fit: contain;
}
#remove-file {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--error);
  color: white;
  border: 2px solid white;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: flex; align-items: center; justify-content: center;
}
#remove-file:hover { background: var(--error-dark); transform: scale(1.1); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 6px 0 var(--primary-dark), 0 15px 20px rgba(76, 175, 80, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--primary-dark), 0 15px 25px rgba(76, 175, 80, 0.4);
}
.btn-primary:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 var(--primary-dark);
}
.btn-secondary {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 0 var(--secondary-dark);
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--secondary-dark); }
.btn-secondary:active { transform: translateY(4px); box-shadow: 0 0 0 var(--secondary-dark); }
.btn-outline {
  background: transparent;
  color: var(--secondary);
  border: 3px solid var(--secondary);
}
.btn-outline:hover { background: var(--secondary); color: white; }
.btn-large { padding: 1.25rem 2rem; font-size: 1.3rem; }

.btn:disabled, .btn.disabled {
  opacity: 0.6; cursor: not-allowed; pointer-events: none;
  transform: translateY(6px); box-shadow: none !important;
}

/* Loader */
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}
.spinner-large {
  width: 40px; height: 40px;
  border: 4px solid rgba(30, 136, 229, 0.2);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Errors */
.error-msg { color: var(--error); font-size: 0.9rem; margin-top: 0.5rem; font-weight: 600; }
.error-box { background: #FFEBEE; border-left: 4px solid var(--error); color: var(--error-dark); padding: 1rem; border-radius: 4px; margin-bottom: 1.5rem; font-weight: 600; }

/* === SUCCESS / POST ENTRY === */
.success-card { text-align: center; }
.success-icon { font-size: 4rem; margin-bottom: 1rem; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.my-entry-preview {
  margin: 2rem auto;
  background: #FAFAFA;
  border: 2px solid #EEEEEE;
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  max-width: 400px;
}
.my-entry-preview img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.my-entry-details h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 400; color: var(--text-light); font-style: italic; }

.share-panel {
  background: #FFF8E1;
  border: 2px dashed var(--accent-dark);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-top: 2rem;
}
.share-link-wrapper {
  display: flex; gap: 0.5rem; margin: 1.5rem 0;
}
.share-link-wrapper input { background: white; flex: 1; margin: 0; }
.social-shares { display: flex; justify-content: center; gap: 1rem; }
.social-shares.compact { justify-content: flex-start; }
.btn-social {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  color: white; text-decoration: none; font-weight: 600;
  transition: var(--transition);
}
.btn-social:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.btn-social.fb { background: #1877F2; }
.btn-social.tw { background: #000000; }

.btn-icon-round {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; color: white; transition: var(--transition);
}
.btn-icon-round:hover { transform: scale(1.1); }
.btn-icon-round.copy { background: #607D8B; }
.btn-icon-round.fb { background: #1877F2; }
.btn-icon-round.tw { background: #000000; }

/* Responsive */
@media (max-width: 800px) {
  .hero { padding: 3rem 1.5rem; }
  .site-logo { width: 300px; }
  .tabs { gap: 0.5rem; }
  .tab-btn { padding: 0.75rem 1rem; font-size: 1rem; }
  .form-row { flex-direction: column; gap: 0; }
}

/* Powered by slot */
#wbx-powered-by-slot { margin-top: 3rem; width: 100%; }
