码桶

发现社区成员的开源项目

style.css14.6 KB
/* ============================================
   域名交易站 - 復刻 66.hk 粉紫色復古風格
   ============================================ */

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

body {
  background: #FFCCFF;
  font-family: "Microsoft JhengHei", "微軟正黑體", Arial, Helvetica, sans-serif;
  color: #333;
  line-height: 1.6;
}

/* ========= 主佈局 ========= */
.main-table {
  width: 900px;
  margin: 0 auto;
  border: 2px solid #FF00FF;
  background: #FFDDFF;
}

.main-table > tbody > tr > td.sidebar {
  width: 150px;
  vertical-align: top;
  background: #FF99FF;
  padding-top: 15px;
  border-right: 1px solid #FF00FF;
}

.main-table > tbody > tr > td.content {
  background: #FFDDFF;
  padding: 10px;
}

/* ========= 側邊導航 ========= */
.nav-btn {
  display: block;
  margin: 0 10px 15px 10px;
  text-align: center;
  background: #ff6699;
  padding: 6px 5px;
  border: 4px solid #ff66ff;
  color: #000 !important;
  font-size: 24px;
  font-weight: 1000;
  text-decoration: none !important;
  transition: background 0.2s;
}

.nav-btn:hover {
  color: #FFF !important;
  background: #ff3399;
}

.nav-btn.active {
  background: #cc0066;
  color: #FFF !important;
}

/* ========= 標題區 ========= */
.title-en {
  color: red;
  font-weight: 400;
  font-size: 24px;
  font-family: sans-serif;
}

.title-zh {
  font-weight: bold;
  color: #0000FF;
  font-size: 24px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 2px;
}

