/* Life Skills Teaching App - Styles */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --error: #dc2626;
  --error-light: #fee2e2;
  --warning: #ca8a04;
  --warning-light: #fef9c3;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  min-height: 100vh;
}

/* Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.container-narrow {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
}

/* Typography */
h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--gray-600);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
  font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-800);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  cursor: pointer;
}

.form-hint {
  font-size: 0.813rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.form-error {
  font-size: 0.813rem;
  color: var(--error);
  margin-top: 4px;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-group label {
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

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

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

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-300);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background: #15803d;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Button Group */
.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-group-space-between {
  justify-content: space-between;
}

/* Alerts */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.938rem;
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success);
}

.alert-error {
  background: var(--error-light);
  color: var(--error);
  border: 1px solid var(--error);
}

.alert-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.alert-info {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
}

/* Progress Bar */
.progress-container {
  margin-bottom: 24px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Slide Content */
.slide {
  animation: fadeIn 0.3s ease;
}

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

.slide-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.slide-content {
  font-size: 1.063rem;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: 20px;
}

.slide-image {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: var(--radius-lg, 12px);
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.slide-image:hover {
  transform: scale(1.01);
}

.key-points {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.key-points h4 {
  font-size: 0.938rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}

.key-points ul {
  list-style: none;
  padding-left: 0;
}

.key-points li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: var(--gray-700);
}

.key-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

/* Quiz/Test */
.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.question-number {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.question-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.option:hover {
  border-color: var(--primary);
  background: var(--gray-50);
}

.option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option input[type="radio"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.option-text {
  flex: 1;
  color: var(--gray-700);
}

/* Results */
.result-score {
  text-align: center;
  padding: 30px;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2.5rem;
  font-weight: 700;
}

.score-circle.pass {
  background: var(--success-light);
  color: var(--success);
  border: 4px solid var(--success);
}

.score-circle.fail {
  background: var(--error-light);
  color: var(--error);
  border: 4px solid var(--error);
}

.score-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.result-message {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.result-message.pass {
  color: var(--success);
}

.result-message.fail {
  color: var(--error);
}

/* Link Display */
.link-display {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 14px;
  font-family: monospace;
  font-size: 0.875rem;
  word-break: break-all;
  margin-bottom: 12px;
}

/* Topic Card */
.topic-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.topic-card:hover {
  border-color: var(--primary);
  background: var(--gray-50);
}

.topic-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.topic-card h3 {
  margin-bottom: 8px;
}

.topic-card p {
  margin-bottom: 0;
  font-size: 0.938rem;
}

/* Header */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.938rem;
}

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

/* Footer */
.footer {
  text-align: center;
  padding: 24px 20px;
  margin-top: 40px;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 0.875rem;
}

.footer a {
  color: var(--gray-600);
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.hidden { display: none; }

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .card {
    padding: 18px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
  }

  .header-content {
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    gap: 16px;
  }
}
