/* ── LANGUAGE SWITCHER ── */
  .lang-switcher {
    position: fixed;
    right: 30px;
    top: 35.4%;
    transform: translateY(-50%);
    z-index: 1000;
  }

  /* The circular toggle button */
  .lang-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18), 0 0 0 3px #e53e3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #1a2e4a;
    position: relative;
    transition: box-shadow 0.2s, transform 0.2s;
    outline: none;
  }

  .lang-btn:hover {
    box-shadow: 0 4px 20px rgba(229,62,62,0.35), 0 0 0 3px #e53e3e;
    transform: scale(1.08);
  }

  .lang-btn:active {
    transform: scale(0.96);
  }

  /* The two script labels inside the button */
  .lang-btn .scripts {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    gap: 1px;
    pointer-events: none;
    transition: opacity 0.2s;
  }

  .lang-btn .devanagari {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 0.9rem;
    color: #e53e3e;
  }

  .lang-btn .latin {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.85rem;
    color: #1a2e4a;
  }

  .lang-btn .divider {
    width: 18px;
    height: 1.5px;
    background: #cbd5e0;
    border-radius: 2px;
  }

  /* Active language highlight */
  .lang-btn[data-active="hi"] .devanagari { color: #e53e3e; font-weight: 900; }
  .lang-btn[data-active="hi"] .latin      { color: #a0aec0; font-weight: 400; }
  .lang-btn[data-active="en"] .latin      { color: #1a2e4a; font-weight: 900; }
  .lang-btn[data-active="en"] .devanagari { color: #cbd5e0; font-weight: 400; }

  /* Dropdown panel */
  .lang-panel {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s cubic-bezier(.4,0,.2,1), opacity 0.18s;
  }

  .lang-panel.open {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: all;
  }

  /* Individual language option */
  .lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 0.92rem;
    color: #2d3748;
    transition: background 0.15s, color 0.15s;
    text-align: left;
    width: 100%;
  }

  .lang-option:hover {
    background: #fff5f5;
    color: #e53e3e;
  }

  .lang-option.selected {
    background: #fff5f5;
    color: #e53e3e;
    font-weight: 700;
  }

  .lang-option .flag {
    font-size: 1.2rem;
    line-height: 1;
  }

  .lang-option .name {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
  }

  .lang-option .name span:last-child {
    font-size: 0.75rem;
    color: #a0aec0;
    font-weight: 400;
  }

  .lang-option.selected .name span:last-child {
    color: #fc8181;
  }

  /* Tooltip arrow */
  .lang-panel::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-right: none;
    border-left-color: #fff;
    filter: drop-shadow(2px 0 4px rgba(0,0,0,0.06));
  }

  /* Animated ring on switch */
  @keyframes ring-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(229,62,62,0.5), 0 0 0 3px #e53e3e; }
    60%  { box-shadow: 0 0 0 10px rgba(229,62,62,0), 0 0 0 3px #e53e3e; }
    100% { box-shadow: 0 2px 12px rgba(0,0,0,0.18), 0 0 0 3px #e53e3e; }
  }

  .lang-btn.pulse {
    animation: ring-pulse 0.45s ease-out forwards;
  }
