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

:root {
  --primary-color: #5f259f;
  --secondary-color: #8b3dff;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.25), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(118, 75, 162, 0.25), transparent 30%),
              linear-gradient(135deg, #0f172a 0%, #111827 40%, #1f2937 100%);
  min-height: 100vh;
  padding: 20px;
  color: var(--text-dark);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Header */
.header {
  background: linear-gradient(135deg, rgba(95, 37, 159, 0.9), rgba(139, 61, 255, 0.9));
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  margin-bottom: 28px;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}

.header h1 {
  color: #f8fafc;
  font-size: 2.1rem;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.header h2 {
  color: #e0e7ff;
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.counter {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 10px;
  animation: pulseBlink 1.6s ease-in-out infinite;
}

.counter.full {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

@keyframes pulseBlink {
  0% { box-shadow: 0 0 0 0 rgba(95, 37, 159, 0.5); opacity: 1; }
  50% { box-shadow: 0 0 0 12px rgba(95, 37, 159, 0); opacity: 0.6; }
  100% { box-shadow: 0 0 0 0 rgba(95, 37, 159, 0); opacity: 1; }
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.nav-btn {
  padding: 10px 20px;
  background: var(--bg-light);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: var(--primary-color);
  color: white;
}

/* Form Card */
.form-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 20px 0 10px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card h4 {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  color: #111827;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.glow-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(245,245,255,0.9));
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.7);
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.4rem;
  color: #0f172a;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-light);
  margin-bottom: 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.step-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step-content h5 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #0f172a;
}

.step-content p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.4;
}

.form-card.closed {
  text-align: center;
  padding: 60px 40px;
}

.form-card.closed h2 {
  color: var(--error-color);
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.form-card.closed p {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group label .required {
  color: var(--error-color);
  margin-left: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(95, 37, 159, 0.1);
}

.form-group input.error {
  border-color: var(--error-color);
}

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 5px;
  display: none;
}

.error-message.show {
  display: block;
}

/* QR Code Section */
.qr-section {
  background: #000;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  margin: 30px 0;
}

.qr-section h3 {
  color: white;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.qr-section img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.qr-section p {
  color: #9ca3af;
  margin-top: 15px;
  font-size: 0.95rem;
}

/* File Upload */
.file-upload {
  position: relative;
  margin-top: 10px;
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload-label {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.file-upload-label:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.file-name {
  display: inline-block;
  margin-left: 15px;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transition: transform 0.1s ease, background 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  margin-bottom: 25px;
}

.modal-header h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
}

.disclaimer {
  background: #fef3c7;
  border-left: 4px solid var(--warning-color);
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
}

.disclaimer strong {
  color: var(--error-color);
  display: block;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.disclaimer p {
  color: var(--text-dark);
  line-height: 1.6;
}

.review-details {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.review-item {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.review-item strong {
  display: block;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.review-item span {
  color: var(--text-dark);
  font-size: 1.05rem;
}

.modal-footer {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.modal-footer .btn {
  flex: 1;
}

/* Alert Messages */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--error-color);
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

/* Loading Spinner */
.spinner {
  display: none;
  width: 40px;
  height: 40px;
  margin: 20px auto;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner.show {
  display: block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.5rem;
  }

  .header h2 {
    font-size: 1.2rem;
  }

  .form-card {
    padding: 25px;
  }

  .modal-content {
    padding: 25px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .nav-links {
    flex-direction: column;
  }
}

/* Admin Styles */
.admin-container {
  max-width: 1200px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card h3 {
  color: var(--text-light);
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.stat-card .value {
  color: var(--primary-color);
  font-size: 2.5rem;
  font-weight: 700;
}

.table-container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow-x: auto;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.search-box {
  padding: 10px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  min-width: 300px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

table th {
  background: var(--bg-light);
  color: var(--text-dark);
  font-weight: 600;
  position: sticky;
  top: 0;
}

table tr:hover {
  background: var(--bg-light);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}
