/* Neobrutalist Design System - Complete CSS Implementation */
/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
}

body {
  background-color: #f9fafb;
  color: #000;
}

/* Layout utilities */
.container {
  width: 100%;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-6xl {
  max-width: 72rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-none {
  max-width: none;
}

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

.w-full {
  width: 100%;
}

.w-8 {
  width: 2rem;
}

.w-12 {
  width: 3rem;
}

.w-24 {
  width: 6rem;
}

.h-2 {
  height: 0.5rem;
}

.h-8 {
  height: 2rem;
}

.h-12 {
  height: 3rem;
}

/* Spacing */
.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.pt-4 {
  padding-top: 1rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.pt-8 {
  padding-top: 2rem;
}

.pb-8 {
  padding-bottom: 2rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-16 {
  margin-top: 4rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.space-y-8 > * + * {
  margin-top: 2rem;
}

/* Display and positioning */
.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.hidden {
  display: none;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

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

.-top-4 {
  top: -1rem;
}

.-right-4 {
  right: -1rem;
}

/* Flexbox utilities */
.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

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

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

/* Typography */
.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-6xl {
  font-size: 3.75rem;
  line-height: 1;
}

.font-medium {
  font-weight: 500;
}

.font-bold {
  font-weight: 700;
}

.font-black {
  font-weight: 900;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
}

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

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

.tracking-tight {
  letter-spacing: -0.025em;
}

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

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

.uppercase {
  text-transform: uppercase;
}

/* Colors */
.text-black {
  color: #000;
}

.text-white {
  color: #fff;
}

.text-red-600 {
  color: #dc2626;
}

.text-red-800 {
  color: #991b1b;
}

.text-yellow-400 {
  color: #facc15;
}

.text-gray-600 {
  color: #4b5563;
}

.bg-white {
  background-color: #fff;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.bg-gray-700 {
  background-color: #374151;
}

.bg-gray-800 {
  background-color: #1f2937;
}

.bg-black {
  background-color: #000;
}

.bg-red-600 {
  background-color: #dc2626;
}

.bg-red-700 {
  background-color: #b91c1c;
}

.bg-yellow-400 {
  background-color: #facc15;
}

.bg-yellow-500 {
  background-color: #eab308;
}

.bg-green-600 {
  background-color: #16a34a;
}

.bg-transparent {
  background-color: transparent;
}

.bg-opacity-75 {
  background-color: rgba(0, 0, 0, 0.75);
}

/* Borders */
.border-2 {
  border-width: 2px;
  border-style: solid;
}

.border-4 {
  border-width: 4px;
  border-style: solid;
}

.border-8 {
  border-width: 8px;
  border-style: solid;
}

.border-t-4 {
  border-top-width: 4px;
  border-top-style: solid;
}

.border-t-8 {
  border-top-width: 8px;
  border-top-style: solid;
}

.border-r-4 {
  border-right-width: 4px;
  border-right-style: solid;
}

.border-b-4 {
  border-bottom-width: 4px;
  border-bottom-style: solid;
}

.border-b-8 {
  border-bottom-width: 8px;
  border-bottom-style: solid;
}

.border-l-4 {
  border-left-width: 4px;
  border-left-style: solid;
}

.border-black {
  border-color: #000;
}

.border-white {
  border-color: #fff;
}

.border-red-600 {
  border-color: #dc2626;
}

/* Shadows - Neobrutalist style */
.shadow-brutal-sm {
  box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 1);
}

.shadow-brutal {
  box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 1);
}

.shadow-brutal-lg {
  box-shadow: 12px 12px 0px 0px rgba(0, 0, 0, 1);
}

.shadow-brutal-xl {
  box-shadow: 16px 16px 0px 0px rgba(0, 0, 0, 1);
}

.shadow-\[8px_8px_0px_0px_rgba\(255\,255\,255\,1\)\] {
  box-shadow: 8px 8px 0px 0px rgba(255, 255, 255, 1);
}

/* Transitions */
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: ease;
  transition-duration: 0.2s;
}

.transition-shadow {
  transition-property: box-shadow;
  transition-timing-function: ease;
  transition-duration: 0.2s;
}

.transition-all {
  transition-property: all;
  transition-timing-function: ease;
  transition-duration: 0.2s;
}

.duration-200 {
  transition-duration: 0.2s;
}

/* Interactive states */
.cursor-pointer {
  cursor: pointer;
}

.outline-none {
  outline: none;
}

.hover\:bg-red-700:hover {
  background-color: #b91c1c;
}

.hover\:bg-red-800:hover {
  background-color: #991b1b;
}

.hover\:bg-gray-700:hover {
  background-color: #374151;
}

.hover\:bg-yellow-500:hover {
  background-color: #eab308;
}

.hover\:text-red-600:hover {
  color: #dc2626;
}

.hover\:text-red-800:hover {
  color: #991b1b;
}

.hover\:text-yellow-400:hover {
  color: #facc15;
}

.hover\:underline:hover {
  text-decoration: underline;
}

.hover\:shadow-brutal-lg:hover {
  box-shadow: 12px 12px 0px 0px rgba(0, 0, 0, 1);
}

/* Focus states */
.focus\:outline-none:focus {
  outline: none;
}

.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px #facc15;
}

.focus\:ring-4:focus {
  box-shadow: 0 0 0 4px #facc15;
}

.focus\:ring-yellow-400:focus {
  box-shadow: 0 0 0 4px #facc15;
}

.focus\:ring-offset-2:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 6px #facc15;
}

.focus\:ring-offset-white:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 6px #facc15;
}

