/* ============================================
   全能签 - 共享样式表
   基于原站风格提取并优化
   ============================================ */

/* ---- 基础变量 ---- */
:root {
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --secondary-color: #3498db;
  --warning-color: #e74c3c;
  --success-color: #27ae60;
  --text-light: #ffffff;
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --bg-body: #f8f9fa;
  --bg-card: #ffffff;
  --shadow: 0 0px 10px rgba(0, 0, 0, 0.47);
  --shadow-inset: inset 0px 0px 10px 0px rgba(0, 0, 0, 0.58);
  --radius: 10px;
  --radius-lg: 12px;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg-body);
  color: var(--text-dark);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ---- 页面容器 ---- */
.page-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 12px 100px;
  min-height: 100vh;
}

/* ---- 防骗公告栏 ---- */
#anti-fraud-banner {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 680px;
  height: 32px;
  background: rgba(52, 152, 219, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(52, 152, 219, 0.2);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(52, 152, 219, 0.08);
  overflow: hidden;
  white-space: nowrap;
  z-index: 9999;
  display: flex;
  align-items: center;
}

#anti-fraud-banner .marquee-content {
  display: inline-block;
  animation: marquee 35s linear infinite;
  padding-left: 100%;
  font-size: 12px;
  color: #2c3e50;
  line-height: 32px;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ---- 头部区域 ---- */
.header {
  margin: 48px 15px 15px;
  display: flex;
  align-items: center;
}

.header .img {
  width: 70px;
  height: 70px;
  margin-right: 15px;
  flex-shrink: 0;
}

.header .img img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
}

.header .pay p {
  font-size: 18px;
  font-weight: 700;
  color: #3498db;
  margin: 0;
}

.header .pay h5 {
  font-size: 14px;
  color: #414141;
  margin-top: 8px;
  font-weight: normal;
}

/* ---- 快捷按钮区域 ---- */
.link-xx {
  display: flex;
  align-items: center;
  background: white;
  padding: 1.2rem;
  margin: 0 15px 1rem;
  border-radius: 0.8rem;
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.47);
  transition: transform 0.2s;
  gap: 12px;
}

.link-info1 {
  flex: 1;
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
}

/* ---- 通用按钮 ---- */
.action-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  text-decoration: none;
}

.visit-btn {
  background: var(--secondary-color);
  color: var(--text-light);
}

.copy-btn {
  background: var(--success-color);
  color: var(--text-light);
}

.action-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ---- 证书列表项 ---- */
.link-item {
  display: flex;
  align-items: center;
  background: white;
  padding: 1.2rem;
  margin: 0 15px 0.8rem;
  border-radius: 0.8rem;
  box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, 0.58);
  transition: transform 0.2s;
}

.link-item:hover {
  transform: translateY(-2px);
}

.link-info {
  flex: 1;
  min-width: 0;
  margin-right: 1.5rem;
}

.mdui-card-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  margin-right: 12px;
  float: left;
}

.link-title {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 52px;
  font-size: 15px;
}

.link-url {
  color: #7f8c8d;
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0.3rem 0;
  margin-left: 52px;
}

.link-warning {
  color: var(--warning-color);
  font-size: 0.8em;
  margin-top: 0.5rem;
  padding: 0.3rem 0.6rem;
  background-color: rgba(231, 76, 60, 0.1);
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(231, 76, 60, 0.2);
  margin-left: 52px;
}

