@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --green: #1a4d2e;
  --green-light: #2d6e42;
  --green-dark: #0f2d1a;
  --green-accent: #3a7d52;
  --gold: #c9a84c;
  --gold-light: #e8c87a;
  --white: #f8f5f0;
  --off-white: #ede9e3;
  --text: #1a1a1a;
  --text-muted: #5a6650;
  --danger: #c0392b;
  --success: #27ae60;
  --shadow: 0 4px 24px rgba(0,0,0,0.18);
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--green-dark);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* TEXTURE OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='none'/%3E%3Ccircle cx='1' cy='1' r='0.5' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--green-dark);
  border-bottom: 1px solid rgba(201,168,76,0.25);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-logo span { color: var(--white); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--off-white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold); }

.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

/* BUTTONS */
.btn {
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--gold);
  color: var(--green-dark);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,168,76,0.4); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--green-dark); }

.btn-green {
  background: var(--green);
  color: var(--white);
  border: 1px solid var(--green-accent);
}
.btn-green:hover { background: var(--green-light); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #a93226; }

.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

/* HERO */
.hero {
  position: relative;
  z-index: 1;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(58,125,82,0.35) 0%, transparent 70%);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400'%3E%3Cellipse cx='400' cy='200' rx='350' ry='180' fill='none' stroke='rgba(201,168,76,0.07)' stroke-width='1'/%3E%3Cellipse cx='400' cy='200' rx='280' ry='140' fill='none' stroke='rgba(201,168,76,0.05)' stroke-width='1'/%3E%3C/svg%3E") center/cover no-repeat;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--white);
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(248,245,240,0.75);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* SECTION */
.section {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.raffle-card {
  background: var(--green);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.raffle-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); }

.raffle-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.raffle-body { padding: 1.25rem; }

.raffle-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.raffle-price {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.raffle-progress-wrap { margin-bottom: 0.75rem; }

.raffle-progress {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 0.3rem;
}

.raffle-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 100px;
  transition: width 0.5s ease;
}

.raffle-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(248,245,240,0.6);
  margin-bottom: 1rem;
}

.instant-badge {
  background: rgba(201,168,76,0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.free-entry-link {
  display: block;
  text-align: center;
  color: rgba(248,245,240,0.5);
  font-size: 0.78rem;
  text-decoration: underline;
  margin-top: 0.5rem;
  transition: color 0.2s;
}
.free-entry-link:hover { color: var(--gold); }

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--green-dark);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  position: relative;
  animation: slideUp 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--off-white);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.1); }

.modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--gold);
}

/* FORMS */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(248,245,240,0.8);
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* STATS BAR */
.stats-bar {
  background: var(--green);
  border-top: 1px solid rgba(201,168,76,0.15);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
}
.stat-label { font-size: 0.78rem; color: rgba(248,245,240,0.6); margin-top: 0.2rem; }

/* DASHBOARD */
.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.sidebar {
  background: var(--green);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 90px;
}

.sidebar-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--gold), var(--green-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
}

.sidebar-name {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.sidebar-balance {
  text-align: center;
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
}

.sidebar-menu { list-style: none; }
.sidebar-menu li + li { margin-top: 0.25rem; }
.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: rgba(248,245,240,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
  background: rgba(201,168,76,0.15);
  color: var(--gold);
}

/* TABLE */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(248,245,240,0.85);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.03); }

/* PANEL */
.panel {
  background: var(--green);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ALERTS */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alert-success { background: rgba(39,174,96,0.15); border: 1px solid rgba(39,174,96,0.4); color: #6fcf97; }
.alert-error { background: rgba(192,57,43,0.15); border: 1px solid rgba(192,57,43,0.4); color: #e57373; }
.alert-info { background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.3); color: var(--gold); }

/* FOOTER */
footer {
  position: relative;
  z-index: 1;
  background: var(--green-dark);
  border-top: 1px solid rgba(201,168,76,0.2);
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
  text-align: center;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  list-style: none;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(248,245,240,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-disclaimer {
  font-size: 0.78rem;
  color: rgba(248,245,240,0.35);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.fade-in { animation: fadeIn 0.5s ease forwards; }

/* TICKET DISPLAY */
.tickets-display {
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}
.tickets-display p { font-size: 0.85rem; color: rgba(248,245,240,0.6); margin-bottom: 0.5rem; }
.ticket-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ticket-num {
  background: var(--gold);
  color: var(--green-dark);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* WINNER ANIMATION */
.winner-box {
  text-align: center;
  padding: 2rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(201,168,76,0.1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.3); }
  50% { box-shadow: 0 0 0 12px rgba(201,168,76,0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .stats-bar { gap: 2rem; }
}

/* SCROLL BAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--green-dark); }
::-webkit-scrollbar-thumb { background: var(--green-accent); border-radius: 3px; }
