@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --radius: 0.5rem;
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 210 40% 98%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 212.7 26.8% 83.9%;
}

* {
  border-color: hsl(var(--border));
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: hsl(var(--foreground));
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 1rem 0;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
}

h2 {
  font-size: 1.875rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  color: hsl(var(--muted-foreground));
  margin: 0 0 1rem 0;
}

/* Cards */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  padding: 1.5rem;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  margin: 0;
}

.card-description {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  margin: 0;
}

.card-content {
  padding-top: 1rem;
}

.card-footer {
  align-items: center;
  display: flex;
  padding-top: 1rem;
}

/* Buttons */
.btn {
  align-items: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  justify-content: center;
  line-height: 1;
  padding: 0 1rem;
  position: relative;
  text-decoration: none;
  transition: all 0.2s;
  user-select: none;
  vertical-align: middle;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

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

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

.btn-primary:hover:not(:disabled) {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover:not(:disabled) {
  background-color: hsl(var(--secondary) / 0.8);
}

.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover:not(:disabled) {
  background-color: hsl(var(--destructive) / 0.9);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover:not(:disabled) {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover:not(:disabled) {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-link {
  background-color: transparent;
  color: hsl(var(--primary));
  text-decoration: underline;
}

.btn-link:hover:not(:disabled) {
  color: hsl(var(--primary) / 0.8);
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  height: 3rem;
  padding: 0 2rem;
  font-size: 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  color: hsl(var(--foreground));
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-input {
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--foreground));
  display: block;
  font-size: 0.875rem;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: hsl(var(--ring));
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-input:disabled {
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  cursor: not-allowed;
}

.form-textarea {
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--foreground));
  display: block;
  font-size: 0.875rem;
  min-height: 5rem;
  padding: 0.5rem 0.75rem;
  resize: vertical;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.form-textarea:focus {
  border-color: hsl(var(--ring));
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-select {
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--foreground));
  display: block;
  font-size: 0.875rem;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s;
  width: 100%;
}

.form-select:focus {
  border-color: hsl(var(--ring));
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-error {
  color: hsl(var(--destructive));
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-success {
  color: hsl(142 76% 36%);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Radio and Checkbox */
.form-radio {
  margin-right: 0.5rem;
}

.form-checkbox {
  margin-right: 0.5rem;
}

/* Alerts */
.alert {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  position: relative;
}

.alert-success {
  background-color: hsl(142 76% 36% / 0.1);
  border-color: hsl(142 76% 36% / 0.2);
  color: hsl(142 76% 36%);
}

.alert-destructive {
  background-color: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive) / 0.2);
  color: hsl(var(--destructive));
}

.alert-warning {
  background-color: hsl(38 92% 50% / 0.1);
  border-color: hsl(38 92% 50% / 0.2);
  color: hsl(38 92% 50%);
}

/* Tables */
.table {
  border-collapse: collapse;
  width: 100%;
}

.table th,
.table td {
  border-bottom: 1px solid hsl(var(--border));
  padding: 0.75rem;
  text-align: left;
}

.table th {
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  font-size: 0.875rem;
}

.table tbody tr:hover {
  background-color: hsl(var(--muted) / 0.5);
}

/* Lists */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  border-bottom: 1px solid hsl(var(--border));
  padding: 1rem 0;
}

.list-item:last-child {
  border-bottom: none;
}

/* Navigation */
.nav {
  align-items: center;
  display: flex;
  gap: 1rem;
  height: 4rem;
  padding: 0 1rem;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: hsl(var(--foreground));
}

.nav-links {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.nav-link {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: hsl(var(--foreground));
}

/* Layout */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

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

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

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.grid {
  display: grid;
}

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

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

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

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* Spacing */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-4 { margin: 1rem; }
.m-6 { margin: 1.5rem; }
.m-8 { margin: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* Text */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

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

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Utilities */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

/* Character count */
.char-count {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  text-align: right;
  margin-top: 0.25rem;
}

.char-count.over-limit {
  color: hsl(var(--destructive));
}

/* Copy button */
.copy-button {
  background: none;
  border: none;
  color: hsl(var(--primary));
  cursor: pointer;
  font-size: 1.125rem;
  transition: color 0.2s;
}

.copy-button:hover {
  color: hsl(var(--primary) / 0.8);
}

.copy-button.copied {
  color: hsl(142 76% 36%);
}

/* Additional utilities */
.bg-muted {
  background-color: hsl(var(--muted));
}

.text-primary {
  color: hsl(var(--primary));
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.w-full {
  width: 100%;
}

.hidden {
  display: none;
}

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

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

.px-2\.5 {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.rounded-full {
  border-radius: 9999px;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

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

.bg-blue-100 {
  background-color: rgb(219 234 254);
}

.text-blue-800 {
  color: rgb(30 64 175);
}

.bg-gray-100 {
  background-color: rgb(243 244 246);
}

.text-gray-800 {
  color: rgb(31 41 55);
}

.bg-red-100 {
  background-color: rgb(254 226 226);
}

.text-red-800 {
  color: rgb(153 27 27);
}

.bg-green-100 {
  background-color: rgb(220 252 231);
}

.text-green-800 {
  color: rgb(22 101 52);
}

.bg-orange-100 {
  background-color: rgb(255 237 213);
}

.text-orange-800 {
  color: rgb(154 52 18);
}

.overflow-x-auto {
  overflow-x: auto;
}

.p-0 {
  padding: 0;
}

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

.uppercase {
  text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .flex {
    flex-direction: column;
  }

  .nav-links {
    flex-direction: column;
    margin-left: 0;
  }
}
