/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

/* 密码验证遮罩层 */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-modal {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 50px 40px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: slideUp 0.5s ease;
}

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

.auth-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.auth-title {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
  font-weight: 700;
}

.auth-subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

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

.auth-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e1e4e8;
  border-radius: 12px;
  font-size: 16px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.auth-input:focus {
  outline: none;
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-error {
  background: rgba(235, 52, 86, 0.1);
  color: #eb3456;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border-left: 4px solid #eb3456;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.auth-btn {
  margin-top: 5px;
}

/* 容器 */
.container {
  max-width: 1000px;
  margin: 0 auto;
}

/* 顶部导航 */
.header {
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

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

.header h1 {
  font-size: 42px;
  color: #fff;
  font-weight: 700;
  margin: 0;
}

.subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: 300;
}

/* 主要内容 */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 卡片样式 */
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 20px 30px;
}

.card-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.success-header {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.card-body {
  padding: 30px;
}

/* 状态提示 */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  animation: slideDown 0.3s ease;
}

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

.alert-loading {
  background: linear-gradient(135deg, #667eea15, #764ba215);
  border-left: 4px solid #667eea;
}

.alert-success {
  background: linear-gradient(135deg, #11998e15, #38ef7d15);
  border-left: 4px solid #11998e;
}

.alert-error {
  background: linear-gradient(135deg, #eb345615, #f7361315);
  border-left: 4px solid #eb3456;
}

.alert-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 5px;
}

.alert-message {
  font-size: 14px;
  color: #555;
  white-space: pre-line;
}

.hidden {
  display: none !important;
}

/* 用户信息卡片 */
.user-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.info-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.info-item label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

.info-value {
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

/* 表单元素 */
.form-group {
  margin-bottom: 25px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.required {
  color: #eb3456;
  margin-left: 4px;
}

.form-textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e1e4e8;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Monaco', 'Courier New', monospace;
  resize: vertical;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}

/* 按钮组 */
.button-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: #fff;
}

.btn-secondary {
  background: #f1f3f5;
  color: #495057;
}

.btn-secondary:hover:not(:disabled) {
  background: #e9ecef;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  flex: 1;
  min-width: 200px;
}

.btn-icon {
  font-size: 18px;
}

.btn-icon-only {
  padding: 10px 16px;
  min-width: auto;
}

/* URL 显示区域 */
.url-display-wrapper {
  display: flex;
  gap: 10px;
}

.url-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e1e4e8;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Monaco', 'Courier New', monospace;
  background: #f8f9fa;
  color: #333;
}

.url-input:focus {
  outline: none;
  border-color: #11998e;
  background: #fff;
}

/* 帮助步骤 */
.help-steps {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #333;
}

.step-content p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.step-content a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.step-content a:hover {
  text-decoration: underline;
}

kbd {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-family: 'Monaco', 'Courier New', monospace;
  color: #333;
  background: #f1f3f5;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 代码块 */
.code-block {
  position: relative;
  margin-top: 10px;
  background: #2d2d2d;
  border-radius: 8px;
  padding: 15px;
  overflow-x: auto;
}

.code-block code {
  display: block;
  color: #f8f8f2;
  font-size: 13px;
  font-family: 'Monaco', 'Courier New', monospace;
  line-height: 1.6;
  white-space: pre-wrap;
}

.btn-copy-code {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-link {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  text-decoration: none;
}

.link-wrapper {
  margin-top: 10px;
}

.help-tip {
  margin-top: 20px;
  padding: 15px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

/* 底部 */
.footer {
  margin-top: 40px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  text-align: center;
}

.footer-content p {
  margin: 5px 0;
  color: #fff;
  font-size: 14px;
}

.footer-hint {
  opacity: 0.8;
  font-size: 13px !important;
}

/* 加载动画 */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s linear infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .header {
    padding: 20px;
  }

  .logo-icon {
    font-size: 36px;
  }

  .header h1 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 16px;
  }

  .card-header,
  .card-body {
    padding: 20px;
  }

  .button-group {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
  }

  .user-info-grid {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: column;
    gap: 10px;
  }
}

/* 打印样式 */
@media print {
  body {
    background: #fff;
  }

  .header,
  .footer,
  .help-card {
    display: none;
  }
}

