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

:root {
  --bg-primary: #0b0c10;
  --bg-secondary: #1f2833;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-red: #ff0844;
  --accent-red-glow: rgba(255, 8, 68, 0.4);
  --text-main: #c5c6c7;
  --text-bright: #ffffff;
  --text-muted: #66fcf1;
  --card-bg: rgba(31, 40, 51, 0.6);
  --border-color: rgba(0, 242, 254, 0.2);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --glow-cyan: 0 0 15px rgba(0, 242, 254, 0.3);
  --glow-red: 0 0 15px rgba(255, 8, 68, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) var(--bg-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 8, 68, 0.05) 0%, transparent 40%);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

header h1 {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
  letter-spacing: 2px;
  text-shadow: 0 0 30px rgba(0, 242, 254, 0.2);
}

header p {
  font-size: 1.1rem;
  color: var(--text-main);
  opacity: 0.8;
}

/* Quick Status Stats */
.status-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--glow-cyan);
  transition: transform 0.3s ease, border-color 0.3s ease;
  backdrop-filter: blur(10px);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
}

.stat-icon {
  font-size: 2rem;
  color: var(--accent-cyan);
}

.stat-details h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-main);
  opacity: 0.6;
}

.stat-details p {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-bright);
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.tab-btn {
  background: rgba(31, 40, 51, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: 8px;
  font-family: var(--font-title);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  background: rgba(0, 242, 254, 0.1);
  color: var(--text-bright);
  border-color: var(--accent-cyan);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: var(--bg-primary);
  border-color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

/* Sections */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layout Grid */
.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

@media (max-width: 900px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 25px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-blue));
}

.card.red-indicator::before {
  background: var(--accent-red);
}

.card h2 {
  font-family: var(--font-title);
  color: var(--text-bright);
  font-size: 1.5rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

/* Inputs & Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-bright);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  background: rgba(11, 12, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 15px;
  color: var(--text-bright);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

/* Sliders */
.slider-container {
  background: rgba(11, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.slider-val {
  color: var(--accent-cyan);
  font-weight: 700;
  font-family: var(--font-title);
}

.range-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: transform 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-transform: uppercase;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 25px rgba(0, 242, 254, 0.6);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-red) 0%, #ff0844 100%);
  color: var(--text-bright);
  box-shadow: var(--glow-red);
}

.btn-danger:hover {
  box-shadow: 0 4px 25px rgba(255, 8, 68, 0.6);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Output Display Box */
.output-box {
  background: rgba(11, 12, 16, 0.9);
  border: 1px dashed var(--accent-cyan);
  border-radius: 8px;
  padding: 15px;
  font-family: monospace;
  font-size: 0.9rem;
  color: #00ff88;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 15px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Checklists & Guides */
.guide-list {
  list-style: none;
}

.guide-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
}

.guide-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--accent-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: bold;
}

/* Crosshair Preview Styling */
.crosshair-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  border-radius: 12px;
  height: 180px;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.crosshair-preview {
  position: relative;
  width: 100px;
  height: 100px;
}

/* Interactive Crosshair Elements */
.ch-part {
  position: absolute;
  background-color: var(--accent-cyan);
  transition: all 0.1s ease;
}

.ch-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.ch-top {
  width: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.ch-bottom {
  width: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.ch-left {
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.ch-right {
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

/* Canvas Trainer Style */
.trainer-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: #050508;
  border-radius: 12px;
  border: 2px solid rgba(255, 8, 68, 0.3);
  overflow: hidden;
  box-shadow: var(--glow-red);
}

.trainer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.trainer-stats {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(11, 12, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  font-family: var(--font-title);
  pointer-events: none;
}

.trainer-stats table {
  border-collapse: collapse;
}

.trainer-stats td {
  padding: 3px 10px 3px 0;
  font-size: 0.85rem;
}

.text-red {
  color: var(--accent-red);
  font-weight: bold;
}

.text-cyan {
  color: var(--accent-cyan);
  font-weight: bold;
}

/* Database Table */
.db-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.db-table th, .db-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.db-table th {
  background-color: rgba(31, 40, 51, 0.8);
  color: var(--text-bright);
  font-family: var(--font-title);
  font-weight: 600;
}

.db-table tr:hover {
  background-color: rgba(0, 242, 254, 0.03);
}

.db-table tr.custom-row {
  border-left: 3px solid var(--accent-cyan);
}

.db-action-btn {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.db-action-btn:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 20px;
  right: -300px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-left: 5px solid var(--accent-cyan);
  color: var(--text-bright);
  padding: 15px 25px;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  font-family: var(--font-title);
  font-weight: 600;
  transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  right: 20px;
}

/* Footer styling */
footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--text-main);
  opacity: 0.6;
}

/* Key Verification Screen styling */
.key-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 8, 68, 0.05) 0%, transparent 40%);
  padding: 20px;
}

.key-screen.hidden {
  display: none !important;
}

.key-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  max-width: 480px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  border-left: 4px solid var(--accent-cyan);
}

.key-header {
  text-align: center;
  margin-bottom: 25px;
}

.key-header h1 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.key-header p {
  font-size: 0.9rem;
  opacity: 0.7;
}

.key-description {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
  text-align: center;
  opacity: 0.9;
}

.key-input {
  text-align: center;
  letter-spacing: 2px;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  border-color: rgba(0, 242, 254, 0.4);
}

.key-error {
  color: var(--accent-red);
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
}

.key-footer {
  margin-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

/* Key status bar */
.key-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(31, 40, 51, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-family: var(--font-title);
  border-left: 3px solid var(--accent-cyan);
}

.btn-logout {
  background: rgba(255, 8, 68, 0.15);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--accent-red);
  color: var(--text-bright);
}

/* Admin Styles */
.admin-container {
  max-width: 800px;
  margin: 50px auto;
  padding: 20px;
}

.admin-login-card {
  max-width: 400px;
  margin: 100px auto;
  border-left: 4px solid var(--accent-blue);
}

.key-list-container {
  margin-top: 20px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  background: rgba(11, 12, 16, 0.5);
}

.key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

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

.key-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.key-badge.active {
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
  border: 1px solid #00ff88;
}

.key-badge.expired {
  background: rgba(255, 8, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

/* Boot Screen Styles */
.boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(0, 242, 254, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 8, 68, 0.03) 0%, transparent 40%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  padding: 20px;
}

.boot-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.boot-logo-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 25px;
}

.boot-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.3);
  animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 242, 254, 0.6), 0 0 20px rgba(255, 8, 68, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.3);
  }
}

.boot-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.boot-subtitle {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

.boot-loader-container {
  width: 100%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 15px;
  position: relative;
}

.boot-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 0 10px var(--accent-cyan);
}

.boot-status {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  height: 20px;
  text-align: center;
  opacity: 0.8;
}


