/* Bachata World Council - Main CSS */

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

/* CSS Variables */
:root {
  --background: hsl(0 0% 4%);
  --foreground: hsl(45 100% 87%);
  --card: hsl(0 0% 10%);
  --card-foreground: hsl(45 100% 87%);
  --popover: hsl(0 0% 8%);
  --popover-foreground: hsl(45 100% 87%);
  --primary: #EBAE19;
  --primary-foreground: hsl(0 0% 6%);
  --secondary: hsl(0 0% 16%);
  --secondary-foreground: hsl(45 100% 87%);
  --muted: hsl(0 0% 16%);
  --muted-foreground: hsl(45 20% 65%);
  --accent: #EBAE19;
  --accent-foreground: hsl(0 0% 6%);
  --destructive: hsl(0 63% 50%);
  --destructive-foreground: hsl(0 0% 98%);
  --border: hsl(0 0% 20%);
  --input: hsl(0 0% 16%);
  --ring: #EBAE19;
  --chart-1: #EBAE19;
  --chart-2: hsl(159 100% 36%);
  --chart-3: hsl(42 93% 56%);
  --chart-4: hsl(147 79% 42%);
  --chart-5: hsl(341 75% 51%);
  --sidebar: hsl(0 0% 10%);
  --sidebar-foreground: hsl(45 100% 87%);
  --sidebar-primary: #EBAE19;
  --sidebar-primary-foreground: hsl(0 0% 6%);
  --sidebar-accent: #EBAE19;
  --sidebar-accent-foreground: hsl(0 0% 6%);
  --sidebar-border: hsl(0 0% 20%);
  --sidebar-ring: #EBAE19;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --spacing: 0.25rem;
}

/* Force dark theme for entire application */
html, body {
  background-color: hsl(0 0% 4%) !important;
  color: hsl(45 100% 87%) !important;
}

/* Override any white or light backgrounds */
.bg-white, .bg-gray-50, .bg-gray-100, .bg-gray-200 {
  background-color: hsl(0 0% 10%) !important;
}

/* Ensure all text is visible on dark background */
.text-black, .text-gray-900, .text-gray-800 {
  color: hsl(45 100% 87%) !important;
}

/* Force dark theme on all cards */
.bg-card {
  background-color: hsl(0 0% 10%) !important;
  border-color: hsl(0 0% 20%) !important;
}

/* Force dark theme on form elements */
input, textarea, select {
  background-color: hsl(0 0% 16%) !important;
  border-color: hsl(0 0% 20%) !important;
  color: hsl(45 100% 87%) !important;
}

/* Force dark theme on buttons */
button, .btn {
  background-color: #EBAE19 !important;
  color: hsl(0 0% 6%) !important;
  border-color: #EBAE19 !important;
}

/* Global rounded corners for all dashboard buttons/CTA links */
button,
.btn,
input[type="button"],
input[type="submit"],
input[type="reset"],
a[class*="bg-"],
button[class*="bg-"],
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-muted,
.btn-ghost {
  border-radius: 12px !important;
}

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

*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  color: var(--foreground);
  background-color: var(--background);
  font-feature-settings: "rlig" 1, "calt" 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

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

th {
  font-weight: 600;
  background-color: var(--muted);
  color: var(--muted-foreground);
}

/* Form elements */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Focus styles */
:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

.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-4xl { font-size: 2.25rem; }

/* Custom utility classes */
.gradient-gold {
  background: linear-gradient(135deg, #FFD700, #B8860B);
}

.text-gradient-gold {
  background: linear-gradient(135deg, #FFD700, #B8860B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.scroll-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-hidden::-webkit-scrollbar {
  display: none;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Animation classes */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Grid system */
.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)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.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; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.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; }

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

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

.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.ml-64 { margin-left: 16rem; }

.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }

/* Width and height */
.w-2 { width: 0.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-64 { width: 16rem; }
.w-full { width: 100%; }
.w-auto { width: auto; }

.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-full { height: 100%; }
.h-auto { height: auto; }

/* Border radius */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

/* Border */
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-r { border-right: 1px solid var(--border); }

/* Background colors */
.bg-background { background-color: var(--background); }
.bg-card { background-color: var(--card); }
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: transparent; }
.bg-muted { background-color: var(--muted); }
.bg-accent { background-color: var(--accent); }
.bg-destructive { background-color: var(--destructive); }

.bg-primary\/10 { background-color: rgba(255, 215, 0, 0.1); }
.bg-secondary\/50 { background-color: rgba(22, 22, 22, 0.5); }

