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

:root {
  --bg-deep: hsl(12, 50%, 5%);
  --surface: hsl(12, 35%, 11%);
  --surface-glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 110, 50, 0.15);
  --accent-primary: hsl(20, 100%, 55%);
  --accent-primary-rgb: 255, 102, 0;
  --accent-gold: hsl(45, 90%, 58%);
  --accent-green: hsl(145, 70%, 50%);
  --accent-red: hsl(0, 85%, 60%);
  --accent-purple: hsl(270, 70%, 65%);
  --accent-orange: hsl(30, 95%, 55%);
  --accent-blue: hsl(200, 80%, 60%);
  --text-primary: hsl(20, 30%, 96%);
  --text-secondary: hsl(20, 20%, 70%);
  --text-muted: hsl(20, 15%, 50%);

  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: all 0.2s ease;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
}
code { font-family: var(--font-mono); }
a { color: var(--accent-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-primary); }

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.grid { display: grid; gap: 1rem; }
.flex { display: flex; gap: 1rem; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.main-content { flex: 1; display: flex; flex-direction: column; }
.justify-between { justify-content: space-between; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.p-4 { padding: 1rem; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card-glass {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.card-hover:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 8px 32px rgba(var(--accent-primary-rgb), 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-gold { background: var(--accent-gold); color: #000; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-primary); }
.btn-ghost:hover { background: var(--surface-glass); border-color: var(--text-primary); }

.site-footer { margin-top: auto; padding: 2rem 0; border-top: 1px solid var(--border); background: var(--surface-glass); }
.site-footer .footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 1.5rem; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}
.badge-online { background: rgba(0,255,0,0.1); color: var(--accent-green); border: 1px solid var(--accent-green); }
.badge-prime { background: rgba(128,0,128,0.1); color: var(--accent-purple); border: 1px solid var(--accent-purple); }
.badge-danger { background: rgba(255,0,0,0.1); color: var(--accent-red); border: 1px solid var(--accent-red); }

/* Navigation */
.nav {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav .container { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { font-family: var(--font-heading); font-size: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: flex; gap: 1rem; }
.nav-link { color: var(--text-secondary); font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--text-primary); }

/* Forms */
.input, .select {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
}
.input:focus, .select:focus { outline: none; border-color: var(--accent-primary); }

/* Tables */
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th, .table td { padding: 0.75rem; border-bottom: 1px solid var(--border); }
.table th { font-family: var(--font-heading); color: var(--text-secondary); }

/* Animations */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}
.pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes skeleton-loading {
  0% { background-color: var(--surface); }
  100% { background-color: var(--border); }
}
.skeleton { animation: skeleton-loading 1s linear infinite alternate; border-radius: var(--radius); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Toast & Modal */
.toast-container { position: fixed; bottom: 1rem; right: 1rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 1000; }
.toast { background: var(--surface); border: 1px solid var(--border); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; max-width: 500px; width: 100%; }

/* Hero */
.hero {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.15) 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 4rem; margin-bottom: 1rem; background: linear-gradient(to right, var(--text-primary), var(--accent-primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Progress Bar */
.progress { background: var(--bg-deep); border: 1px solid var(--border); border-radius: 999px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent-primary); transition: width 0.3s ease; }

@media print { .nav, .footer { display: none; } }

/* User Nav Dropdown & Avatar */
.nav-toggle { display: none; } /* Hidden until mobile layout is implemented */
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-user-menu { position: relative; }
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border-radius: 9999px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.nav-user-btn:hover {
  background: var(--surface-glass);
  border-color: var(--text-secondary);
}
.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  z-index: 1000;
}
.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}
.dropdown-item:hover {
  background: var(--surface-glass);
  color: var(--accent-primary);
}
.dropdown-item-danger:hover {
  color: var(--accent-red);
}
.dropdown-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}

/* Brand Logo */
.nav-brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.footer-brand-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.5rem;
}


/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-primary-rgb), 0.8);
}


/* Form Controls */
.form-control {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
}


/* Tooltip */
.has-tooltip {
    position: relative;
    cursor: help;
}
.has-tooltip .tooltip-content {
    visibility: hidden;
    background-color: var(--surface);
    color: var(--text-primary);
    text-align: center;
    border-radius: 4px;
    padding: 0.5rem;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    border: 1px solid var(--border);
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.has-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}


/* Shard Icon */
.shard-icon {
    height: 1em;
    vertical-align: middle;
    display: inline-block;
    
    margin-bottom: 2px;
    border-radius: 50%;
}
