/* ============================================
   BummyVPN — iOS Liquid Glass Style
   ============================================ */

:root {
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(108, 92, 231, 0.08);
  --blur: 24px;
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --success: #00B894;
  --error: #FF6B6B;
  --text: #2D3436;
  --text-secondary: #636E72;
  --bg-start: #F0EFFF;
  --bg-end: #E8F4FD;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 50%, #FDF2F8 100%);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Animated background blobs
   ============================================ */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.35), transparent 70%);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(162, 155, 254, 0.3), transparent 70%);
  bottom: -50px;
  left: -80px;
  animation-delay: -5s;
  animation-duration: 25s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 184, 148, 0.2), transparent 70%);
  top: 40%;
  left: 50%;
  animation-delay: -10s;
  animation-duration: 22s;
}

.blob-4 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(253, 203, 110, 0.2), transparent 70%);
  top: 20%;
  right: 20%;
  animation-delay: -15s;
  animation-duration: 28s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 30px) scale(1.03); }
}

/* ============================================
   App layout
   ============================================ */
.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.header {
  width: 100%;
  max-width: 480px;
  padding: 28px 0 12px;
  display: flex;
  justify-content: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* ============================================
   Glass card
   ============================================ */
.main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  padding-top: 24px;
  padding-bottom: 40px;
}

.glass-card {
  width: 100%;
  max-width: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--glass-shadow);
  animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.card-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--text);
}

.card-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 28px;
}

/* ============================================
   Form
   ============================================ */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding-left: 4px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  opacity: 0.5;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 42px;
  border: 1.5px solid rgba(108, 92, 231, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: all 0.25s ease;
}

.input-wrapper input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.input-wrapper input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.input-hint {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
  padding-left: 4px;
}

/* ============================================
   Primary button
   ============================================ */
.btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.35);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-text, .btn-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Error message
   ============================================ */
.error-message {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  animation: shakeIn 0.5s ease;
}

@keyframes shakeIn {
  0% { transform: translateX(-8px); opacity: 0; }
  25% { transform: translateX(6px); }
  50% { transform: translateX(-4px); }
  75% { transform: translateX(2px); }
  100% { transform: translateX(0); opacity: 1; }
}

/* ============================================
   Success state
   ============================================ */
.success-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--success), #55EFC4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-icon svg {
  width: 32px;
  height: 32px;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* Subscription link copy */
.sub-link-box {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid rgba(108, 92, 231, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'Inter', monospace;
  font-size: 13px;
  color: var(--text);
  outline: none;
  cursor: text;
  min-width: 0;
}

.btn-copy {
  padding: 12px 16px;
  border: 1.5px solid rgba(108, 92, 231, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-copy.copied {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

/* Instructions */
.instructions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(108, 92, 231, 0.1);
}

.instructions h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  width: 100%;
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 520px) {
  .glass-card {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .card-title {
    font-size: 24px;
  }

  .blob {
    filter: blur(60px);
    opacity: 0.35;
  }

  .blob-1 { width: 250px; height: 250px; }
  .blob-2 { width: 200px; height: 200px; }
  .blob-3 { width: 180px; height: 180px; }
  .blob-4 { width: 150px; height: 150px; }
}

/* ============================================
   Selection & scrollbar
   ============================================ */
::selection {
  background: rgba(108, 92, 231, 0.2);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.2);
  border-radius: 3px;
}