.intro-text {
  margin: 15px 0;
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

/* ========= 特點列表 ========= */
.feature-list {
  margin: 15px 0 15px 25px;
  font-size: 15px;
  line-height: 1.8;
}

.feature-list li {
  margin-bottom: 8px;
}

.feature-list strong {
  color: #cc0066;
}

.buy-notice {
  margin: 15px 0;
  text-align: center;
}

.buy-notice a {
  display: inline-block;
  padding: 6px 20px;
  background: #990000;
  color: #FFF !important;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  border-radius: 3px;
}

.buy-notice a:hover {
  background: #cc0000;
}

/* ========= 域名表格 ========= */
.domain-table {
  width: 100%;
  max-width: 700px;
  margin: 10px auto;
  border: 1px solid #990000;
  border-collapse: collapse;
}

.domain-table th {
  background: #990000;
  color: #FFFFFF;
  font-weight: bold;
  padding: 8px;
  text-align: center;
  border: 1px solid #990000;
  font-size: 15px;
}

.domain-table th.center {
  text-align: center;
}

.domain-table td {
  padding: 6px 10px;
  border: 1px solid #cc9999;
  font-size: 15px;
}

.domain-table td.cat {
  background: #FFE0E0;
  font-weight: bold;
  vertical-align: top;
  text-align: center;
  color: #990000;
  width: 100px;
}

.domain-table td.domain-name {
  font-family: Arial, Helvetica, sans-serif;
}

.domain-table td.domain-name a {
  color: #0000CC;
  text-decoration: none;
}

.domain-table td.domain-name a:hover {
  color: #cc0066;
  text-decoration: underline;
}

.domain-table td.price {
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  color: #cc0000;
  font-weight: bold;
}

.domain-table tr:hover td:not(.cat) {
  background: #FFF0F5;
}

/* ========= 聯絡資訊 ========= */
.contact-info {
  margin: 20px auto;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.8;
}

.contact-info a {
  color: #0000CC;
}

.whatsapp-icon {
  height: 15px;
  width: 15px;
  vertical-align: middle;
}

/* ========= 搜尋列 ========= */
.search-bar {
  margin: 10px auto 15px auto;
  max-width: 700px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-bar select,
.search-bar input[type="text"] {
  padding: 5px 8px;
  border: 1px solid #cc6699;
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
}

.search-bar input[type="text"] {
  flex: 1;
}

.search-bar button {
  padding: 5px 15px;
  background: #ff6699;
  border: 2px solid #ff66ff;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
}

.search-bar button:hover {
  background: #ff3399;
  color: #FFF;
}

.result-count {
  font-size: 13px;
  color: #990000;
  margin: 5px auto;
  max-width: 700px;
  text-align: right;
}

/* ========= 空狀態 ========= */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 16px;
}

/* ========= 後台管理樣式 ========= */
.admin-body {
  background: #F5F5F5;
}

.admin-header {
  background: #990000;
  color: #FFF;
  padding: 12px 20px;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header a {
  color: #FFCCFF;
  text-decoration: none;
  font-size: 14px;
  font-weight: normal;
}

.admin-header a:hover {
  text-decoration: underline;
}

.admin-container {
  max-width: 1000px;
  margin: 20px auto;
  background: #FFF;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 25px;
}

.admin-section-title {
  font-size: 18px;
  color: #990000;
  border-bottom: 2px solid #FFCCFF;
  padding-bottom: 8px;
  margin-bottom: 15px;
  font-weight: bold;
}

/* 表單 */
.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.form-row label {
  width: 80px;
  font-size: 14px;
  color: #666;
  text-align: right;
}

.form-row input,
.form-row select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
}

.form-row input[type="text"] { flex: 1; min-width: 150px; }

.btn {
  padding: 6px 16px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: bold;
}

.btn-primary {
  background: #990000;
  color: #FFF;
}
.btn-primary:hover { background: #cc0000; }

.btn-success {
  background: #009900;
  color: #FFF;
}
.btn-success:hover { background: #00cc00; }

.btn-danger {
  background: #cc3333;
  color: #FFF;
}
.btn-danger:hover { background: #ee4444; }

.btn-warning {
  background: #ff9900;
  color: #FFF;
}
.btn-warning:hover { background: #ffaa00; }

.btn-sm {
  padding: 3px 10px;
  font-size: 12px;
}

/* 管理表格 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.admin-table th {
  background: #FF99FF;
  padding: 8px;
  text-align: left;
  font-size: 14px;
  color: #333;
  border: 1px solid #dd88dd;
}

.admin-table td {
  padding: 8px;
  border: 1px solid #e0d0e0;
  font-size: 14px;
}

.admin-table tr:nth-child(even) {
  background: #FFF5FF;
}

.admin-table tr:hover {
  background: #FFE0FF;
}

/* 登入頁 */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-box {
  background: #FFF;
  border: 3px solid #FF00FF;
  border-radius: 5px;
  padding: 30px;
  width: 350px;
  text-align: center;
}

.login-box h2 {
  color: #990000;
  margin-bottom: 20px;
}

.login-box input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 16px;
}

.login-box button {
  width: 100%;
  padding: 10px;
  background: #990000;
  color: #FFF;
  border: none;
  border-radius: 3px;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
}

.login-box button:hover { background: #cc0000; }

.login-hint {
  font-size: 12px;
  color: #999;
  margin-top: 10px;
}

/* 統計卡片 */
.stats-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 120px;
  background: #FFDDFF;
  border: 1px solid #FF99FF;
  border-radius: 5px;
  padding: 12px;
  text-align: center;
}

.stat-card .num {
  font-size: 28px;
  font-weight: bold;
  color: #990000;
}

.stat-card .label {
  font-size: 13px;
  color: #666;
}

/* 工具列 */
.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar .spacer { flex: 1; }

.toolbar input[type="text"],
.toolbar select {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
}

/* 提示訊息 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 4px;
  color: #FFF;
  font-size: 14px;
  z-index: 10000;
  animation: slideIn 0.3s ease;
}

.toast.success { background: #009900; }
.toast.error { background: #cc3333; }
.toast.info { background: #3399cc; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   響應式 - 手機端適配
   ============================================ */

/* ---- 導航開關按鈕(僅手機端顯示) ---- */
.nav-toggle {
  display: none;
}

/* ---- 平板及以下 ---- */
@media (max-width: 920px) {
  .main-table {
    width: 100%;
    border: none;
  }
  .main-table > tbody > tr > td.sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #FF00FF;
    padding: 10px 0;
  }
  .nav-btn {
    display: inline-block;
    margin: 5px;
    font-size: 18px;
  }
  .domain-table {
    font-size: 13px;
  }
  .admin-container {
    margin: 10px;
    padding: 15px;
  }
}

/* ---- 手機端 ---- */
@media (max-width: 768px) {

  /* ===== 通用 ===== */
  body {
    font-size: 14px;
  }

  /* ===== 導航開關按鈕 ===== */
  .nav-toggle {
    display: block;
    width: 100%;
    background: #cc0066;
    color: #FFF;
    padding: 10px 16px;
    border: none;
    font-size: 15px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .nav-toggle .hamburger {
    display: inline-block;
    margin-right: 8px;
    font-size: 18px;
  }

  /* ===== 主佈局 → block 模式 ===== */
  .main-table,
  .main-table > tbody,
  .main-table > tbody > tr,
  .main-table > tbody > tr > td {
    display: block;
    width: 100%;
  }
  .main-table {
    border: none;
  }
  .main-table > tbody > tr > td.content {
    padding: 8px;
  }

  /* ===== 側邊導航 → 預設收起,展開時下拉 ===== */
  .main-table > tbody > tr > td.sidebar {
    display: none;
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #FF00FF;
    padding: 8px 0;
    background: #FF99FF;
  }
  .main-table > tbody > tr > td.sidebar.sidebar-open {
    display: block;
  }

  .nav-btn {
    display: inline-block;
    margin: 4px;
    font-size: 16px;
    padding: 8px 14px;
    border-width: 3px;
  }

  /* ===== 標題區 ===== */
  .title-en { font-size: 18px; }
  .title-zh { font-size: 18px; }
  .intro-text { font-size: 13px; margin: 10px 0; }
  .feature-list { font-size: 13px; margin: 10px 0 10px 20px; }

  /* ===== 搜尋列 ===== */
  .search-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 4px;
  }
  .search-bar select {
    flex: 1;
    min-width: 80px;
    font-size: 13px;
  }
  .search-bar input[type="text"] {
    flex: 2;
    min-width: 120px;
    font-size: 13px;
  }
  .search-bar button {
    font-size: 13px;
    padding: 6px 14px;
  }

  /* ===== 域名表格 ===== */
  .domain-table {
    font-size: 12px;
  }
  .domain-table th {
    padding: 6px 4px;
    font-size: 12px;
  }
  .domain-table td {
    padding: 5px 6px;
    font-size: 12px;
  }
  .domain-table td.cat {
    width: 60px;
    font-size: 12px;
  }
  .result-count {
    font-size: 12px;
    padding: 0 4px;
  }

  /* ===== 聯絡頁 ===== */
  .contact-info {
    font-size: 13px;
    padding: 0 8px;
  }

  /* ===== 後台管理 ===== */
  .admin-header {
    padding: 10px 12px;
    font-size: 16px;
  }
  .admin-header a {
    font-size: 12px;
  }
  .admin-container {
    margin: 0;
    padding: 12px;
    border-radius: 0;
  }

  /* 統計卡片 → 2列 */
  .stats-bar {
    gap: 8px;
  }
  .stat-card {
    min-width: calc(50% - 4px);
    flex: 1 1 calc(50% - 4px);
    padding: 10px;
  }
  .stat-card .num { font-size: 22px; }
  .stat-card .label { font-size: 12px; }

  /* 表單 → 標籤和輸入框上下排列 */
  .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .form-row label {
    width: auto;
    text-align: left;
    font-size: 13px;
  }
  .form-row input,
  .form-row select {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 14px;
    padding: 8px 10px;
  }
  .form-row input[type="text"] { min-width: 0 !important; }
  .form-row label[style] { margin-left: 0 !important; }

  /* 工具列 */
  .toolbar {
    gap: 6px;
  }
  .toolbar input[type="text"],
  .toolbar select {
    width: 100% !important;
    font-size: 13px;
  }
  .toolbar .spacer { display: none; }
  .toolbar .btn { flex: 1; min-width: 70px; }
  .btn-sm { padding: 6px 8px; font-size: 12px; }

  /* 管理表格 → 橫向滾動 */
  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .admin-table th,
  .admin-table td {
    font-size: 12px;
    padding: 6px 8px;
  }

  /* 登入頁 */
  .login-box {
    width: 90%;
    max-width: 320px;
    padding: 20px;
  }
  .login-box h2 { font-size: 18px; }
  .login-box input { font-size: 15px; }
  .login-box button { font-size: 15px; }

  /* 批量匯入 */
  #batchInput {
    font-size: 12px !important;
  }

  /* 設置區表單 */
  #settingsArea { padding: 12px !important; }
  #settingsArea .form-row input,
  #settingsArea .form-row select {
    width: 100% !important;
  }

  /* Toast 提示 */
  .toast {
    top: 10px;
    right: 10px;
    left: 10px;
    font-size: 13px;
    text-align: center;
  }
}

/* ---- 小手機 ---- */
@media (max-width: 480px) {
  .nav-btn {
    font-size: 14px;
    padding: 6px 10px;
    margin: 3px;
    border-width: 2px;
  }
  .domain-table {
    font-size: 11px;
  }
  .domain-table td { padding: 4px 3px; }
  .domain-table td.cat { width: 50px; }
  .stats-bar { gap: 6px; }
  .stat-card { padding: 8px; }
  .stat-card .num { font-size: 18px; }
  .stat-card .label { font-size: 11px; }
  .admin-header { font-size: 14px; padding: 8px 10px; }
  .admin-header a { font-size: 11px; }
}