/* ==========================
   全局基础样式
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f5f6fa;
  color: #2f3640;
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}

/* ==========================
   主题色 & 渐变
========================= */
:root {
  --gradient: linear-gradient(135deg, #4f9aff, #8e44ff);
  --primary-color: #4f9aff;
  --secondary-color: #8e44ff;
}

/* ==========================
   Header
========================= */
#site-header {
  width: 100%;
  background: var(--gradient);
  color: #fff;
  padding: 20px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#site-header .site-title {
  width: 1200px;
  max-width: 95%;
  margin: 0 auto;
  font-size: 1.5rem;
  font-weight: bold;
}

#site-header .site-title a {
  color: #fff;
  text-decoration: none;
}

/* ==========================
   Footer
========================= */
#site-footer {
  width: 100%;
  background: #222;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

#site-footer a {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  text-decoration: none;
}

/* ==========================
   Main 内容区
========================= */
#site-main,
#home-site-main {
  max-width: 1200px;
  width: 90%;
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.08);
  animation: fadeIn 0.5s ease-in-out;
}

.site-main-header {
  text-align: center;
  margin-bottom: 20px;
}

/* ==========================
   标题
========================= */
h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #555;
}

/* 多金额示例标题间距 */
.exchange-title {
  margin-top: 15px;
}

/* ==========================
   表单 / 输入控件
========================= */
.currency-exchange-form,
.converter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: center;
  margin: 20px auto 1.5rem;
  text-align: center;
}

.currency-exchange-form label {
  font-weight: 500;
}

.currency-exchange-form select,
.currency-exchange-form input,
.converter-form select,
.converter-form input {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  text-align: left;  /* select 内容居左 */
  transition: border 0.2s, box-shadow 0.2s;
}

.currency-exchange-form select:focus,
.currency-exchange-form input:focus,
.converter-form select:focus,
.converter-form input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 6px rgba(142,68,255,0.3);
}

/* 按钮样式统一 */
.currency-exchange-form button,
#convert-btn {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.3s, opacity 0.2s;
}

.currency-exchange-form button:hover,
#convert-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  box-shadow: 0 6px 15px rgba(79,154,255,0.3);
}

/* 箭头符号 */
.converter-arrow {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* ==========================
   汇率结果展示
========================= */
.currency-current-rate {
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.currency-result {
  display: block;
  width: 100%;
  margin: 1.5rem 0;
  text-align: center;
}

.currency-result .result-card {
  display: inline-block;
  background: #f8f9fc;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid #eee;
}

.result-main {
  font-size: 1.3rem;
  font-weight: bold;
  color: #2f3640;
  margin-bottom: 0.5rem;
}

.result-sub {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.update-time {
  margin-top: 15px;
  font-size: 0.85rem;
  color: #888;
}

/* ==========================
   多金额兑换列表
========================= */
.multi-amount-list {
  margin-top: 30px;
}

.multi-amount-list h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.multi-amount-list a {
  display: inline-block;
  margin: 5px 10px 5px 0;
  padding: 6px 12px;
  background: #f0f4ff;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
}

.multi-amount-list a:hover {
  background: var(--gradient);
  color: #fff;
}


.ads {
  margin-top: 30px;
}

/* ==========================
   卡片式展示
========================= */
.currency-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.currency-card {
  background-color: #fff;
  padding: 15px 20px;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.currency-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.currency-card-header {
  font-weight: 600;
  margin-bottom: 10px;
}

.currency-card-header a {
  color: #2f3640;
  text-decoration: none;
}

.currency-card-header span a {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  font-weight: bold;
}

.currency-card-rate {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.currency-card-links a {
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
  transition: color 0.3s;
}

.currency-card-links a:hover {
  color: var(--secondary-color);
}

/* ==========================
   错误提示
========================= */
.module-error {
  color: #e74c3c;
  font-weight: bold;
  margin-top: 20px;
}

/* ==========================
   A-Z 货币索引表格
========================= */
.currency-index {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  margin: 30px 0;
  font-size: 15px;
}

.currency-index th {
  background: var(--gradient);
  color: #fff;
  padding: 12px 15px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px 10px 0 0;
}

.currency-index td {
  padding: 15px;
  vertical-align: top;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.currency-index td:first-child {
  width: 80px;
  font-weight: bold;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  vertical-align: middle;
  font-size: 18px;
}

.currency-index td a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  transition: all 0.25s ease;
}

.currency-index td a:hover {
  background: var(--gradient);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79,154,255,0.25);
}

/* ==========================
   动画
========================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================
   响应式适配 - 手机端
========================= */
@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.6rem;
  }
  
  h2 {
    font-size: 1rem;
    margin-bottom: 15px;
  }
  
  #site-header .site-title {
    font-size: 1.2rem;
  }
  
  #site-main,
  #home-site-main {
    width: 95%;
    padding: 15px;
    margin: 20px auto;
  }
  
  .currency-exchange-form,
  .converter-form {
    flex-direction: column;
    gap: 10px;
  }
  
  .currency-exchange-form select,
  .currency-exchange-form input,
  .converter-form select,
  .converter-form input {
    width: 100%;
    font-size: 0.95rem;
  }
  
  .currency-exchange-form button,
  #convert-btn {
    width: 100%;
    font-size: 1rem;
    padding: 10px 0;
  }
  
  .multi-amount-list a {
    font-size: 0.9rem;
    padding: 5px 10px;
    margin: 4px 6px 4px 0;
  }
  
  .currency-card-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
  }
  
  .currency-card {
    padding: 12px 15px;
  }
  
  .currency-card-rate {
    font-size: 1rem;
  }
  
  .currency-card-links a {
    font-size: 0.85rem;
  }
  
  .currency-current-rate {
    font-size: 1.2rem;
  }
}
