:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: var(--font-primary);
  background: #f8f9fa;
  min-height: 100vh;
}

/* Hero Section */
.clash-converter-hero {
  background: linear-gradient(180deg, rgba(249,250,251,1) 65%, rgba(224,242,254,0.6) 100%);
}

.badge-tools {
  background: linear-gradient(100deg, #2563eb 60%, #10b981 120%);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 12px 0 rgba(59,130,246,0.10);
}

/* Card */
.clash-converter-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.clash-converter-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Form & Input */
.form-control {
  border-radius: 12px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}
.form-control:focus {
  border-color: #4285f4;
  box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
}
#vpnLinks {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 150px;
}

/* Button Style */
.btn {
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: #4285f4;
  border: none;
  color: #fff;
  padding: 12px 24px;
  font-size: 1.1rem;
}
.btn-primary:hover {
  background: #3367d6;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}
.btn-outline-success {
  border-color: #20c997;
  color: #20c997;
}
.btn-outline-success:hover {
  background: #20c997;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(32, 201, 151, 0.3);
}
.btn-outline-info {
  border-color: #17a2b8;
  color: #17a2b8;
}
.btn-outline-info:hover {
  background: #17a2b8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

/* Switch Custom */
.form-switch .form-check-input {
  width: 3em;
  height: 1.6em;
  border-radius: 2em;
  background-color: #dee2e6;
  border: none;
  transition: all 0.3s ease;
}
.form-switch .form-check-input:checked {
  background: #4285f4;
  border-color: #4285f4;
}
.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
}

/* YAML Output */
.result-yaml {
  background: #f5f6fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1.3em 1.3em 1.1em 1.3em;
  font-family: 'JetBrains Mono', 'Fira Mono', 'Space Grotesk', monospace;
  font-size: 1.03em;
  line-height: 1.4;
  max-height: 400px;
  min-height: 130px;
  box-shadow: 0 2px 24px 0 rgba(59,130,246,0.07);
  margin-bottom: 1.1em;
  white-space: pre;
  word-break: break-all;
  overflow-x: auto;
  position: relative;
}
.result-yaml::before {
  content: 'Output';
  position: absolute;
  top: -1.5px;
  left: 15px;
  background: white;
  padding: 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  font-family: var(--font-primary);
}

/* Actions */
.yaml-actions {
  background: rgba(66, 133, 244, 0.05);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(66, 133, 244, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.yaml-actions .btn {
  border-radius: 1.5em;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: 0 2px 8px 0 rgba(40,70,160,0.05);
  transition: box-shadow .17s, background .17s;
}
.yaml-actions .btn:hover, .yaml-actions .btn:focus {
  box-shadow: 0 2px 14px 0 rgba(40,70,160,0.10);
}

/* Badge Custom */
.badge {
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Error Section */
.error-list {
  background: rgba(220, 53, 69, 0.05);
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 12px;
  padding: 15px;
  margin-top: 15px;
  color: #d94d4d;
  font-size: 1.01em;
}

/* Tips Section */
.tips-section {
  background: rgba(255, 193, 7, 0.1);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 193, 7, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .clash-converter-hero {
    padding: 3rem 0;
  }
  .display-5 {
    font-size: 2rem;
  }
  .lead {
    font-size: 1rem;
  }
  .clash-converter-card {
    margin: 0 10px;
  }
  .yaml-actions {
    flex-direction: column;
    gap: 10px;
  }
  .yaml-actions .btn {
    width: 100%;
  }
}
@media (max-width: 600px) {
  .clash-converter-card {
    padding: 1.2em 0.7em;
  }
  .result-yaml {
    padding: 1em 0.6em;
    font-size: 0.95em;
  }
  textarea.form-control {
    font-size: .97em;
    padding: .95em .7em;
  }
}
