/**
 * ============================================================================
 * COCONUT COMPUTER CLUB - REGISTRATION (DAFTAR) STYLES
 * Dedicated stylesheet for registration form & hero
 * Preserves 100% of exact design, hover states, layout, and animations.
 * ============================================================================
 */

:root {
  --primary: #243B77;
  --primary-dark: #16254c;
  --primary-hover: #1c2f61;
  --accent: #4d82f3;
  --accent-2: #243B77;
  --muted: #6b7280;
  --card-bg: rgba(255, 255, 255, 0.98);
  --shadow: 0 8px 32px rgba(22, 37, 76, 0.10);
  --border-radius: 12px;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #111827;
  background: #f9fafb;
  overflow-x: hidden;
  margin: 0;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--primary);
}

h1 { font-size: 3rem; letter-spacing: -0.025em; }
h2 { font-size: 2rem; }
p, .lead { font-size: 1.1rem; line-height: 1.8; }
.text-muted { color: var(--muted); }

/* Enhanced Animated Background */
.background-animation {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.15;
  z-index: -1;
}
.background-animation::before,
.background-animation::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(50px);
  animation: pulse 8s ease-in-out infinite;
}
.background-animation::before {
  top: -15%;
  right: -15%;
  background: linear-gradient(135deg, var(--accent), rgba(37, 99, 235, 0.2));
}
.background-animation::after {
  bottom: -15%;
  left: -15%;
  background: linear-gradient(135deg, var(--accent-2), rgba(96, 165, 250, 0.3));
  animation-delay: 2s;
}
.background-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: float 5s ease-in-out infinite;
  opacity: 0.5;
}
.particle-1 { top: 15%; left: 25%; animation-delay: 0s; }
.particle-2 { top: 35%; right: 20%; animation-delay: 1.2s; }
.particle-3 { bottom: 25%; left: 30%; animation-delay: 2.4s; }
.particle-4 { top: 60%; left: 10%; animation-delay: 3.6s; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.6; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(10deg); }
}

/* Hero Section */
#daftar-hero {
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent-2) 50%, var(--accent) 100%);
  color: white;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
  text-align: center;
  margin-top: -40px;
}
#daftar-hero h1 {
  font-weight: 800;
  font-size: 3.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
  color: white;
}
#daftar-hero .lead {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
  color: white;
}

/* Form Section */
#daftar-form {
  background: linear-gradient(180deg, #f9fafb, rgba(147, 197, 253, 0.15));
  padding: 1rem 0;
  margin-bottom: 0;
}
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 1.5rem;
  margin-bottom: 0;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.2);
}

/* Form Elements */
.form-control,
.form-select {
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(255, 255, 255, 0.99);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  outline: none;
}

/* Radio Buttons */
.form-check-input {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.4);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}
.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}
.form-check-label {
  margin-left: 1.5rem;
  font-weight: 500;
  cursor: pointer;
  color: #374151;
}
.form-check:hover .form-check-label { color: var(--accent); }

/* File Input */
input[type='file'].form-control {
  border: 2px dashed rgba(37, 99, 235, 0.4);
  background: rgba(255, 255, 255, 0.99);
  border-radius: var(--border-radius);
  padding: 1rem;
  transition: border-color 0.3s ease;
}
input[type='file'].form-control:hover,
input[type='file'].form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Textarea */
textarea.form-control {
  min-height: 160px;
  border-radius: var(--border-radius);
  resize: vertical;
}

/* Submit Button */
#submitButton {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: none;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.9rem 3rem;
  border-radius: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}
#submitButton:hover {
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}
#submitButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Feedback Messages */
#submitSuccessMessage, #submitErrorMessage {
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}
#submitSuccessMessage {
  background: rgba(147, 197, 253, 0.3);
  border: 1px solid var(--accent);
}
#submitErrorMessage {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
}

/* Form */
#daftarForm {
  margin-bottom: 0;
}

/* Toast Styling */
.toast {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  min-width: 300px;
}
.toast.bg-success { background: var(--accent) !important; }
.toast.bg-danger { background: #ef4444 !important; }

/* Chapter Selection Cards */
.chapter-card {
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  background: #ffffff;
}
.chapter-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.btn-check:checked + .chapter-card {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  border-color: var(--primary) !important;
  color: white !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}
.btn-check:checked + .chapter-card .text-dark,
.btn-check:checked + .chapter-card .text-muted {
  color: white !important;
}
.btn-check:checked + .chapter-card .chapter-icon {
  background: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  #daftar-hero { padding: 3rem 0; }
  #daftar-hero h1 { font-size: 2.5rem; }
  .card { padding: 1rem; }
}
@media (max-width: 767px) {
  #daftar-hero { padding: 2rem 0; }
  #daftar-hero h1 { font-size: 2rem; }
  #daftar-hero .lead { font-size: 1rem; }
  .card { padding: 0.75rem; }
  #submitButton { padding: 0.8rem 2.5rem; font-size: 1rem; }
}
