@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 15% 15%, rgba(255, 8, 68, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(255, 8, 68, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(0, 242, 254, 0.04) 0%, transparent 60%);
  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, #ff4444 0%, #ff8800 50%, #ffcc00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
  letter-spacing: 2px;
  filter: drop-shadow(0 0 12px rgba(255, 80, 0, 0.5));
}

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;
  box-shadow: 0 0 0 1px #000, 0 0 3px 1px rgba(0,0,0,0.6);
}

.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 Styles with animated gradient background */
.boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(-45deg, #060608, #15080c, #04100c, #060608);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s ease;
  padding: 20px;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.boot-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.05);
}

/* Logo container with scale, fade and blur animation */
.boot-logo-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 28px;
  animation: logoIntro 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

@keyframes logoIntro {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.boot-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
  animation: logoPulse 2.5s infinite ease-in-out;
}

@keyframes logoPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 18px rgba(255, 40, 0, 0.7));
  }
  50% {
    transform: scale(1.07);
    filter: drop-shadow(0 0 38px rgba(255, 80, 0, 1)) drop-shadow(0 0 60px rgba(255, 0, 0, 0.5));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 18px rgba(255, 40, 0, 0.7));
  }
}

.boot-title {
  font-family: var(--font-title);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #ff6a00 0%, #ff0844 50%, #ff4500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px rgba(255, 60, 0, 0.6));
  animation: titleGlow 3s ease-in-out infinite, fadeUpIntro 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
  opacity: 0;
}

@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 60, 0, 0.5)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 80, 0, 0.9)); }
}

.boot-subtitle {
  font-size: 0.92rem;
  opacity: 0.65;
  color: #ff9966;
  margin-bottom: 40px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: fadeUpIntro 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  opacity: 0;
}

.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;
  animation: fadeUpIntro 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
  opacity: 0;
}

.boot-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #ff0844, #ff6a00, #ffcc00);
  box-shadow: 0 0 12px #ff4400;
}

.boot-status {
  font-family: monospace;
  font-size: 0.8rem;
  color: #ff9966;
  height: 20px;
  text-align: center;
  opacity: 0.85;
  animation: fadeUpIntro 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
  opacity: 0;
}

