*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white-color: #ffffff;
  --white-opacity: #ffffff26;
  --opacity-border: #ffffff33;
  --black-color: #000000;
  --black-color-24: #242424;
  --gray-color: #3b3b3b;
  --light-gray: #fafafa;
  --light-opacity-5: #fafafa0d;
  --light-opacity-10: #fafafa1a;
  --light-opacity-15: #fafafa26;
  --blue: #57aade;
  --red: #de5c57;
  --green: #57de9d;
  --gold: #f1e3ba;
  --black-bg-10: #101010;
  --black-bg-15: #191919;
  --black-bg-20: #232323;
  --black-opacity-bg: #1919199e;
  --blue-bg: #57aade;
  --red-bg: #de5c57;
  --green-bg: #57de9d;
  --btn-transition:
    color 0.2s ease-in-out, opacity 0.2s ease-in-out,
    background-color 0.2s ease-in-out, width 0.2s ease-in-out;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  min-width: 365px;
  margin: auto;
  min-height: 100vh;
  background: var(--black-bg-10);
  color: var(--light-gray);
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('bg.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  z-index: -1;
}

input,
button,
textarea {
  font-family: 'Poppins', sans-serif;
}

.card {
  max-width: 492px;
  width: 100%;
  padding: 50px 32px;
  background-color: var(--black-opacity-bg);
  border-radius: 8px;
  border: 1px solid var(--light-opacity-5);
}

.card_inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.card_header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.card_title {
  font-size: 28px;
  font-weight: 600;
  color: var(--gold);
}

.card_subtitle {
  font-size: 14px;
  color: var(--light-gray);
  opacity: 0.3;
}

.form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 32px;
}

.input_block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input_group {
  width: 100%;
  position: relative;
}

.input_group + .input_group {
  margin-top: 32px;
}

.input_label {
  position: absolute;
  left: 14px;
  top: -10px;
  padding: 0 4px;
  background-color: #181a1b;
  z-index: 1;
}

.input_label_text {
  font-size: 13px;
  color: var(--light-gray);
  opacity: 0.6;
}

.input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 6px;
  border: 1px solid var(--light-opacity-15);
  color: var(--light-gray);
  font-size: 15px;
  font-weight: 500;
  background-color: transparent;
  outline: none;
  transition: border-color 0.2s ease;
}

.input:focus {
  border-color: var(--blue);
}

.input::placeholder {
  color: var(--light-gray);
  opacity: 0.2;
}

.btn {
  border: 1px solid;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white-color);
  border-color: var(--white-opacity);
  padding: 5px 14px;
  overflow: hidden;
  transition: all 0.2s ease;
  user-select: none;
  cursor: pointer;
  background: none;
  width: 100%;
}

.btn:not(.btn_disabled):active {
  transform: scale(0.95);
  opacity: 0.8;
}

.btn_blue {
  background-color: var(--blue);
  border-color: var(--opacity-border);
}

.btn_lg {
  padding: 14px 58px;
  font-size: 18px;
}

.btn_disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error {
  color: var(--red);
  font-size: 13px;
  height: 13px;
  width: 100%;
  text-align: left;
}

.user_info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info_row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info_label {
  font-size: 13px;
  color: var(--light-gray);
  opacity: 0.4;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info_value {
  font-size: 16px;
  color: var(--light-gray);
  font-weight: 400;
  word-break: break-all;
}

.info_value_empty {
  opacity: 0.3;
  font-style: italic;
}

.api_key_row {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--black-bg-15);
  border: 1px solid var(--light-opacity-10);
  border-radius: 6px;
  padding: 12px 16px;
}

.api_key_value {
  flex: 1;
  font-size: 14px;
  color: var(--light-gray);
  font-weight: 500;
  word-break: break-all;
  font-family: ui-monospace, 'SF Mono', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
}

.copy_btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--light-opacity-15);
  background-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--light-gray);
}

.copy_btn:hover {
  background-color: var(--light-opacity-5);
  border-color: var(--light-opacity-15);
}

.copy_btn:active {
  transform: scale(0.95);
}

.copy_btn svg {
  width: 18px;
  height: 18px;
}

.copy_btn.copied {
  border-color: var(--green);
  color: var(--green);
}

.logout_block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.logout_btn {
  font-size: 14px;
  color: var(--light-gray);
  opacity: 0.5;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.logout_btn:hover {
  opacity: 1;
}

.back_btn {
  font-size: 13px;
  color: var(--light-gray);
  opacity: 0.4;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.back_btn:hover {
  opacity: 0.8;
}

.back_btn:active {
  opacity: 0.6;
}

.divider {
  width: 100%;
  height: 1px;
  background-color: var(--light-opacity-10);
  margin: 8px 0;
}

.success_badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--green);
  border-radius: 6px;
  padding: 6px 14px;
  color: var(--black-bg-10);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.success_badge.visible {
  opacity: 1;
}

.card_header_logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.card_header_logo img {
  height: 32px;
  width: auto;
}

.hidden {
  display: none !important;
}

@media (max-width: 540px) {
  .card {
    padding: 32px 20px;
  }

  .card_title {
    font-size: 22px;
  }

  .btn_lg {
    padding: 14px 32px;
    font-size: 16px;
  }
}
