/* ============================================
   assets/style.css - Complete Stylesheet
============================================ */

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  min-height: 100vh;
  color: #222;
}

/* ===== FRONTEND STYLES (Main Giveaway Page) ===== */

body:not(.admin-login-page):not(.admin-dashboard) {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
  overflow-x: hidden;
  background: linear-gradient(180deg, #b8f3ff 0%, #e9fff3 55%, #fff6de 100%);
  position: relative;
}

/* Clouds Animation */
.cloud {
  position: absolute;
  width: 180px;
  height: 70px;
  background: #fff;
  border-radius: 50px;
  top: 70px;
  opacity: 0.9;
  animation: floatCloud 20s linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  top: -35px;
  left: 20px;
}

.cloud::after {
  width: 110px;
  height: 110px;
  left: 70px;
  top: -55px;
}

.cloud.one {
  left: -220px;
  top: 70px;
  animation-duration: 22s;
}

.cloud.two {
  left: -260px;
  top: 160px;
  transform: scale(0.85);
  animation-duration: 26s;
  opacity: 0.75;
}

.cloud.three {
  left: -300px;
  top: 260px;
  transform: scale(0.65);
  animation-duration: 32s;
  opacity: 0.6;
}

@keyframes floatCloud {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(140vw);
  }
}

/* Sparkles */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  animation: sparkle 2.5s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes sparkle {
  0%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Main Wrapper */
.wrap {
  width: 100%;
  max-width: 1000px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  border: 2px solid rgba(255, 196, 0, 0.35);
}

/* Header */
header {
  padding: 28px 18px;
  text-align: center;
  background: linear-gradient(135deg, #ffdd57, #ff9f1c);
  color: #111;
  position: relative;
}

header h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.35);
}

header p {
  font-size: 15px;
  opacity: 0.95;
  max-width: 760px;
  margin: 0 auto;
}

.badge-row {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  background: rgba(255, 255, 255, 0.55);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  font-size: 13px;
}

.farm-strip {
  height: 10px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 159, 28, 0.55),
    rgba(255, 159, 28, 0.55) 12px,
    rgba(255, 221, 87, 0.55) 12px,
    rgba(255, 221, 87, 0.55) 24px
  );
}

/* Content Section */
.content {
  padding: 22px 18px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .content {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
  padding: 18px;
}

.card h2 {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.riddle-box {
  background: #f7fbff;
  border: 1px solid #dfefff;
  padding: 16px;
  border-radius: 14px;
  line-height: 1.75;
  font-size: 15px;
}

/* Buttons */
button,
a.btn {
  border: none;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  transition: 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
}

button:hover,
a.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: #ff9f1c;
  color: #111;
}

.btn-dark {
  background: #1f2937;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid #ff9f1c;
  color: #ff9f1c;
}

/* Timer */
.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.tbox {
  background: #fff7df;
  border: 1px solid rgba(255, 159, 28, 0.35);
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
}

.tbox .num {
  font-size: 24px;
  font-weight: 900;
}

.tbox .lbl {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
  font-weight: 700;
}

/* Form */
.form-row {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
  transition: 0.15s ease;
  background: #fff;
}

input:focus {
  border-color: #ff9f1c;
  box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.18);
}

.status {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #f0f7ff;
  border: 1px solid #cfe6ff;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
  color: #0b2c52;
  display: none;
}

.locked-note {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #fff3f3;
  border: 1px solid #ffd0d0;
  font-size: 13px;
  font-weight: 800;
  color: #7a1111;
}

.tagBox {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.tagCode {
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-weight: 900;
  letter-spacing: 0.8px;
}

footer {
  padding: 16px 18px;
  text-align: center;
  font-size: 13px;
  opacity: 0.75;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Admin Link */
.admin-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
  transition: 0.3s ease;
  z-index: 1000;
}

.admin-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.5);
}


/* ===== ADMIN PANEL STYLES ===== */

/* Admin Login Page */
.admin-login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 450px;
}

.login-box {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.icon-circle {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #ff9f1c, #ffdd57);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}

.login-header h1 {
  font-size: 28px;
  font-weight: 900;
  color: #1f2937;
  margin-bottom: 8px;
}

.login-header p {
  color: #6b7280;
  font-weight: 600;
}

.alert {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 14px;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.login-form {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: #374151;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: #ff9f1c;
  box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.1);
  outline: none;
}

.form-group small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.login-form .btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 10px;
}

.login-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.login-footer a {
  color: #ff9f1c;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}

.login-footer a:hover {
  text-decoration: underline;
}


/* Admin Dashboard */
.admin-dashboard {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  min-height: 100vh;
}

.dashboard-header {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-bottom: 4px solid #ff9f1c;
  position: sticky;
  top: 0;
  z-index: 100;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  flex-wrap: wrap;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left .icon-circle {
  width: 48px;
  height: 48px;
  font-size: 24px;
  margin: 0;
}

.header-left h1 {
  font-size: 24px;
  font-weight: 900;
  color: #1f2937;
  margin: 0;
}

.header-left p {
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-info {
  text-align: right;
}

.admin-info p {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
  margin: 0;
}

.admin-info strong {
  font-size: 15px;
  color: #1f2937;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-secondary {
  background: #6b7280;
  color: #fff;
}

.btn-secondary:hover {
  background: #4b5563;
}


/* Dashboard Main */
.dashboard-main {
  padding: 32px 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 36px;
  font-weight: 900;
  color: #1f2937;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Data Table */
.data-table-container {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.table-header {
  padding: 24px;
  background: linear-gradient(135deg, #ff9f1c, #ffdd57);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.table-header h2 {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f9fafb;
}

.data-table th {
  padding: 16px 24px;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

.data-table td {
  padding: 16px 24px;
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
}

.data-table .badge {
  background: #dbeafe;
  color: #1e40af;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  display: inline-block;
}

.tag-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-code {
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 13px;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-copy {
  background: #ff9f1c;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: #f59e0b;
  transform: scale(1.05);
}


/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .data-table th,
  .data-table td {
    padding: 12px 16px;
    font-size: 13px;
  }
}