.telegram-auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 450px;
  position: relative;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h2 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 600;
}

.auth-header p {
  color: #7f8c8d;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.loading-spinner {
  text-align: center;
  padding: 40px 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner p {
  color: #7f8c8d;
  margin: 0;
}

.error-message {
  background: #ffe6e6;
  border: 1px solid #ff9999;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d63031;
  font-size: 14px;
}

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

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  outline: none;
}

.form-group input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

.form-group input.readonly {
  background-color: #f1f3f4;
  border-color: #dee2e6;
}

.form-group small {
  color: #7f8c8d;
  font-size: 12px;
  line-height: 1.4;
}

.auth-button {
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  position: relative;
  overflow: hidden;
}

.auth-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.auth-button.primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.auth-button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2980b9, #21618c);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.auth-button.secondary {
  background: #ecf0f1;
  color: #2c3e50;
  border: 2px solid #bdc3c7;
}

.auth-button.secondary:hover:not(:disabled) {
  background: #d5dbdb;
  border-color: #95a5a6;
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.button-group .auth-button {
  flex: 1;
}

.auth-success {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  font-size: 48px;
  margin-bottom: 20px;
  animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.auth-success h3 {
  color: #27ae60;
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 600;
}

.user-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.user-info p {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 14px;
  line-height: 1.5;
}

.user-info p:last-child {
  margin-bottom: 0;
}

.user-info strong {
  color: #34495e;
  font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .telegram-auth-container {
    padding: 10px;
  }
  
  .auth-card {
    padding: 30px 20px;
  }
  
  .auth-header h2 {
    font-size: 24px;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .button-group .auth-button {
    flex: none;
  }
}

/* 加载状态动画 */
.auth-button:disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.auth-button:disabled {
  color: transparent;
}

.auth-button.secondary:disabled::after {
  border-top-color: #7f8c8d;
}