/* ============================================
   HACKER / IT THEME - BotRental Platform
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* === CSS Variables === */
:root {
  --hk-bg-darkest: #050505;
  --hk-bg-dark: #0a0a0f;
  --hk-bg: #0d1117;
  --hk-bg-card: #161b22;
  --hk-bg-elevated: #1c2333;
  --hk-border: #30363d;
  --hk-border-hover: #58a6ff;
  --hk-text: #e6edf3;
  --hk-text-secondary: #8b949e;
  --hk-text-muted: #484f58;
  --hk-green: #00ff41;
  --hk-green-dim: #238636;
  --hk-cyan: #00d4ff;
  --hk-blue: #58a6ff;
  --hk-purple: #bc8cff;
  --hk-red: #f85149;
  --hk-yellow: #d29922;
  --hk-orange: #f0883e;
  --hk-font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --hk-font-display: 'Orbitron', 'JetBrains Mono', monospace;
}

/* === Global Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--hk-bg-darkest) !important;
  color: var(--hk-text) !important;
  font-family: var(--hk-font-mono) !important;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, 0.015) 2px,
    rgba(0, 255, 65, 0.015) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Grid background pattern */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 9998;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--hk-bg-dark); }
::-webkit-scrollbar-thumb { background: var(--hk-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--hk-green-dim); }

/* === Selection === */
::selection {
  background: rgba(0, 255, 65, 0.3);
  color: var(--hk-green);
}

/* === Links === */
a {
  color: var(--hk-cyan) !important;
  text-decoration: none;
  transition: all 0.2s;
}
a:hover {
  color: var(--hk-green) !important;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

/* === Headings === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--hk-font-display) !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* === Terminal Window Component === */
.hk-terminal {
  background: var(--hk-bg) !important;
  border: 1px solid var(--hk-border) !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 1px rgba(0, 212, 255, 0.2);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.hk-terminal:hover {
  border-color: var(--hk-border-hover) !important;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), 0 0 10px rgba(88, 166, 255, 0.15);
}

.hk-terminal-header {
  background: var(--hk-bg-card) !important;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--hk-border) !important;
  font-size: 12px;
  color: var(--hk-text-secondary);
  font-family: var(--hk-font-mono);
}
.hk-terminal-header .dots {
  display: flex;
  gap: 6px;
}
.hk-terminal-header .dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.hk-terminal-header .dots span:nth-child(1) { background: #f85149; }
.hk-terminal-header .dots span:nth-child(2) { background: #d29922; }
.hk-terminal-header .dots span:nth-child(3) { background: #3fb950; }
.hk-terminal-header .title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--hk-text-muted);
}

.hk-terminal-body {
  padding: 20px;
}

/* === Glowing Border Cards === */
.hk-card {
  background: var(--hk-bg-card) !important;
  border: 1px solid var(--hk-border) !important;
  border-radius: 8px !important;
  padding: 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.hk-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--hk-green), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.hk-card:hover {
  border-color: var(--hk-green) !important;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1), inset 0 0 20px rgba(0, 255, 65, 0.02);
  transform: translateY(-2px);
}
.hk-card:hover::before { opacity: 1; }

/* Featured card */
.hk-card-featured {
  border-color: var(--hk-cyan) !important;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1), inset 0 0 30px rgba(0, 212, 255, 0.02);
}
.hk-card-featured::before {
  background: linear-gradient(90deg, transparent, var(--hk-cyan), transparent);
  opacity: 1;
}

/* === Buttons === */
.hk-btn {
  display: inline-block;
  padding: 10px 24px;
  font-family: var(--hk-font-mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--hk-green);
  color: var(--hk-green);
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}
.hk-btn:hover {
  background: var(--hk-green);
  color: var(--hk-bg-darkest) !important;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.4), 0 0 60px rgba(0, 255, 65, 0.1);
  text-shadow: none !important;
}