/* Text colors */
.text-foreground { color: var(--foreground); }
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-secondary-foreground { color: var(--secondary-foreground); }
.text-accent-foreground { color: var(--accent-foreground); }
.text-destructive-foreground { color: var(--destructive-foreground); }

.text-green-400 { color: #4ade80; }
.text-red-400 { color: #f87171; }
.text-yellow-400 { color: #facc15; }
.text-blue-400 { color: #60a5fa; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.top-1\/2 { top: 50%; }
.left-3 { left: 0.75rem; }
.-translate-y-1\/2 { transform: translateY(-50%); }

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

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

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

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Transition */
.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease; }

/* Hover states */
.hover\:bg-primary\/90:hover { background-color: rgba(255, 215, 0, 0.9); }
.hover\:bg-secondary:hover { background-color: var(--secondary); }
.hover\:bg-secondary\/50:hover { background-color: rgba(22, 22, 22, 0.5); }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-foreground:hover { color: var(--foreground); }

/* Focus states */
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--ring); }

/* Responsive design */
@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)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:mt-0 { margin-top: 0; }
}

@media (min-width: 1024px) {
  .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\:col-span-2 { grid-column: span 2 / span 2; }
}

/* Live indicator */
.live-indicator {
  position: relative;
}

.live-indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -12px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: pulse 2s infinite;
}

/* Loading overlay */
#loading-overlay {
  background-color: rgba(4, 4, 4, 0.8);
  backdrop-filter: blur(4px);
}

/* Notification styles */
.notification {
  background-color: var(--card);
  border: 1px solid var(--border);
  color: var(--card-foreground);
}

.notification-success {
  border-color: #4ade80;
}

.notification-error {
  border-color: #f87171;
}

.notification-warning {
  border-color: #facc15;
}

.notification-info {
  border-color: #60a5fa;
}

/* Card styles */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--card-foreground);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

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

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

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

.btn-primary:hover:not(:disabled) {
  background-color: rgba(255, 215, 0, 0.9);
}

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

.btn-secondary:hover:not(:disabled) {
  background-color: rgba(22, 22, 22, 0.9);
}

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

.btn-accent:hover:not(:disabled) {
  background-color: rgba(255, 193, 7, 0.9);
}

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

.btn-muted:hover:not(:disabled) {
  background-color: rgba(22, 22, 22, 0.9);
}

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

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

/* Form input styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background-color: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

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

input::placeholder,
textarea::placeholder {
  color: var(--muted-foreground);
}

/* Avatar styles */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--muted);
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-default {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

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

/* Layout styles */
.min-h-screen {
  min-height: 100vh;
}

.flex-1 {
  flex: 1 1 0%;
}

/* Gradient backgrounds */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-background {
  --tw-gradient-from: var(--background);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(4, 4, 4, 0));
}

.via-card {
  --tw-gradient-stops: var(--tw-gradient-from), var(--card), var(--tw-gradient-to, rgba(10, 10, 10, 0));
}

.to-secondary {
  --tw-gradient-to: var(--secondary);
}

/* Transform utilities */
.transform {
  transform: translateX(var(--tw-translate-x, 0)) translateY(var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1));
}

.translate-x-full {
  --tw-translate-x: 100%;
}

.translate-y-1\/2 {
  --tw-translate-y: 50%;
}

.-translate-y-1\/2 {
  --tw-translate-y: -50%;
}

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

.max-w-sm {
  max-width: 24rem;
}

/* Margin auto */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Padding specific */
.pl-10 {
  padding-left: 2.5rem;
}

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

/* Text specific */
.capitalize {
  text-transform: capitalize;
}

/* Flex specific */
.flex-shrink-0 {
  flex-shrink: 0;
}

.flex-1 {
  flex: 1 1 0%;
}

/* Position specific */
.-top-1 {
  top: -0.25rem;
}

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

/* Width specific */
.w-5 {
  width: 1.25rem;
}

.h-5 {
  height: 1.25rem;
}

/* Text size specific */
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

/* Justify specific */
.justify-start {
  justify-content: flex-start;
}

/* Additional utility classes */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

.bg-background\/80 {
  background-color: rgba(4, 4, 4, 0.8);
}

/* Animation utilities */
.duration-300 {
  transition-duration: 300ms;
}

.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Additional responsive utilities */
@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Additional spacing */
.pt-4 {
  padding-top: 1rem;
}

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

/* Additional text utilities */
.text-justify {
  text-align: justify;
}

/* Additional border utilities */
.border-t {
  border-top-width: 1px;
}

/* Additional background utilities */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-card {
  --tw-gradient-from: var(--card);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(10, 10, 10, 0));
}

.to-secondary\/20 {
  --tw-gradient-to: rgba(22, 22, 22, 0.2);
}
