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

body {
  background: #000;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

#root {
  width: 100%;
  height: 100%;
}

.scene-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.subtitle {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 20px rgba(100, 180, 255, 0.8),
    0 0 40px rgba(100, 180, 255, 0.4),
    0 0 80px rgba(100, 180, 255, 0.2);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: fadeInUp 2s ease-out;
}

.subtitle-line {
  display: block;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.8em;
  color: rgba(150, 200, 255, 0.6);
  margin-top: 0.5rem;
  font-family: 'Rajdhani', sans-serif;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(30px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.login-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  pointer-events: all;
  z-index: 20;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(100, 180, 255, 0.3);
  color: rgba(200, 220, 255, 0.8);
  padding: 10px 24px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.login-btn:hover {
  background: rgba(100, 180, 255, 0.15);
  border-color: rgba(100, 180, 255, 0.6);
  color: #fff;
  box-shadow: 0 0 20px rgba(100, 180, 255, 0.2);
}

/* Login Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: all;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.login-form {
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid rgba(100, 180, 255, 0.2);
  border-radius: 8px;
  padding: 40px;
  width: 380px;
  box-shadow: 0 0 60px rgba(0, 50, 150, 0.3);
}

.login-form h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  color: rgba(150, 200, 255, 0.9);
  margin-bottom: 30px;
  text-align: center;
  letter-spacing: 0.2em;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(150, 200, 255, 0.5);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(100, 180, 255, 0.15);
  border-radius: 4px;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  border-color: rgba(100, 180, 255, 0.5);
}

.login-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, rgba(30, 80, 180, 0.6), rgba(60, 120, 220, 0.4));
  border: 1px solid rgba(100, 180, 255, 0.3);
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.login-submit:hover {
  background: linear-gradient(135deg, rgba(40, 100, 200, 0.8), rgba(80, 140, 240, 0.6));
  box-shadow: 0 0 30px rgba(100, 180, 255, 0.2);
}

.login-cancel {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.login-cancel:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.error-msg {
  color: #ff6b6b;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 15px;
}

/* Dashboard */
.dashboard {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1525 50%, #0a1020 100%);
  z-index: 200;
  overflow: auto;
  animation: fadeIn 0.3s ease;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  border-bottom: 1px solid rgba(100, 180, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.dash-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  color: rgba(150, 200, 255, 0.8);
  letter-spacing: 0.2em;
}

.dash-header .user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.dash-header .user-name {
  font-size: 0.85rem;
  color: rgba(200, 220, 255, 0.6);
}

.logout-btn {
  background: rgba(255, 100, 100, 0.1);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: rgba(255, 150, 150, 0.8);
  padding: 6px 16px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 100, 100, 0.2);
  color: #fff;
}

.dash-content {
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.dash-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(100, 180, 255, 0.1);
  padding-bottom: 0;
}

.dash-tab {
  background: transparent;
  border: none;
  color: rgba(200, 220, 255, 0.4);
  padding: 10px 20px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.dash-tab:hover {
  color: rgba(200, 220, 255, 0.7);
}

.dash-tab.active {
  color: rgba(100, 180, 255, 0.9);
  border-bottom-color: rgba(100, 180, 255, 0.6);
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(100, 180, 255, 0.08);
  border-radius: 6px;
  padding: 25px;
  margin-bottom: 20px;
}

.card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: rgba(150, 200, 255, 0.7);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(150, 200, 255, 0.4);
  padding: 8px 12px;
  border-bottom: 1px solid rgba(100, 180, 255, 0.1);
}

table td {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: rgba(220, 230, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

table tr:hover td {
  background: rgba(100, 180, 255, 0.03);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  margin: 2px 3px;
}

.badge-group {
  background: rgba(100, 180, 255, 0.15);
  color: rgba(150, 200, 255, 0.9);
  border: 1px solid rgba(100, 180, 255, 0.2);
}

.badge-site {
  background: rgba(100, 255, 180, 0.1);
  color: rgba(150, 255, 200, 0.9);
  border: 1px solid rgba(100, 255, 180, 0.2);
}

.badge-2fa {
  background: rgba(255, 200, 50, 0.15);
  color: rgba(255, 220, 100, 0.9);
  border: 1px solid rgba(255, 200, 50, 0.2);
}

.badge-no2fa {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
  background: rgba(100, 180, 255, 0.1);
  border: 1px solid rgba(100, 180, 255, 0.2);
  color: rgba(150, 200, 255, 0.8);
  padding: 4px 12px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 3px;
  margin-right: 5px;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(100, 180, 255, 0.2);
  color: #fff;
}

.action-btn.danger {
  background: rgba(255, 80, 80, 0.1);
  border-color: rgba(255, 80, 80, 0.2);
  color: rgba(255, 120, 120, 0.8);
}

.action-btn.danger:hover {
  background: rgba(255, 80, 80, 0.2);
  color: #fff;
}

.add-btn {
  background: linear-gradient(135deg, rgba(30, 80, 180, 0.4), rgba(60, 120, 220, 0.2));
  border: 1px solid rgba(100, 180, 255, 0.3);
  color: rgba(200, 220, 255, 0.9);
  padding: 8px 20px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.add-btn:hover {
  background: linear-gradient(135deg, rgba(40, 100, 200, 0.6), rgba(80, 140, 240, 0.4));
  box-shadow: 0 0 20px rgba(100, 180, 255, 0.15);
}

/* Add User Form */
.add-user-form {
  background: rgba(0, 20, 50, 0.5);
  border: 1px solid rgba(100, 180, 255, 0.15);
  border-radius: 6px;
  padding: 25px;
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(200, 220, 255, 0.7);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: rgba(100, 180, 255, 0.8);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Site Picker */
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.site-card-link {
  text-decoration: none;
  color: inherit;
}

.site-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(100, 180, 255, 0.12);
  border-radius: 8px;
  padding: 25px 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.site-card:hover {
  background: rgba(100, 180, 255, 0.08);
  border-color: rgba(100, 180, 255, 0.4);
  box-shadow: 0 0 25px rgba(100, 180, 255, 0.15);
  transform: translateY(-2px);
}

.site-card-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: rgba(200, 220, 255, 0.9);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.site-card-port {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(100, 180, 255, 0.8);
  font-family: 'Rajdhani', sans-serif;
}

.site-card-url {
  font-size: 0.75rem;
  color: rgba(150, 200, 255, 0.4);
  margin-top: 8px;
  font-family: monospace;
}

/* Analytics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(100, 180, 255, 0.08);
  border-radius: 6px;
  padding: 18px 15px;
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: rgba(100, 180, 255, 0.9);
  font-family: 'Rajdhani', sans-serif;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(200, 220, 255, 0.4);
  margin-top: 4px;
}

.analytics-row {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.analytics-row .card {
  margin-bottom: 0;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.bar-label {
  font-size: 0.8rem;
  color: rgba(200, 220, 255, 0.7);
  min-width: 80px;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: rgba(100, 180, 255, 0.6);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.bar-fill-green {
  background: rgba(100, 255, 180, 0.5);
}

.bar-fill-yellow {
  background: rgba(255, 200, 80, 0.5);
}

.bar-count {
  font-size: 0.75rem;
  color: rgba(200, 220, 255, 0.5);
  min-width: 30px;
  text-align: right;
}

@media (max-width: 900px) {
  .analytics-row { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .server-grid { grid-template-columns: 1fr !important; }
  .gauge-row { flex-wrap: wrap; }
}

/* Server Stats */
.server-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(100, 180, 255, 0.08);
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.78rem;
  color: rgba(200, 220, 255, 0.6);
}

.server-info-bar b {
  color: rgba(150, 200, 255, 0.5);
  font-weight: 500;
  margin-right: 4px;
}

.gauge-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(100, 180, 255, 0.06);
  border-radius: 6px;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stat-detail {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
}

.stat-detail span:first-child {
  color: rgba(200, 220, 255, 0.4);
}

.stat-detail span:last-child {
  color: rgba(220, 230, 255, 0.8);
  font-weight: 500;
}

.mem-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}

.mem-bar {
  height: 100%;
  background: rgba(100, 180, 255, 0.5);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.load-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.load-item {
  flex: 1;
  text-align: center;
}

.load-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(200, 220, 255, 0.9);
  font-family: 'Rajdhani', sans-serif;
}

.load-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  margin: 6px 0;
  overflow: hidden;
}

.load-bar-fill {
  height: 100%;
  background: rgba(100, 180, 255, 0.6);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.load-label {
  font-size: 0.7rem;
  color: rgba(200, 220, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* IP Detail Modal */
.ip-detail-modal {
  background: rgba(10, 14, 26, 0.97);
  border: 1px solid rgba(100, 180, 255, 0.15);
  border-radius: 14px;
  padding: 24px;
  width: 90vw;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ip-detail-modal .card {
  background: rgba(15, 20, 40, 0.6);
  border: 1px solid rgba(100, 180, 255, 0.06);
  border-radius: 10px;
  padding: 16px;
}

.ip-detail-modal table {
  font-size: 0.8rem;
}

.ip-detail-modal::-webkit-scrollbar {
  width: 6px;
}

.ip-detail-modal::-webkit-scrollbar-track {
  background: transparent;
}

.ip-detail-modal::-webkit-scrollbar-thumb {
  background: rgba(100, 180, 255, 0.15);
  border-radius: 3px;
}

