/* ThoughtGrid Homepage — Tailwind replacement */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Space Mono', 'Microsoft YaHei', monospace;
  background-color: #ffffff;
  color: #1F1F1B;
}

#canvas-container {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Layout utilities */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-grow { flex-grow: 1; }

/* Width / Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-64 { height: 16rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.max-w-md { max-width: 28rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-xs { max-width: 20rem; }
.max-h-screen-90 { max-height: 90vh; }

/* Z-index */
.z-1 { z-index: 1; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.mt-0-5 { margin-top: 0.125rem; }
.ml-2 { margin-left: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-auto { margin-top: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Typography */
.text-center { text-align: center; }
.text-3xs { font-size: 10px; line-height: 1rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.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; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.font-normal { font-weight: 400; }
.tracking-widest { letter-spacing: 0.1em; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-wide { letter-spacing: 0.025em; }
.leading-relaxed { line-height: 1.625; }
.font-sans { font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', sans-serif; }
.font-mono { font-family: 'Space Mono', monospace; }

/* Colors */
.bg-black-40 { background-color: rgba(0, 0, 0, 0.4); }
.bg-white { background-color: #ffffff; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-e9e6d4 { background-color: #E9E6D4; }
.bg-f8f6e9 { background-color: #f8f6e9; }
.bg-1f1f1b { background-color: #1F1F1B; }
.bg-1f1f1b-10 { background-color: rgba(31, 31, 27, 0.1); }
.bg-0070cc { background-color: #0070cc; }
.text-white { color: #ffffff; }
.text-e9e6d4 { color: #E9E6D4; }
.text-1f1f1b { color: #1F1F1B; }
.text-1f1f1b-50 { color: rgba(31, 31, 27, 0.5); }
.text-1f1f1b-70 { color: rgba(31, 31, 27, 0.7); }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }

.justify-start { justify-content: flex-start; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.w-80 { width: 20rem; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.left-4 { left: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.pt-6 { padding-top: 1.5rem; }
.tracking-wider { letter-spacing: 0.05em; }
.opacity-40 { opacity: 0.4; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }
.hover-underline:hover { text-decoration: underline; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.py-1-5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }

/* Border */
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
.border-r-2 { border-right-width: 2px; border-right-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-t-2 { border-top-width: 2px; border-top-style: solid; }
.border-1f1f1b { border-color: #1F1F1B; }
.border-1f1f1b-20 { border-color: rgba(31, 31, 27, 0.2); }

/* Effects */
.backdrop-blur-sm {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.opacity-0 { opacity: 0; }
.opacity-60 { opacity: 0.6; }
.opacity-90 { opacity: 0.9; }
.shadow-sm { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Transforms */
.transform { transform: translateZ(0); }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }
.-translate-y-0-5 { transform: translateY(-0.125rem); }

/* Transitions */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

/* Rounded */
.rounded-sm { border-radius: 0.125rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-full { border-radius: 9999px; }

/* Transforms */
.transform { transform: translateZ(0); }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }
.scale-100 { transform: scale(1); }

/* Transitions */
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }

/* Rounded */
.rounded-full { border-radius: 9999px; }
.rounded-sm { border-radius: 0.125rem; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* Pointer events */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* Shrink */
.shrink-0 { flex-shrink: 0; }

/* Inline block */
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

/* Hover states */
.h-0-5 { height: 0.125rem; }
.hover-bg-ff5837:hover { background-color: #FF5837; }
.hover-bg-005fa3:hover { background-color: #005fa3; }
.hover-shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.hover-translate-y-up:hover { transform: translateZ(0) translateY(-0.125rem); }

/* Scrollbar */
.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: #f1f1f1; }
.custom-scroll::-webkit-scrollbar-thumb { background: #1F1F1B; }

.space-y-3 > * + * { margin-top: 0.75rem; }
.object-cover { object-fit: cover; }
.max-w-none { max-width: none; }
.prose { max-width: 65ch; }
.prose-sm { font-size: 0.875rem; line-height: 1.7142857; }
.prose p { margin-top: 1em; margin-bottom: 1em; }

/* Text shadow */
.text-shadow { text-shadow: 0 1px 2px rgba(0,0,0,0.1); }

/* Responsive md: */
@media (min-width: 768px) {
  .md-flex-row { flex-direction: row; }
  .md-w-half { width: 50%; }
  .md-h-auto { height: auto; }
  .md-border-b-0 { border-bottom-width: 0; }
  .md-border-r-2 { border-right-width: 2px; border-right-style: solid; }
}
