/* 账号领取系统 - 现代化UI设计 */
:root {
  --bg-main: #0a0e1a;
  --bg-card: #111827;
  --bg-elevated: #1a1f2e;
  --border: rgba(255,255,255,0.08);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* 背景效果 */
.bg {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #0a0e1a 0%, #0f1419 100%);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
}

.bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
}

/* 主容器 */
.wrap {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 40px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 顶部区域 */
.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}

.brand {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.pill:first-of-type {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.pill:last-of-type {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  font-size: 15px;
  font-weight: 700;
  min-width: 50px;
  justify-content: center;
}

.adminLink {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.adminLink:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
  color: var(--text-primary);
}

/* 卡片 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 24px;
  backdrop-filter: blur(20px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 56px rgba(0,0,0,0.4);
}

/* 公告区域 */
.notice {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.notice::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
}

.noticeTitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.noticeBody {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* 操作区域 */
.actions {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.btnPrimary {
  flex: 1;
  min-width: 200px;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.btnPrimary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btnPrimary:hover::after {
  opacity: 1;
}

.btnPrimary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btnPrimary:active {
  transform: translateY(0);
}

.btnPrimary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cooldown {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.cooldown span {
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 14px;
}

.cooldownHint {
  padding: 0 24px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 20px;
}

.cooldownHint.err {
  color: var(--accent-red);
}

.cooldownHint.ok {
  color: var(--accent-green);
}

/* 账号密码区域 */
.cred {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
}

.row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
  transition: height 0.3s ease;
}

.row:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  transform: translateX(2px);
}

.row:hover::before {
  height: 60%;
}

.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.value {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 0;
  letter-spacing: 0.5px;
}

.btnCopy {
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btnCopy:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  transform: translateY(-1px);
}

.btnCopy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 历史记录按钮 */
.actions:last-of-type {
  border-top: 1px solid var(--border);
  border-bottom: none;
  padding-top: 20px;
}

.btnGhost {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btnGhost:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* 模态窗口 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modalContent {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.03) 100%);
  position: relative;
}

.modalHeader::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
}

.modalTitle {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modalClose {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modalClose:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.modalBody {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
  max-height: 50vh;
}

.modalBody::-webkit-scrollbar {
  width: 6px;
}

.modalBody::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02);
  border-radius: 3px;
}

.modalBody::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.modalBody::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.15);
}

.modalFooter {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

/* 历史记录列表 */
.historyList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.histItem {
  padding: 18px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.histItem::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.histItem:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  transform: translateX(4px);
}

.histItem:hover::before {
  width: 3px;
}

.histTop {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.histTop::before {
  content: '🕐';
  font-size: 12px;
}

.histMid {
  margin-bottom: 12px;
}

.histCred {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  word-break: break-all;
}

.histBtns {
  display: flex;
  gap: 10px;
}

.btnMini {
  padding: 8px 16px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btnMini:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

/* 广告区域 */
.ad {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* 页脚 */
.foot {
  margin-top: 32px;
  text-align: center;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.foot a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}

.foot a:hover {
  color: #a78bfa;
}

.muted {
  color: var(--text-muted);
  font-size: 12px;
  display: block;
}

/* 广告组件样式 */
simple-ad {
  position: fixed;
  z-index: 100;
  display: block;
  max-width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

simple-ad:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.15);
}

simple-ad[position="top-left"] {
  top: 24px;
  left: 24px;
}

simple-ad[position="top-right"] {
  top: 24px;
  right: 24px;
}

simple-ad[position="bottom-left"] {
  bottom: 24px;
  left: 24px;
}

simple-ad[position="bottom-right"] {
  bottom: 24px;
  right: 24px;
}

simple-ad .ad-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

simple-ad .ad-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

simple-ad .ad-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

simple-ad .ad-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .wrap {
    padding: 20px 16px 32px;
  }
  
  .top {
    flex-direction: column;
    gap: 16px;
  }
  
  .brand {
    font-size: 24px;
  }
  
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btnPrimary {
    width: 100%;
    min-width: auto;
  }
  
  .cooldown {
    width: 100%;
    justify-content: center;
  }
  
  .row {
    grid-template-columns: 60px 1fr auto;
    gap: 12px;
    padding: 14px 16px;
  }
  
  .modalContent {
    max-width: 95vw;
    max-height: 90vh;
  }
  
  simple-ad {
    max-width: calc(100vw - 32px);
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 16px auto;
  }
  
  simple-ad[position] {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
  }
}

@media (max-width: 520px) {
  .row {
    grid-template-columns: 50px 1fr auto;
    gap: 10px;
    padding: 12px 14px;
  }
  
  .value {
    font-size: 13px;
  }
  
  .btnCopy {
    padding: 8px 14px;
    font-size: 12px;
  }
  
  .modalHeader,
  .modalBody,
  .modalFooter {
    padding: 16px 20px;
  }
}
