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

body {
  min-height: 100vh;
  background: linear-gradient(160deg, #0b0f14, #05070a);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: #eafcff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ==================== AUTH OVERLAY ==================== */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.4s ease;
}

.auth-modal {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(30px);
  border-radius: 28px;
  border: 1px solid rgba(78, 252, 255, 0.15);
  box-shadow: 
    0 0 0 1px rgba(78, 252, 255, 0.1),
    0 40px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-header {
  text-align: center;
  padding: 40px 32px 24px;
  background: linear-gradient(180deg, rgba(78, 252, 255, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-logo {
  font-size: 56px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.auth-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #4efcff, #63d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  font-size: 14px;
  opacity: 0.7;
  letter-spacing: 0.2px;
}

.auth-body {
  padding: 32px;
}

.auth-body input {
  width: 100%;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eafcff;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.auth-body input:focus {
  border-color: #4efcff;
  box-shadow: 0 0 0 3px rgba(78, 252, 255, 0.15);
  background: rgba(0, 0, 0, 0.6);
}

.auth-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-bottom: 16px;
  min-height: 20px;
  padding: 0 4px;
}

/* ==================== TELEGRAM VERIFICATION BOX ==================== */
.telegram-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(78, 252, 255, 0.2);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  animation: slideUpTelegram 0.4s ease;
}

@keyframes slideUpTelegram {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.telegram-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.telegram-icon {
  font-size: 24px;
}

.telegram-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #4efcff;
  margin: 0;
}

.telegram-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.telegram-instruction {
  font-size: 13px;
  opacity: 0.8;
  margin: 0;
}

.telegram-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(78, 252, 255, 0.08);
  border: 1px solid rgba(78, 252, 255, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
}

.telegram-code-box code {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  color: #4efcff;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.bind-code {
  color: #fff;
  font-weight: 700;
  background: rgba(78, 252, 255, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

.copy-btn {
  background: rgba(78, 252, 255, 0.15);
  border: 1px solid rgba(78, 252, 255, 0.3);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.copy-btn:hover {
  background: rgba(78, 252, 255, 0.25);
  transform: scale(1.05);
}

.copy-icon {
  font-size: 16px;
}

.telegram-hint {
  font-size: 12px;
  opacity: 0.65;
  line-height: 1.5;
  margin: 0;
  text-align: center;
}

.telegram-open-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4efcff, #63d9ff);
  color: #002b2e;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(78, 252, 255, 0.3);
}

.telegram-open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(78, 252, 255, 0.4);
}

.arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
}

.telegram-open-btn:hover .arrow {
  transform: translateX(3px);
}

.telegram-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: rgba(78, 252, 255, 0.05);
  border-radius: 10px;
  border: 1px dashed rgba(78, 252, 255, 0.2);
}

.waiting-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(78, 252, 255, 0.2);
  border-top-color: #4efcff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.telegram-waiting p {
  font-size: 13px;
  opacity: 0.7;
  margin: 0;
}

/* ==================== AUTH BUTTON ==================== */
.auth-body button {
  width: 100%;
  padding: 18px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #002b2e;
  background: linear-gradient(135deg, #4efcff, #63d9ff);
  box-shadow: 0 12px 40px rgba(78, 252, 255, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-body button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(78, 252, 255, 0.5);
}

.auth-body button:active {
  transform: translateY(0);
}

.auth-footer {
  text-align: center;
  padding: 20px 32px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-footer p {
  font-size: 12px;
  opacity: 0.5;
}

/* ==================== TOP BAR ==================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-icon {
  font-size: 20px;
}

.top-bar-username {
  font-size: 15px;
  font-weight: 600;
  color: #4efcff;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.credits-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(78, 252, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(78, 252, 255, 0.2);
}

.credit-icon {
  font-size: 16px;
}

.credit-count {
  font-size: 15px;
  font-weight: 700;
  color: #4efcff;
}

.logout-btn {
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #eafcff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==================== MAIN PANEL ==================== */
.panel {
  width: 100%;
  max-width: 480px;
  padding: 32px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 0 0 1px rgba(78, 252, 255, 0.1),
    0 30px 70px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== HEADER ==================== */
.header-section {
  margin-bottom: 28px;
  text-align: center;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #4efcff, #63d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.tagline {
  font-size: 13px;
  opacity: 0.65;
  letter-spacing: 0.3px;
}

/* ==================== FORM SECTION ==================== */
.form-section {
  margin-bottom: 24px;
}

select,
input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eafcff;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  margin-bottom: 14px;
  appearance: none;
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234efcff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 45px;
}

select:hover,
input:hover {
  border-color: rgba(78, 252, 255, 0.3);
}

select:focus,
input:focus {
  border-color: #4efcff;
  box-shadow: 0 0 0 3px rgba(78, 252, 255, 0.15);
  background: rgba(0, 0, 0, 0.5);
}

input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input::placeholder {
  color: rgba(234, 252, 255, 0.4);
}

/* ==================== BUTTON ==================== */
button {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #002b2e;
  background: linear-gradient(135deg, #4efcff, #63d9ff);
  box-shadow: 0 12px 40px rgba(78, 252, 255, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(78, 252, 255, 0.5);
}

button:active {
  transform: translateY(0);
}

button.loading {
  pointer-events: none;
  opacity: 0.7;
}

button.loading .btn-text {
  opacity: 0;
}

button.loading .btn-loader {
  opacity: 1;
}

.btn-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 43, 46, 0.3);
  border-top-color: #002b2e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

/* ==================== RESULT SECTION ==================== */
#result {
  margin-top: 24px;
}

.result-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(78, 252, 255, 0.15);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: slideUpResult 0.4s ease;
}

@keyframes slideUpResult {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header {
  background: linear-gradient(135deg, rgba(78, 252, 255, 0.15), rgba(99, 217, 255, 0.1));
  padding: 18px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-align: center;
  border-bottom: 1px solid rgba(78, 252, 255, 0.2);
}

.result-body {
  padding: 8px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.result-row:hover {
  background: rgba(78, 252, 255, 0.05);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row.full-width {
  flex-direction: column;
  gap: 8px;
}

.result-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  opacity: 0.75;
  min-width: 140px;
}

.result-label .icon {
  font-size: 16px;
  opacity: 0.9;
}

.result-value {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  word-break: break-word;
  flex: 1;
}

.result-row.full-width .result-value {
  text-align: left;
  opacity: 0.85;
  line-height: 1.5;
}

.result-footer {
  padding: 14px 20px;
  text-align: center;
  font-size: 12px;
  opacity: 0.5;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

/* ==================== ERROR CARD ==================== */
.error-card {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  animation: slideUpResult 0.4s ease;
}

.error-icon {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.error-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ff9999;
}

.error-msg {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.5;
}

/* ==================== LOADING CARD ==================== */
.loading-card {
  background: rgba(78, 252, 255, 0.08);
  border: 1px solid rgba(78, 252, 255, 0.2);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ==================== PRO CARD (NO CREDITS) ==================== */
.pro-card {
  background: linear-gradient(135deg, rgba(78, 252, 255, 0.1), rgba(99, 217, 255, 0.05));
  border: 1px solid rgba(78, 252, 255, 0.3);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  animation: slideUpResult 0.4s ease;
}

.pro-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.pro-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #4efcff;
}

.pro-msg {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 24px;
}

.pro-pricing {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.price-option {
  flex: 1;
  max-width: 140px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(78, 252, 255, 0.2);
  border-radius: 14px;
  padding: 16px 12px;
  transition: all 0.3s ease;
}

.price-option:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(78, 252, 255, 0.4);
  transform: translateY(-2px);
}

.price-amount {
  font-size: 22px;
  font-weight: 700;
  color: #4efcff;
  margin-bottom: 6px;
}

.price-credits {
  font-size: 13px;
  opacity: 0.7;
}

.pro-button {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4efcff, #63d9ff);
  color: #002b2e;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(78, 252, 255, 0.4);
  transition: all 0.3s ease;
}

.pro-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(78, 252, 255, 0.5);
}

/* ==================== FOOTER ==================== */
.footer-section {
  margin-top: 28px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-section p {
  font-size: 13px;
  opacity: 0.6;
}

.footer-section a {
  color: #4efcff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.footer-section a:hover {
  opacity: 0.8;
}

/* ==================== NOTIFICATIONS ==================== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(78, 252, 255, 0.3);
  color: #eafcff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  border-color: rgba(78, 252, 255, 0.5);
  box-shadow: 0 10px 40px rgba(78, 252, 255, 0.3);
}

.notification-error {
  border-color: rgba(255, 107, 107, 0.5);
  box-shadow: 0 10px 40px rgba(255, 107, 107, 0.3);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 500px) {
  .panel {
    padding: 24px 20px;
  }

  .auth-modal {
    max-width: 90%;
  }

  .auth-header {
    padding: 32px 24px 20px;
  }

  .auth-logo {
    font-size: 48px;
  }

  .auth-header h2 {
    font-size: 22px;
  }

  .auth-body {
    padding: 24px;
  }

  h1 {
    font-size: 24px;
  }

  .top-bar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .top-bar-left,
  .top-bar-right {
    width: 100%;
    justify-content: space-between;
  }

  .result-label {
    min-width: 110px;
    font-size: 12px;
  }

  .result-value {
    font-size: 13px;
  }

  .result-row {
    padding: 12px 14px;
  }

  .pro-pricing {
    flex-direction: column;
  }

  .price-option {
    max-width: 100%;
  }

  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    transform: translateY(-200px);
  }

  .notification.show {
    transform: translateY(0);
  }

  .telegram-box {
    padding: 20px;
  }

  .telegram-code-box {
    flex-direction: column;
    align-items: stretch;
  }

  .telegram-code-box code {
    text-align: center;
  }
}

/* ==================== CUSTOM SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(78, 252, 255, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(78, 252, 255, 0.5);
}

.powered-line {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.6;
  letter-spacing: 0.3px;
}

.powered-line a {
  color: #4efcff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.powered-line a:hover {
  opacity: 0.85;
  text-shadow: 0 0 8px rgba(78, 252, 255, 0.6);
}