.hk-btn-primary {
  background: var(--hk-green);
  color: var(--hk-bg-darkest) !important;
  border-color: var(--hk-green);
}
.hk-btn-primary:hover {
  background: transparent;
  color: var(--hk-green) !important;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

.hk-btn-cyan {
  border-color: var(--hk-cyan);
  color: var(--hk-cyan);
}
.hk-btn-cyan:hover {
  background: var(--hk-cyan);
  color: var(--hk-bg-darkest) !important;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.hk-btn-red {
  border-color: var(--hk-red);
  color: var(--hk-red);
}
.hk-btn-red:hover {
  background: var(--hk-red);
  color: var(--hk-bg-darkest) !important;
  box-shadow: 0 0 20px rgba(248, 81, 73, 0.4);
}

.hk-btn-ghost {
  border-color: var(--hk-border);
  color: var(--hk-text-secondary);
}
.hk-btn-ghost:hover {
  border-color: var(--hk-text);
  color: var(--hk-text) !important;
  background: rgba(255,255,255,0.05);
  box-shadow: none;
}

.hk-btn-sm {
  padding: 6px 14px;
  font-size: 11px;
}

.hk-btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* === Inputs === */
.hk-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--hk-font-mono);
  font-size: 13px;
  background: var(--hk-bg-dark) !important;
  border: 1px solid var(--hk-border) !important;
  border-radius: 4px;
  color: var(--hk-text) !important;
  outline: none;
  transition: all 0.2s;
}
.hk-input::placeholder {
  color: var(--hk-text-muted) !important;
}
.hk-input:focus {
  border-color: var(--hk-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 10px rgba(0, 212, 255, 0.1);
}

.hk-input-readonly {
  opacity: 0.6;
  cursor: not-allowed;
}

select.hk-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
select.hk-input option {
  background: var(--hk-bg-card);
  color: var(--hk-text);
}

textarea.hk-input {
  resize: vertical;
  min-height: 60px;
}

/* === Labels === */
.hk-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hk-text-secondary);
  margin-bottom: 6px;
}

/* === Navbar === */
.hk-navbar {
  background: rgba(13, 17, 23, 0.9) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hk-border) !important;
}

/* === Sidebar === */
.hk-sidebar {
  background: var(--hk-bg) !important;
  border-right: 1px solid var(--hk-border) !important;
}

.hk-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-family: var(--hk-font-mono);
  font-size: 12px;
  color: var(--hk-text-secondary) !important;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  text-decoration: none !important;
}
.hk-sidebar-btn:hover {
  background: rgba(0, 255, 65, 0.05);
  color: var(--hk-green) !important;
  border-color: rgba(0, 255, 65, 0.2);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}
.hk-sidebar-btn.active {
  background: rgba(0, 255, 65, 0.08);
  color: var(--hk-green) !important;
  border-color: rgba(0, 255, 65, 0.3);
  box-shadow: inset 3px 0 0 var(--hk-green);
}

/* === Tables === */
.hk-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}
.hk-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hk-text-muted) !important;
  border-bottom: 1px solid var(--hk-border) !important;
}
.hk-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5) !important;
  color: var(--hk-text-secondary);
}
.hk-table tbody tr:hover {
  background: rgba(0, 212, 255, 0.03);
}

/* === Badges === */
.hk-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
  border: 1px solid;
  font-family: var(--hk-font-mono);
}
.hk-badge-green { color: var(--hk-green); border-color: var(--hk-green); background: rgba(0, 255, 65, 0.1); }
.hk-badge-red { color: var(--hk-red); border-color: var(--hk-red); background: rgba(248, 81, 73, 0.1); }
.hk-badge-yellow { color: var(--hk-yellow); border-color: var(--hk-yellow); background: rgba(210, 153, 34, 0.1); }
.hk-badge-gray { color: var(--hk-text-muted); border-color: var(--hk-text-muted); background: rgba(72, 79, 88, 0.1); }
.hk-badge-cyan { color: var(--hk-cyan); border-color: var(--hk-cyan); background: rgba(0, 212, 255, 0.1); }
.hk-badge-blue { color: var(--hk-blue); border-color: var(--hk-blue); background: rgba(88, 166, 255, 0.1); }

/* === Toast === */
.hk-toast {
  background: var(--hk-bg-card) !important;
  border: 1px solid var(--hk-green) !important;
  color: var(--hk-green) !important;
  font-family: var(--hk-font-mono);
  font-size: 12px;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

/* === Stats Card === */
.hk-stat {
  background: var(--hk-bg-card) !important;
  border: 1px solid var(--hk-border) !important;
  border-radius: 8px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.hk-stat::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
}
.hk-stat-green::after { background: linear-gradient(90deg, var(--hk-green), transparent); }
.hk-stat-blue::after { background: linear-gradient(90deg, var(--hk-blue), transparent); }
.hk-stat-yellow::after { background: linear-gradient(90deg, var(--hk-yellow), transparent); }
.hk-stat-purple::after { background: linear-gradient(90deg, var(--hk-purple), transparent); }

/* === Animations === */
@keyframes hk-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes hk-typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes hk-glow-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 65, 0.2); }
  50% { box-shadow: 0 0 20px rgba(0, 255, 65, 0.4), 0 0 40px rgba(0, 255, 65, 0.1); }
}

@keyframes hk-scan {
  0% { top: -5%; }
  100% { top: 105%; }
}

@keyframes hk-flicker {
  0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 1; }
  20%, 21.999%, 63%, 63.999%, 65%, 69.999% { opacity: 0.33; }
}

@keyframes hk-cursor-blink {
  0%, 50% { border-right-color: var(--hk-green); }
  51%, 100% { border-right-color: transparent; }
}

