.header {
  position: sticky;
  top: 0;
  z-index: 100;

  width: 100%;

  background: rgba(5, 8, 22, 0.8);
  backdrop-filter: blur(20px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@scope (.header-scope) {
  .header-wrapper {
    min-height: 50px;

    margin: 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
  }

  .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    min-width: 0;
  }

  .auth-group {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .auth-group.is-hidden {
    display: none;
  }

  .auth-dropdown {
    position: absolute;
    z-index: 100;

    padding: 16px;

    background: rgba(16, 25, 46, 0.95);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    display: none;
  }

  .auth-dropdown.is-open {
    display: flex;
    flex-direction: column;
    gap: 20px;

    text-align: center;
  }

  /* =========================
     MOBILE
     ========================= */

  @media (max-width: 700px) {
    .header-wrapper {
      min-height: 50px;

      margin: 8px 10px;

      flex-wrap: wrap;
      justify-content: center;
    }

    .logo {
      flex-shrink: 0;
    }

    .header-actions {
      flex: 1;
      min-width: 0;

      justify-content: flex-end;
    }

    .auth-group {
      flex-wrap: wrap;
      justify-content: flex-end;
    }
  }

  .language-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--bg);
  }

  .language-switcher button {
    padding: 6px 10px;

    border: none;
    border-radius: 7px;

    background: transparent;

    color: #6b7280;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
      background-color 0.2s ease,
      color 0.2s ease;
  }

  .language-switcher button:hover {
    background: #f3f4f6;
  }

  .language-switcher button.active {
    background: #4f46e5;
    color: #ffffff;
  }

  /* =========================
     SMALL MOBILE
     ========================= */
  @media (max-width: 520px) {
    .header-wrapper {
      margin: 8px 10px;
      min-height: auto;

      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
    }

    .logo {
      align-self: center;
    }

    .header-actions {
      display: contents;
    }

    .coffee-donate-btn {
      justify-self: end;
      white-space: nowrap;
    }

    .auth-group {
      grid-column: 1 / -1;

      display: flex;
      justify-content: flex-end;
      align-items: center;

      gap: 8px;
    }

    .auth-group .btn-secondary,
    .auth-group .btn-danger {
      white-space: nowrap;
      padding: 9px 12px;
    }

    .auth-dropdown {
      position: absolute;
    }
  }
}
