:root {
  --card-bg:           rgba(3,5,20,0.45);
  --card-border:       rgba(40,80,160,0.25);
  --card-border-hover: rgba(80,140,255,0.4);
  --halo-a:            rgba(20,50,160,0.12);
  --halo-b:            rgba(50,100,255,0.28);
  --halo-c:            rgba(15,35,110,0.10);
  --halo-d:            rgba(30,65,190,0.22);
  --text-color:        rgba(200,215,245,0.88);
  --author-color:      rgba(70,110,200,0.55);
  --logo-color:        rgba(80,120,200,0.35);
  --divider-color:     rgba(60,100,220,0.45);
  --progress-gradient: rgba(30,60,160,0.7), rgba(60,120,255,0.6), rgba(40,160,220,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #010208; overflow: hidden; }

#vanta { position: fixed; inset: 0; z-index: 0; }

.center {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
}

/* --- КАРТОЧКА С ЭФФЕКТОМ HALO --- */
.card {
  width: min(580px, 90%);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 3rem 2.8rem 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(80,130,255,0.07),
    0 40px 100px rgba(0,0,0,0.85),
    0 0 60px rgba(20,40,120,0.12);

  animation: halo-pulse 6s infinite ease-in-out;

  transition:
    transform 0.8s ease-out,
    border-color 2s ease,
    background 2s ease;
}

.card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: var(--card-border-hover);

  transition:
    transform 1s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 1s ease;
}

@keyframes halo-pulse {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.04),
      inset 0 1px 0 rgba(80,130,255,0.07),
      0 40px 100px rgba(0,0,0,0.85),
      0 0 30px var(--halo-a),
      0 0 60px var(--halo-c);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.04),
      inset 0 1px 0 rgba(80,130,255,0.07),
      0 40px 100px rgba(0,0,0,0.85),
      0 0 70px var(--halo-b),
      0 0 120px var(--halo-d);
  }
}

/* --- ТЕКСТ И ЭЛЕМЕНТЫ --- */
.logo {
  font-family: 'Inter', sans-serif;
  font-size: 9px; font-weight: 700; letter-spacing: 5px;
  text-transform: uppercase; color: var(--logo-color);
}

.divider {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--divider-color), transparent);
}

.quote-text {
  font-family: 'Georgia', serif;
  font-size: 1.35rem; line-height: 1.82;
  color: var(--text-color);
  text-align: center; width: 100%;
  height: calc(1.35rem * 1.82 * 4);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease-in-out;
  opacity: 0;
}

.quote-author {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--author-color); font-weight: 500;
  height: 1rem; transition: opacity 0.6s ease-in-out;
  opacity: 0;
}

.progress-wrap {
  width: 100%; height: 2px;
  background: rgba(255,255,255,0.04); border-radius: 2px; overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--progress-gradient));
  border-radius: 2px; width: 0%;
}

/* --- УПРАВЛЕНИЕ --- */
.controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
}

.btn {
  width: 140px; height: 40px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  background: transparent; color: rgba(255,255,255,0.25);
  font-family: 'Inter', sans-serif;
  font-size: 0.67rem; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  flex-shrink: 0;
}
.btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.18);
}
.btn:disabled { cursor: default; opacity: 0.25; }

.btn-spinner {
  display: none; width: 12px; height: 12px;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
.btn.loading .btn-label { display: none; }
.btn.loading .btn-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- ЯЗЫК --- */
.lang-toggle {
  display: flex;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  overflow: hidden;
}
.lang-btn {
  padding: 8px 14px;
  background: transparent; color: rgba(255,255,255,0.2);
  font-family: 'Inter', sans-serif; font-size: 0.62rem; font-weight: 700;
  border: none; cursor: pointer; transition: 0.2s;
}
.lang-btn.active { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55); }
.lang-sep { width: 1px; background: rgba(255,255,255,0.08); }

/* --- ЗАГРУЗКА --- */
.loading .quote-text {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}