:root {
  --bg-color: #0c091f;
  --card-bg: rgba(20, 15, 42, 0.65);
  --card-border: rgba(192, 132, 252, 0.15);
  --primary-color: #d8b4fe; /* Glowing Violet */
  --primary-glow: rgba(192, 132, 252, 0.3);
  --accent-color: #38bdf8; /* Ice Blue */
  --accent-glow: rgba(56, 189, 248, 0.3);
  --text-primary: #f3f4f6;
  --text-secondary: #c084fc;
  --text-muted: #8b5cf6;
  --status-online: #38bdf8;
  
  --font-sans: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 10px;
}

/* Digital Grid Background */
.background-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background-image: 
    linear-gradient(rgba(192, 132, 252, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 132, 252, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: 
    radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(56, 189, 248, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.app-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5px;
  border-bottom: 1px solid rgba(192, 132, 252, 0.1);
  padding-bottom: 15px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}

.logo-dot {
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-glow);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 5px 12px;
  border-radius: 4px;
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  background-color: var(--status-online);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--status-online);
  animation: pulse-blue 2s infinite;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--status-online);
  letter-spacing: 0.1em;
  font-weight: bold;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px; /* Sharper cyber look */
  padding: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  position: relative;
}

/* Cyber card corner accents */
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--accent-color);
  border-left: 2px solid var(--accent-color);
}

.card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--primary-color);
  border-right: 2px solid var(--primary-color);
}

/* Status Card */
.status-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hologram-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#hologramCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.vpn-toggle-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, #171133 0%, #06040d 100%);
  border: 1px solid var(--primary-color);
  box-shadow: 0 0 15px var(--primary-glow);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.vpn-toggle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--primary-color);
}

.vpn-toggle-btn.active {
  background: radial-gradient(circle, var(--primary-color) 0%, var(--accent-color) 100%);
  border-color: #fff;
  box-shadow: 0 0 30px var(--accent-color), inset 0 0 10px rgba(255,255,255,0.5);
}

.vpn-toggle-btn .power-icon {
  font-size: 28px;
  color: var(--text-primary);
  filter: drop-shadow(0 0 5px #fff);
  transition: transform 0.3s ease;
}

.vpn-toggle-btn.active .power-icon {
  transform: rotate(180deg);
  color: #0c091f;
  filter: none;
}

.connection-state {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.connection-state.active {
  color: var(--accent-color);
  text-shadow: 0 0 15px var(--accent-glow);
}

.connection-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Console Terminal Card */
.terminal-card {
  padding: 16px;
  background-color: rgba(6, 5, 13, 0.9);
  border-color: rgba(56, 189, 248, 0.2);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  padding-bottom: 8px;
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.terminal-dot.red { background-color: #ef4444; }
.terminal-dot.yellow { background-color: #eab308; }
.terminal-dot.green { background-color: #22c55e; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-color);
  letter-spacing: 0.05em;
  margin-left: 6px;
}

.terminal-body {
  min-height: 50px;
  max-height: 120px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-color);
  line-height: 1.6;
  text-shadow: 0 0 5px rgba(56, 189, 248, 0.35);
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-all;
}

/* Action Card */
.section-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  color: var(--text-primary);
  border-left: 2px solid var(--accent-color);
  padding-left: 10px;
  text-transform: uppercase;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #0b0a1a;
  border: none;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background-color: #f3e8ff;
  box-shadow: 0 4px 20px rgba(192, 132, 252, 0.6);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.btn-secondary:hover {
  background-color: rgba(192, 132, 252, 0.08);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* QR Code */
.qr-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed rgba(192, 132, 252, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: slide-down 0.3s ease-out;
}

.qr-box {
  background-color: #fff;
  padding: 16px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.qr-instructions {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  max-width: 280px;
  line-height: 1.4;
}

/* Stats Card */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(192, 132, 252, 0.05);
  padding: 15px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-item.span-2 {
  grid-column: span 2;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-color);
}

/* Guide Card */
.setup-steps {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.setup-steps li::marker {
  color: var(--accent-color);
  font-weight: bold;
}

.setup-steps strong {
  color: var(--text-primary);
}

/* Footer */
.app-footer {
  text-align: center;
  font-size: 11px;
  color: rgba(192, 132, 252, 0.2);
  padding: 10px 0;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes pulse-blue {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  }
}

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