/* Paper Route Learning - Custom Styles */

/* Color Variables */
:root {
  --primary: #1A4D7C;
  --primary-dark: #153a63;
  --secondary: #2D8B6E;
  --accent: #E07A5F;
  --accent-dark: #c9694f;
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

body {
  margin: 0;
  line-height: inherit;
  font-family: 'Noto Sans HK', sans-serif;
  -webkit-text-size-adjust: 100%;
  background-color: white;
  color: var(--neutral-900);
}

html {
  line-height: 1.5;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  font-family: 'Noto Sans HK', sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: inherit;
}

img {
  display: block;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, select {
  text-transform: none;
}

button, input:where([type=button]), input:where([type=reset]), input:where([type=submit]) {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

a, button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

p {
  margin: 0;
}

textarea {
  resize: vertical;
}

/* Tailwind-like utility classes */
.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }

.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.pt-20 { padding-top: 5rem; }
.pb-16 { padding-bottom: 4rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }

.font-serif {
  font-family: 'Noto Serif HK', serif;
}

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-300 { font-weight: 300; }
.font-400 { font-weight: 400; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }

.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }

.text-white { color: white; }
.text-black { color: black; }
.text-neutral-50 { color: var(--neutral-50); }
.text-neutral-200 { color: var(--neutral-200); }
.text-neutral-500 { color: var(--neutral-500); }
.text-neutral-600 { color: var(--neutral-600); }
.text-neutral-700 { color: var(--neutral-700); }
.text-neutral-900 { color: var(--neutral-900); }
.text-primary { color: var(--primary); }
.text-primary-dark { color: var(--primary-dark); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-red-500 { color: #ef4444; }
.text-green-700 { color: #15803d; }

.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.text-white\/90 { color: rgba(255, 255, 255, 0.9); }
.text-neutral-200\/10 { color: rgba(229, 231, 235, 0.1); }
.text-neutral-200\/60 { color: rgba(229, 231, 235, 0.6); }

.bg-white { background-color: white; }
.bg-black { background-color: black; }
.bg-neutral-50 { background-color: var(--neutral-50); }
.bg-neutral-100 { background-color: var(--neutral-100); }
.bg-neutral-200 { background-color: var(--neutral-200); }
.bg-primary { background-color: var(--primary); }
.bg-primary-dark { background-color: var(--primary-dark); }
.bg-secondary { background-color: var(--secondary); }
.bg-secondary\/10 { background-color: rgba(45, 139, 110, 0.1); }
.bg-secondary\/90 { background-color: rgba(45, 139, 110, 0.9); }
.bg-accent { background-color: var(--accent); }
.bg-accent-dark { background-color: var(--accent-dark); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-green-50 { background-color: #f0fdf4; }
.bg-red-50 { background-color: #fef2f2; }

.bg-gradient-to-b {
  background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}

.from-black\/40 { --tw-gradient-from: rgba(0, 0, 0, 0.4); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.via-black\/30 { --tw-gradient-stops: var(--tw-gradient-from), rgba(0, 0, 0, 0.3), var(--tw-gradient-to); }
.to-black\/40 { --tw-gradient-to: rgba(0, 0, 0, 0.4); }
.from-primary\/60 { --tw-gradient-from: rgba(26, 77, 124, 0.6); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.via-primary\/40 { --tw-gradient-stops: var(--tw-gradient-from), rgba(26, 77, 124, 0.4), var(--tw-gradient-to); }
.to-primary\/60 { --tw-gradient-to: rgba(26, 77, 124, 0.6); }

.rounded-full { border-radius: 9999px; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }

.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-neutral-200 { border-color: var(--neutral-200); }
.border-neutral-300 { border-color: var(--neutral-300); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }

.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.backdrop-blur-sm { backdrop-filter: blur(4px); }

.w-full { width: 100%; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.h-auto { height: auto; }
.h-12 { height: 3.5rem; }
.w-12 { width: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-48 { height: 12rem; }
.h-80 { height: 20rem; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }

.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }
.object-cover { object-fit: cover; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }

.flex-col { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-items-start { justify-items: start; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

.col-span-2 { grid-column: span 2 / span 2; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.top-6 { top: 1.5rem; }
.right-0 { right: 0; }
.right-6 { right: 1.5rem; }
.bottom-0 { bottom: 0; }
.bottom-6 { bottom: 1.5rem; }
.left-0 { left: 0; }
.left-6 { left: 1.5rem; }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }

.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }

.whitespace-nowrap { white-space: nowrap; }

.transition-all { transition: all 150ms ease; }
.transition-colors { transition: color, background-color, border-color, text-decoration-color, fill, stroke 150ms ease; }
.transition-shadow { transition: box-shadow 150ms ease; }
.duration-300 { transition-duration: 300ms; }

.hover\:bg-white:hover { background-color: white; }
.hover\:bg-accent-dark:hover { background-color: var(--accent-dark); }
.hover\:bg-primary-dark:hover { background-color: var(--primary-dark); }
.hover\:bg-\[#20BA5A\]:hover { background-color: #20BA5A; }
.hover\:text-white:hover { color: white; }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-primary-dark:hover { color: var(--primary-dark); }
.hover\:text-\[\#25D366\]:hover { color: #25D366; }
.hover\:text-\[\#1877F2\]:hover { color: #1877F2; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }

.focus\:outline-none:focus { outline: none; }
.focus\:border-primary:focus { border-color: var(--primary); }

.disabled\:opacity-50:disabled { opacity: 0.5; }

.prose { max-width: 65ch; }
.prose-lg { font-size: 1.125rem; line-height: 1.75; }
.prose-lg h2 { font-size: 1.875rem; line-height: 2.25rem; margin-top: 2.5em; margin-bottom: 1em; }
.prose-lg p { margin-top: 1.25em; margin-bottom: 1.25em; }
.prose-lg strong { font-weight: 600; }

/* Responsive */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:block { display: block; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

@media (max-width: 767px) {
  .md\:hidden { display: none; }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
  background: var(--neutral-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-500);
}

/* Page sections */
#app {
  min-height: calc(100vh - 5rem);
}

/* Font Awesome icons alignment */
i[class*="ri-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Image loading placeholder */
img[src] {
  background-color: var(--neutral-100);
}

/* Form elements */
input, select, textarea {
  background-color: white;
}

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

select option {
  color: var(--neutral-900);
}