.link-warning1 {
  color: var(--warning-color);
  font-size: 0.8em;
  margin-top: 0.5rem;
  padding: 0.3rem 0.6rem;
  background-color: rgba(0, 255, 34, 0.12);
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(9, 37, 20, 0.27);
  margin-left: 52px;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ---- 步骤区域 ---- */
.steps-section {
  margin: 20px 15px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.steps-section h2 {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 16px;
  text-align: center;
}

.steps-section h3 {
  font-size: 15px;
  color: var(--primary-color);
  margin: 16px 0 8px;
}

.steps-section p {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 8px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  margin-right: 12px;
  margin-top: 2px;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.step-content p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* ---- 教程页面专用 ---- */
.tutorial-section {
  margin: 20px 15px;
}

.tutorial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.tutorial-card h2 {
  font-size: 17px;
  color: var(--primary-color);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.tutorial-card .step {
  display: flex;
  margin-bottom: 16px;
}

.tutorial-card .step-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin-right: 14px;
}

.tutorial-card .step-body {
  flex: 1;
}

.tutorial-card .step-body h4 {
  font-size: 15px;
  color: #2c3e50;
  margin-bottom: 6px;
}

.tutorial-card .step-body p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

/* ---- 证书购买页面 ---- */
.cert-page {
  margin: 20px 15px;
}

.cert-top {
  text-align: center;
  padding: 24px 20px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.cert-top img {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
}

.cert-top h2 {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.cert-top p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.tips-box {
  background: #fff8e1;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  border-left: 4px solid #f39c12;
}

.tips-box h3 {
  font-size: 15px;
  color: #e67e22;
  margin-bottom: 8px;
}

.tips-box p {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
  margin: 4px 0;
}

.cert-type-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.cert-type-box h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.cert-type-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cert-type-item:last-child {
  border-bottom: none;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 12px;
  flex-shrink: 0;
}

.tag-green { background: #d4edda; color: #155724; }
.tag-teal { background: #d1ecf1; color: #0c5460; }
.tag-grey { background: #e2e3e5; color: #383d41; }
.tag-red { background: #f8d7da; color: #721c24; }

.cert-type-item p {
  font-size: 13px;
  color: #555;
  margin: 0;
}

.price-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

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

.price-btn .left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-btn .left i {
  color: var(--primary-color);
  font-size: 16px;
}

.price-btn .left span {
  font-size: 14px;
  color: var(--text-dark);
}

.price-btn .right {
  font-size: 18px;
  font-weight: 700;
  color: var(--warning-color);
}

.func-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius);
  text-decoration: none;
  color: white;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.func-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-green { background: var(--success-color); }
.btn-red { background: var(--warning-color); }
.btn-purple { background: #9b59b6; }
.btn-blue { background: var(--primary-color); }

/* ---- 软件资源页面 ---- */
.software-list {
  margin: 20px 15px;
}

.software-item {
  display: flex;
  align-items: center;
  background: white;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.software-item .icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  margin-right: 14px;
  flex-shrink: 0;
}

.software-item .info {
  flex: 1;
}

.software-item .info h3 {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.software-item .info p {
  font-size: 13px;
  color: #888;
}

.software-item .btn {
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  flex-shrink: 0;
}

/* ---- 全局提示 ---- */
.global-hint {
  text-align: center;
  color: #7f8c8d;
  font-size: 0.9em;
  margin: 2rem auto 1rem;
  padding: 1rem;
  max-width: 600px;
  border-top: 1px dashed #ddd;
}

/* ---- 页脚 ---- */
.page-footer {
  text-align: center;
  margin-top: 20px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.8;
}

.page-footer a {
  color: #8e8e93;
  text-decoration: none;
}

/* ---- 底部固定导航栏 ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 56px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  text-decoration: none;
  color: #8e8e93;
  font-size: 11px;
  gap: 3px;
  transition: color 0.2s;
}

.nav-item i {
  font-size: 20px;
  margin-bottom: 1px;
}

.nav-item.active,
.nav-item:hover {
  color: var(--primary-color);
}

.nav-item.active {
  font-weight: 600;
}

/* ---- Toast提示 ---- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .link-item {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .action-buttons {
    width: 100%;
    justify-content: flex-end;
  }
  
  .header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .action-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .action-btn {
    width: 100%;
  }
  
  .link-item {
    padding: 1rem;
  }
  
  .cert-top h2 {
    font-size: 16px;
  }
  
  .price-btn .left span {
    font-size: 13px;
  }
}