@keyframes fadeUpIntro {
  0% {
    opacity: 0;
    transform: translateY(15px);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Page / Tab Transition effects (fade + slide right-to-left) */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateX(15px);
}

.tab-content.active {
  display: block;
  animation: tabSlideIn 0.35s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes tabSlideIn {
  0% {
    opacity: 0;
    transform: translateX(15px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Button & interactive element scale & glow effects */
.btn, .btn-primary, .btn-secondary, .btn-danger, .tab-btn, .btn-logout, .db-action-btn, button {
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease, background-color 0.25s ease, filter 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn:active, .btn-primary:active, .btn-secondary:active, .btn-danger:active, .tab-btn:active, .btn-logout:active, .db-action-btn:active, button:active {
  transform: scale(0.95) !important;
}

/* Glowing effects on hover */
.btn-primary:hover, .tab-btn.active:hover {
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.btn-danger:hover {
  box-shadow: 0 0 15px rgba(255, 8, 68, 0.5);
}

/* Data skeleton loading & shimmer effects */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.tab-loading .card {
  position: relative;
  overflow: hidden;
}

.tab-loading .card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.01) 25%, rgba(255, 255, 255, 0.06) 37%, rgba(255, 255, 255, 0.01) 63%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  z-index: 10;
  pointer-events: none;
}

.tab-loading .card > * {
  opacity: 0.25 !important;
  filter: blur(4px);
  pointer-events: none;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Shimmer styling for player preset lists when reloading */
.shimmer-row td {
  position: relative;
  overflow: hidden;
}

.shimmer-row td::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.01) 25%, rgba(255, 255, 255, 0.06) 37%, rgba(255, 255, 255, 0.01) 63%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  pointer-events: none;
}

/* --- Gaming Themes Configuration --- */
body.theme-gaming-red {
  --bg-primary: #0f0505;
  --bg-secondary: #240a0a;
  --accent-cyan: #ff0844;
  --accent-blue: #ff4e50;
  --text-muted: #ff758c;
  --border-color: rgba(255, 8, 68, 0.3);
  --glow-cyan: 0 0 15px rgba(255, 8, 68, 0.4);
}

body.theme-neon-green {
  --bg-primary: #040d06;
  --bg-secondary: #0c2612;
  --accent-cyan: #00ff88;
  --accent-blue: #00f2fe;
  --text-muted: #8cffb8;
  --border-color: rgba(0, 255, 136, 0.3);
  --glow-cyan: 0 0 15px rgba(0, 255, 136, 0.4);
}

body.theme-cyberpunk-purple {
  --bg-primary: #0a0314;
  --bg-secondary: #1f0b35;
  --accent-cyan: #a855f7;
  --accent-blue: #ec4899;
  --text-muted: #c084fc;
  --border-color: rgba(168, 85, 247, 0.3);
  --glow-cyan: 0 0 15px rgba(168, 85, 247, 0.4);
}

body.theme-dark-pro {
  --bg-primary: #0b0c10;
  --bg-secondary: #1f2833;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --text-muted: #66fcf1;
  --border-color: rgba(0, 242, 254, 0.2);
  --glow-cyan: 0 0 15px rgba(0, 242, 254, 0.3);
}

/* --- RGB Border Glow Effect --- */
@keyframes rgbGlow {
  0% { border-color: #ff0844; box-shadow: 0 0 10px rgba(255, 8, 68, 0.2); }
  33% { border-color: #00ff88; box-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
  66% { border-color: #00f2fe; box-shadow: 0 0 10px rgba(0, 242, 254, 0.2); }
  100% { border-color: #ff0844; box-shadow: 0 0 10px rgba(255, 8, 68, 0.2); }
}

.rgb-active-card {
  animation: rgbGlow 6s linear infinite !important;
}

/* --- HUD phone mockup and items styles --- */
.phone-mockup-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 15px auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 12px solid #2f3640;
  border-radius: 24px;
  padding: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  position: relative;
}

.phone-mockup-screen {
  width: 100%;
  height: 100%;
  background-color: #15161e;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 80%),
    linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
  background-size: 100% 100%, 20px 20px, 20px 20px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.hud-btn-mock {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.25);
  border: 1.5px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
  transform: translate(-50%, -50%); /* Anchor center coordinates */
}

.hud-btn-mock:hover {
  transform: translate(-50%, -50%) scale(1.15);
  background: rgba(0, 242, 254, 0.45);
  box-shadow: 0 0 15px var(--accent-cyan);
}

.hud-btn-mock.active-btn {
  background: rgba(255, 8, 68, 0.5) !important;
  border-color: #ff0844 !important;
  box-shadow: 0 0 15px #ff0844 !important;
  transform: translate(-50%, -50%) scale(1.1) !important;
}

.hud-btn-mock.weapon-switch {
  border-radius: 6px;
}

.hud-style-btn.active {
  background: var(--accent-cyan) !important;
  color: #000 !important;
  border-color: var(--accent-cyan) !important;
}

.theme-selector-btn.active {
  background: rgba(255,255,255,0.08) !important;
  border-color: var(--accent-cyan) !important;
  color: #fff !important;
}

/* --- Nickname cards styling --- */
.nickname-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 500;
  color: var(--text-bright);
}

.nickname-item-card:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

/* --- Training program cards --- */
.training-day-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.training-day-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
}

.training-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.training-day-title {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--text-bright);
}

.training-day-badge {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

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

.training-day-badge.todo {
  background: rgba(255,255,255,0.08);
  color: #c5c6c7;
  border: 1px solid rgba(255,255,255,0.15);
}

.training-day-desc {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.4;
}

/* --- Tactical map style --- */
.tactical-map-container {
  background-size: cover;
  background-position: center;
}

/* --- Switch Toggle & Chức Năng Styling --- */
.tonghop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

.opt-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.opt-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.opt-card.vip-locked {
  border-color: rgba(234, 128, 252, 0.15);
}

.opt-card.vip-locked:hover {
  border-color: rgba(234, 128, 252, 0.4);
}

.opt-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 70%;
  text-align: left;
}

.opt-title {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 6px;
}

.opt-desc {
  font-size: 0.75rem;
  opacity: 0.7;
  line-height: 1.35;
}

.opt-badge-vip {
  background: rgba(234, 128, 252, 0.12);
  border: 1px solid rgba(234, 128, 252, 0.4);
  color: #ea80fc;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
}

.opt-badge-free {
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: #00ff88;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
}

/* Toggle Switch custom */
.opt-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.opt-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.opt-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: 0.3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.opt-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #94a3b8;
  transition: 0.3s;
  border-radius: 50%;
}

.opt-toggle input:checked + .opt-slider {
  background-color: rgba(0, 255, 136, 0.12);
  border-color: #00ff88;
}

.opt-toggle input:checked + .opt-slider:before {
  transform: translateX(20px);
  background-color: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

.opt-toggle input:checked.vip-toggle + .opt-slider {
  background-color: rgba(234, 128, 252, 0.12);
  border-color: #ea80fc;
}

.opt-toggle input:checked.vip-toggle + .opt-slider:before {
  background-color: #ea80fc;
  box-shadow: 0 0 8px #ea80fc;
}

/* Console logs styling */
.console-card {
  background: #07070a;
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 12px;
  margin-top: 25px;
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.console-title {
  color: #00ff88;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-body {
  height: 150px;
  overflow-y: auto;
  background: #000;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #d1d5db;
  text-align: left;
}

.console-line {
  margin-bottom: 4px;
}

.console-line.sys {
  color: #00ff88;
}

.console-line.vip {
  color: #ea80fc;
}

.console-line.err {
  color: #ff0844;
}

/* Custom Toggle Switch Styles */
.switch-container {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-container .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: 0.3s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.switch-container .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #94a3b8;
  transition: 0.3s;
  border-radius: 50%;
}

.switch-container input:checked + .slider {
  background-color: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.switch-container input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}
