/* ═══════════════════════════════════════════
   Telugu States Official — Main CSS
   Design System: Deep Green + Gold
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+Telugu:wght@400;500;600;700&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
  /* Brand Colors */
  --green-950: #051a0a;
  --green-900: #0a2e12;
  --green-800: #0f4520;
  --green-700: #1a5c2a;
  --green-600: #246b36;
  --green-500: #2e7d40;
  --green-400: #3d9b52;
  --green-300: #5ab56a;
  --green-200: #88d098;
  --green-100: #c2eaca;
  
  --gold-900: #5c3d00;
  --gold-700: #9c6800;
  --gold-500: #c9a227;
  --gold-400: #d4b045;
  --gold-300: #e0c060;
  --gold-200: #ecd488;
  --gold-100: #f5ecbe;
  
  /* UI Colors */
  --bg-primary: #060f08;
  --bg-secondary: #0a1c0e;
  --bg-card: #0d2414;
  --bg-card-hover: #102b18;
  --bg-glass: rgba(13, 36, 20, 0.85);
  --bg-overlay: rgba(6, 15, 8, 0.85);
  
  --border-subtle: rgba(201, 162, 39, 0.12);
  --border-medium: rgba(201, 162, 39, 0.25);
  --border-strong: rgba(201, 162, 39, 0.5);
  
  --text-primary: #f0ede4;
  --text-secondary: #a8c4ae;
  --text-muted: #6a9072;
  --text-gold: #c9a227;
  --text-gold-light: #e0c060;
  
  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--green-700) 0%, var(--green-500) 50%, var(--gold-700) 100%);
  --gradient-gold: linear-gradient(135deg, var(--gold-700) 0%, var(--gold-500) 50%, var(--gold-300) 100%);
  --gradient-card: linear-gradient(180deg, transparent 0%, rgba(6, 15, 8, 0.95) 100%);
  --gradient-header: linear-gradient(180deg, rgba(6, 15, 8, 0.98) 0%, rgba(10, 28, 14, 0.95) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 30px rgba(201, 162, 39, 0.15);
  --shadow-green: 0 0 30px rgba(42, 125, 64, 0.15);
  --shadow-glow: 0 0 60px rgba(201, 162, 39, 0.08);
  
  /* Blur */
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-main: 'Inter', 'Noto Sans Telugu', system-ui, sans-serif;
  --font-telugu: 'Noto Sans Telugu', sans-serif;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Z-index layers */
  --z-base: 0;
  --z-card: 10;
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--green-700); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--green-500); }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
}

a {
  color: var(--text-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--text-gold-light); }

img {
  display: block;
  max-width: 100%;
}

/* ─── Utility Classes ─── */
.text-gold { color: var(--text-gold); }
.text-green { color: var(--green-400); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.gradient-text {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition-base);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--green-900);
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(201, 162, 39, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--text-gold);
  border: 1.5px solid var(--border-medium);
}
.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Badge ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-green {
  background: rgba(42, 125, 64, 0.2);
  color: var(--green-300);
  border: 1px solid rgba(42, 125, 64, 0.3);
}

.badge-gold {
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-300);
  border: 1px solid rgba(201, 162, 39, 0.3);
}

.badge-demo {
  background: rgba(156, 104, 0, 0.2);
  color: var(--gold-300);
  border: 1px solid rgba(201, 162, 39, 0.3);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ─── Live Dot Indicator ─── */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  position: relative;
  animation: pulse-live 2s infinite;
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.3);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ─── Shimmer Skeleton ─── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Toast Notifications ─── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: all;
  max-width: 360px;
  animation: slide-in-toast var(--transition-base) forwards;
}

.toast.hide {
  animation: slide-out-toast var(--transition-base) forwards;
}

.toast.success { border-left: 3px solid var(--green-400); }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid var(--gold-500); }

@keyframes slide-in-toast {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-out-toast {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-6) 0;
}

/* ─── Section titles ─── */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--border-medium), transparent);
  border-radius: var(--radius-full);
}

/* ─── Responsive breakpoints ─── */
@media (max-width: 768px) {
  :root {
    --space-8: 1.5rem;
    --space-12: 2rem;
    --space-16: 3rem;
  }
}
