:root {
  --bg-dark: #0a0d14;
  --card-bg: rgba(18, 24, 38, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary: #3b82f6;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --accent-cyan: #06b6d4;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --success: #10b981;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Glow Effects */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
}
.bg-glow-1 {
  width: 450px;
  height: 450px;
  background: #3b82f6;
  top: -100px;
  left: -100px;
}
.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: #8b5cf6;
  bottom: 0;
  right: -100px;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-badge {
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
}
.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-text span {
  color: var(--primary);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.green {
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
}
.server-ip {
  color: var(--text-main);
  font-weight: 600;
}

/* Hero */
.hero {
  text-align: center;
  padding: 40px 0 30px;
}
.hero-title {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}
.hero-title span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Cards & Glassmorphism */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.margin-top {
  margin-top: 30px;
}

/* Protocol Grid Cards */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.protocol-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
}
.protocol-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.protocol-card.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}
.proto-icon {
  font-size: 1.8rem;
}
.proto-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
}
.proto-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Form Styling */
.vpn-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.form-group input,
.form-group select {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
}

/* Buttons */
.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s ease-in-out infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Result Card */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.result-title {
  font-size: 1.2rem;
  color: var(--success);
}
.protocol-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
}
.result-row span:first-child {
  color: var(--text-muted);
}
.result-row span:last-child {
  color: var(--text-main);
  font-weight: 600;
}

.config-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: #a7f3d0;
  margin: 14px 0;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #10b981;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
}
.toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.hidden {
  display: none !important;
}

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