.focus\:ring-offset-black:focus {
  box-shadow: 0 0 0 2px #000, 0 0 0 6px #facc15;
}

/* Peer states for checkbox toggles */
.peer {
  /* Base peer class */
}

.peer:checked ~ .peer-checked\:hidden {
  display: none;
}

.peer:checked ~ .peer-checked\:block {
  display: block;
}

/* Special neobrutalist focus utility */
.focus-brutal {
  outline: none;
}

.focus-brutal:focus {
  outline: none;
  box-shadow: 0 0 0 4px #facc15, 0 0 0 6px #000;
}

/* Selection styles */
::selection {
  background-color: #facc15;
  color: #000;
}

::-moz-selection {
  background-color: #facc15;
  color: #000;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background-color: #f3f4f6;
  border: 2px solid #000;
}

::-webkit-scrollbar-thumb {
  background-color: #dc2626;
  border: 2px solid #000;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #b91c1c;
}

/* Modal utilities */
.modal-hidden {
  display: none !important;
}

.modal-visible {
  display: flex !important;
}

/* Copy button success state */
.copy-success {
  background-color: #16a34a;
}

/* Prose styles for content */
.prose {
  max-width: none;
}

.prose .text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.prose .text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* Responsive utilities */
@media (min-width: 768px) {
  .md\:px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .md\:py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .md\:p-8 {
    padding: 2rem;
  }

  .md\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .md\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
}

/* Print styles */
@media print {
  .shadow-brutal,
  .shadow-brutal-sm,
  .shadow-brutal-lg,
  .shadow-brutal-xl {
    box-shadow: none !important;
    border: 2px solid #000 !important;
  }

  .bg-red-600,
  .bg-yellow-400,
  .bg-gray-800 {
    background-color: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
  }
}

/* Custom hover popout effects for neobrutalist elements */
.hover-popout {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-popout:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0px 0px rgba(0, 0, 0, 1);
}

/* Enhanced banner styles */
.banner-container {
  position: relative;
  overflow: hidden;
}

.banner-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(220, 38, 38, 0.05) 10px,
    rgba(220, 38, 38, 0.05) 20px
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.banner-container:hover::before {
  opacity: 1;
}

.banner-title {
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.banner-title:hover {
  transform: scale(1.05) rotate(-1deg);
  text-shadow: 4px 4px 0px rgba(220, 38, 38, 0.3);
}

.banner-warning {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.banner-warning::before {
  content: '⚠️';
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.banner-warning:hover::before {
  left: 10px;
  opacity: 1;
}

.banner-warning:hover {
  transform: translateX(20px);
  background-color: #facc15;
  box-shadow: 8px 8px 0px 0px rgba(220, 38, 38, 0.8);
}

/* Enhanced popout effects for cards and buttons */
.card-brutal {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.card-brutal:hover {
  transform: translate(-6px, -6px);
  box-shadow: 14px 14px 0px 0px rgba(0, 0, 0, 1);
}

.card-brutal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-brutal:hover::after {
  opacity: 1;
}

/* Button enhancements */
.btn-brutal {
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn-brutal:hover {
  transform: translate(-3px, -3px);
}

.btn-brutal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-brutal:hover::before {
  left: 100%;
}

/* Glitch effect for the main title */
.glitch {
  position: relative;
}

.glitch:hover::before,
.glitch:hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
  pointer-events: none;
}

.glitch:hover::before {
  color: #dc2626;
  animation: glitch-1 0.3s infinite;
}

.glitch:hover::after {
  color: #facc15;
  animation: glitch-2 0.3s infinite;
}

@keyframes glitch-1 {
  0%, 14%, 15%, 49%, 50%, 99%, 100% {
    transform: translate(0);
  }
  15%, 49% {
    transform: translate(-2px, 1px);
  }
}

@keyframes glitch-2 {
  0%, 20%, 21%, 62%, 63%, 99%, 100% {
    transform: translate(0);
  }
  21%, 62% {
    transform: translate(2px, -1px);
  }
}

/* Pulse animation for warning elements */
.pulse-warning {
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  from {
    box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 1);
  }
  to {
    box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 1), 0 0 20px rgba(220, 38, 38, 0.5);
  }
}

/* 3D flip effect for interactive elements */
.flip-3d {
  perspective: 1000px;
}

.flip-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-3d:hover .flip-3d-inner {
  transform: rotateY(10deg) rotateX(5deg);
}