:root {
  --primary-color: #4361ee;
  --secondary-color: #3a0ca3;
  --success-color: #4cc9f0;
  --danger-color: #f72585;
  --warning-color: #f8961e;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --border-radius: 12px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding: 20px;
}

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

.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.header h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 2.2rem;
}

.header .subtitle {
  color: var(--gray-color);
  font-size: 1.1rem;
  font-weight: 500;
}

.card {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.intro-card {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
}

.intro-card p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.question-card {
  margin-bottom: 20px;
  transition: border-left 0.3s ease;
}

.question-card h3 {
  margin-bottom: 20px;
  color: var(--secondary-color);
  font-size: 1.2rem;
}

.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.rating-label {
  flex: 1;
  min-width: 120px;
  position: relative;
}

.rating-option {
  display: block;
  padding: 12px 15px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.rating-label input {
  display: none;
}

.rating-label input:checked + .rating-option {
  border-color: var(--primary-color);
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

.strongly-agree:hover {
  border-color: #4caf50;
  color: #4caf50;
}
.agree:hover {
  border-color: #8bc34a;
  color: #8bc34a;
}
.neutral:hover {
  border-color: #ff9800;
  color: #ff9800;
}
.disagree:hover {
  border-color: #ff5722;
  color: #ff5722;
}
.strongly-disagree:hover {
  border-color: #f44336;
  color: #f44336;
}

textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: var(--transition);
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
}

.btn {
  padding: 15px 30px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

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

.reset-btn {
  background: #f8f9fa;
  color: var(--gray-color);
  border: 2px solid #e0e0e0;
}

/* ========== BUTTON STATES ========== */
.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.96) !important;
}

.btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ========== FIXED RIPPLE EFFECT ========== */
.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--primary-color); /* CHANGED: Now uses your primary color */
  opacity: 0.3; /* CHANGED: More visible */
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
  animation: ripple 0.8s ease-out;
}

/* Different opacity for each button type */
.submit-btn::after {
  background: rgba(255, 255, 255, 0.7); /* White for dark submit button */
}

.reset-btn::after {
  background: rgba(67, 97, 238, 0.4); /* Blue for light reset button */
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: scale(30, 30);
    opacity: 0;
  }
}

.submit-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4) !important;
}

.submit-btn:active {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3) !important;
}

.reset-btn:hover {
  background: #e9ecef !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.reset-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.success-message {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
  border-radius: var(--border-radius);
  margin: 30px 0;
  animation: fadeIn 0.5s ease;
}

.success-message i {
  font-size: 4rem;
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: var(--gray-color);
  font-size: 0.9rem;
}

.admin-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.admin-link:hover {
  text-decoration: underline;
}

/* ========== BUSINESS HEADER & FOOTER STYLES ========== */
.business-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  text-align: center;
  padding: 25px;
  margin-bottom: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.business-logo {
  max-height: 50px;
  width: auto;
  margin-bottom: 15px;
}

.workshop-series {
  font-size: 0.95rem;
  opacity: 0.9;
  margin: 0;
}

.business-footer {
  margin-top: 60px;
  padding: 25px;
  border-top: 2px solid #e2e8f0;
  text-align: center;
  font-size: 0.9rem;
  color: #718096;
  background: #f8fafc;
  border-radius: var(--border-radius);
}

.business-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.business-footer a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.system-credit {
  margin-top: 15px;
  font-size: 0.75rem;
  color: #94a3b8;
  opacity: 0.8;
}

.system-credit small {
  letter-spacing: 0.5px;
}

/* ========== ERROR STYLES ========== */
.error-message {
  color: #f72585;
  background-color: rgba(247, 37, 133, 0.1);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 12px;
  border: 2px solid #f72585;
  font-weight: 600;
  display: none;
  animation: fadeIn 0.3s ease;
}

.question-card.has-error {
  border-left: 6px solid #f72585 !important;
  background-color: rgba(247, 37, 133, 0.03);
}

/* ========== ANIMATIONS ========== */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ========== LOADING & ANIMATIONS ========== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ========== NOTIFICATION & BADGE STYLES ========== */
#offline-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  max-width: 350px;
  animation: slideIn 0.3s ease-out;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#offline-notification.slide-out {
  animation: slideOut 0.3s ease-in forwards;
}

#offline-notification strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1em;
  margin-bottom: 8px;
}

#offline-notification p {
  margin: 8px 0;
  font-size: 0.95em;
  line-height: 1.4;
  opacity: 0.9;
}

#offline-notification button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  margin-top: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  width: 100%;
  font-family: inherit;
}

#offline-notification button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Pending Count Badge */
#pending-count-badge {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(76, 201, 240, 0.3);
  animation: slideIn 0.3s ease-out;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Success Notification Variant */
#offline-notification.sync-success {
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
}

/* ========== FORM ELEMENT ENHANCEMENTS ========== */
/* Radio Button Hover Effects */
.rating-options input[type="radio"]:hover + label {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* Button Loading State */
.btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* Textarea Focus States */
textarea:focus {
  outline: 2px solid #4cc9f0;
  border-color: #4cc9f0;
}

/* Character Counter */
.char-count {
  font-size: 0.8rem;
  color: var(--gray-color);
  margin-top: 4px;
  text-align: right;
  transition: color 0.2s ease;
}

.char-count.warning {
  color: #ff6b6b;
  font-weight: bold;
}

/* Make required fields obvious */
.rating-label input:required + .rating-option::before {
  content: "*";
  color: #f72585;
  position: absolute;
  top: -5px;
  right: -5px;
  font-weight: bold;
  font-size: 1.1em;
  z-index: 1;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
  .rating-options {
    flex-direction: column;
  }

  .rating-label {
    min-width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  #offline-notification {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  #pending-count-badge {
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .error-message {
    font-size: 0.85rem;
    padding: 10px 12px;
  }

  .business-header {
    padding: 20px;
    margin-bottom: 20px;
  }

  .business-logo {
    max-height: 40px;
  }

  .business-footer {
    margin-top: 40px;
    padding: 20px;
    font-size: 0.85rem;
  }

  .system-credit {
    margin-top: 12px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  #offline-notification {
    padding: 12px 16px;
  }

  #offline-notification strong {
    font-size: 1em;
  }

  #offline-notification p {
    font-size: 0.85em;
  }
}

/* ========== ACCESSIBILITY ========== */
/* Focus visible for keyboard navigation */
.rating-options input[type="radio"]:focus-visible + label {
  outline: 2px solid #4cc9f0;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .error-message {
    border: 3px solid #f72585;
  }

  .question-card.has-error {
    border-left: 6px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .shake,
  #offline-notification,
  #pending-count-badge,
  .error-message {
    animation: none;
    transition: none;
  }

  .spinner {
    animation-duration: 2s;
  }
}