.hk-cursor {
  border-right: 2px solid var(--hk-green);
  animation: hk-cursor-blink 1s step-end infinite;
  padding-right: 4px;
}

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

.hk-flicker {
  animation: hk-flicker 3s linear infinite;
}

/* === Utility Classes === */
.hk-text-green { color: var(--hk-green) !important; }
.hk-text-cyan { color: var(--hk-cyan) !important; }
.hk-text-blue { color: var(--hk-blue) !important; }
.hk-text-purple { color: var(--hk-purple) !important; }
.hk-text-red { color: var(--hk-red) !important; }
.hk-text-yellow { color: var(--hk-yellow) !important; }
.hk-text-muted { color: var(--hk-text-secondary) !important; }
.hk-text-dim { color: var(--hk-text-muted) !important; }

.hk-bg-card { background: var(--hk-bg-card) !important; }
.hk-bg-dark { background: var(--hk-bg-dark) !important; }

.hk-border { border: 1px solid var(--hk-border) !important; }

.hk-glow-green { text-shadow: 0 0 10px rgba(0, 255, 65, 0.5); }
.hk-glow-cyan { text-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }

.hk-mono { font-family: var(--hk-font-mono) !important; }
.hk-display { font-family: var(--hk-font-display) !important; }

/* Hide all default backgrounds on old classes */
.bg-white, .bg-slate-50, .bg-slate-800, .bg-slate-900, .bg-slate-100,
.bg-gradient-to-b, .bg-gradient-to-r {
  background: transparent !important;
}
.bg-slate-900\/80 {
  background: rgba(13, 17, 23, 0.9) !important;
}

/* Override text colors */
.text-slate-800, .text-slate-700 {
  color: var(--hk-text) !important;
}
.text-slate-500, .text-slate-600 {
  color: var(--hk-text-secondary) !important;
}
.text-slate-400 {
  color: var(--hk-text-secondary) !important;
}
.text-indigo-600, .text-indigo-400 {
  color: var(--hk-cyan) !important;
}

/* Override borders */
.border-slate-700, .border-slate-800, .border-slate-200, .border-slate-300, .border-slate-100 {
  border-color: var(--hk-border) !important;
}
.border-indigo-500 {
  border-color: var(--hk-green) !important;
}

/* Override rounded */
.rounded-2xl { border-radius: 8px !important; }
.rounded-xl { border-radius: 8px !important; }

/* Override shadow */
.shadow, .shadow-2xl, .shadow-lg {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 1px rgba(0, 212, 255, 0.2) !important;
}

/* Override specific background gradients */
.from-slate-900, .to-slate-800 {
  background: transparent !important;
}

/* Progress bar */
.hk-progress {
  height: 4px;
  background: var(--hk-bg-dark);
  border-radius: 2px;
  overflow: hidden;
}
.hk-progress-bar {
  height: 100%;
  background: var(--hk-green);
  border-radius: 2px;
  animation: hk-glow-pulse 1.5s ease-in-out infinite;
}

/* Error box */
.hk-error {
  background: rgba(248, 81, 73, 0.1) !important;
  border: 1px solid var(--hk-red) !important;
  color: var(--hk-red) !important;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 12px;
}

/* Info box */
.hk-info {
  background: rgba(0, 212, 255, 0.05) !important;
  border: 1px solid rgba(0, 212, 255, 0.3) !important;
  border-radius: 4px;
  padding: 16px;
}

/* Success box */
.hk-success {
  background: rgba(0, 255, 65, 0.08) !important;
  border: 1px solid var(--hk-green) !important;
  border-radius: 4px;
  padding: 16px;
}

/* Footer */
.hk-footer {
  border-top: 1px solid var(--hk-border) !important;
  color: var(--hk-text-muted) !important;
  background: var(--hk-bg-dark) !important;
}

/* Section divider */
.hk-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hk-border), transparent);
  margin: 0;
}

/* Logo text */
.hk-logo {
  font-family: var(--hk-font-display);
  font-weight: 700;
  color: var(--hk-green) !important;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
  text-decoration: none !important;
}

/* Checkbox */
input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--hk-border);
  border-radius: 2px;
  background: var(--hk-bg-dark);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}
input[type="checkbox"]:checked {
  background: var(--hk-green);
  border-color: var(--hk-green);
}
input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 2px;
  font-size: 12px;
  color: var(--hk-bg-darkest);
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  body::before,
  body::after {
    display: none !important;
  }
  .hk-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 10001 !important;
  }
  .hk-sidebar.open {
    transform: translateX(0);
  }
  .hk-sidebar-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .hk-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 10000 !important;
    pointer-events: none;
  }
  .hk-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .hk-terminal-body {
    padding: 12px;
  }
  .hk-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .hk-card {
    padding: 12px;
  }
  .hk-stat {
    padding: 4px 8px;
  }
  #mobile-menu-btn {
    position: relative;
    z-index: 10001 !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}
