/*
Theme Name: Nameremind Child
Description: Nameremind product presentation on the RiPro commercial foundation.
Author: Nameremind
Version: 1.0.0
Template: ripro-v5
Text Domain: nameremind-child
*/

/* ---------- Global Reset & Variables ---------- */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-sm: 0.5rem;
    --radius-xs: 0.375rem;
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* ---- 语义功能色（对比度达标组合） ---- */
    --color-success: #059669;
    --color-success-bg: #ecfdf5;
    --color-success-border: #a7f3d0;
    --color-warn: #d97706;
    --color-warn-bg: #fffbeb;
    --color-warn-border: #fde68a;
    --color-danger: #dc2626;
    --color-danger-bg: #fef2f2;
    --color-danger-border: #fecaca;
    --color-info: #2563eb;
    --color-info-bg: #eff6ff;
    --color-info-border: #bfdbfe;

    /* ---- 文字色阶 ---- */
    --text-strong: #111827;   /* 主标题（近黑） */
    --text-muted: #6b7280;    /* 次级正文 4.6:1 */
    --text-on-dark: #cbd5e1;  /* 深色底次级文字 */

    /* ---- 交互基线 ---- */
    --focus-ring-color: #6366f1;
    --touch-min: 44px;
    --transition-fast: 0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.6;
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { list-style: none; padding: 0; margin: 0; }
img, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ---------- Layout Containers ---------- */
.site-header, .site-footer {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
.site-header { position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.site-footer { border-top: 1px solid var(--border-color); border-bottom: none; background: #1e293b; color: #cbd5e1; margin-top: auto; }

.site-header-inner, .site-footer-inner, .site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* ---------- Branding & Navigation ---------- */
.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}
#primary-menu { display: flex; gap: 0.5rem; }
#primary-menu a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}
#primary-menu a:hover, #primary-menu .current-menu-item > a {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.08);
}

/* ---------- Buttons ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.button-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}
.button-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(79, 70, 229, 0.3);
}
.button-secondary {
    background: #fff;
    border-color: var(--border-color);
    color: var(--text-main);
}
.button-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff;
}

/* ---------- Domain Backorder Table Styles ---------- */
.domain-page {
    padding: 2rem 0;
}

/* 新增：通用面板卡片样式，用于头部和筛选区 */
.panel-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-head {
    margin-bottom: 1.5rem;
}

.section-head h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--text-main);
}

/* 筛选器样式 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
    flex: 1;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.filter-group select {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fff;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.filter-group select:focus {
    border-color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto; /* 将按钮推到右侧 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-actions {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .filter-actions .button {
        flex: 1;
    }
}

.domain-list {
    width: 100%;
    /* 默认行为：如果是表格，overflow-x auto；如果是网格，正常显示 */
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 1rem; /* 增加内边距使内容不贴边 */
}

/* 针对网格布局的特殊样式 (用于 domain-sell 和 index) */
.domain-grid-list, 
.home-domains .domain-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.domain-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* 保证表格不被过度压缩 */
    background: #fff; /* 确保表格背景为白色 */
}

.domain-table th, 
.domain-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.domain-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-main);
    position: relative;
    user-select: none;
}

.domain-table th:hover {
    background-color: #f1f5f9;
}

.domain-table th .sort-icon {
    font-size: 0.8em;
    color: var(--text-light);
    margin-left: 4px;
}

.domain-table th.asc .sort-icon,
.domain-table th.desc .sort-icon {
    color: var(--primary-color);
}

.domain-table tr:last-child td {
    border-bottom: none;
}

.domain-table tr:hover {
    background-color: #f8fafc;
}

.domain-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
    color: #92400e;
    font-size: 0.9rem;
    text-align: center;
}

/* Unified Card Styles for Sell and Index Pages */
.domain-card, 
.domain-card-simple {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.domain-card:hover, 
.domain-card-simple:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.domain-card-header, 
.domain-card-simple .domain-card-header {
    margin-bottom: 1rem;
}

.domain-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
    word-break: break-all;
}

.domain-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #eff6ff;
    color: var(--primary-color);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.domain-status-sell {
    background-color: #f0fdf4;
    color: #16a34a;
}

.domain-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.domain-card-footer, 
.domain-card-simple .domain-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.domain-actions-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Responsive adjustments for table */
@media (max-width: 768px) {
    .domain-table th, 
    .domain-table td {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .domain-grid-list, 
    .home-domains .domain-showcase {
        grid-template-columns: 1fr;
    }
}

/* ---------- Footer Specifics ---------- */
.site-footer-inner {
    padding: 3rem 1.5rem;
    text-align: center;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
}
.footer-links a:hover { color: #fff; }
.footer-legal {
    font-size: 0.85rem;
    color: #64748b;
}
.footer-legal a {
    color: #64748b;
    margin: 0 0.5rem;
}
.footer-legal a:hover { color: #94a3b8; }

/* ---------- Homepage Hero ---------- */
.home-hero {
    position: relative;
    text-align: center;
    padding: 4rem 2rem 3rem;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4f46e5 70%, #6366f1 100%);
    overflow: hidden;
}

.home-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 600px 400px at 20% 50%, rgba(99,102,241,0.4) 0%, transparent 70%),
                radial-gradient(ellipse 500px 300px at 80% 30%, rgba(129,140,248,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.home-hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }

.home-hero-badge {
    display: inline-block;
    padding: 0.35rem 1.2rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2rem;
    color: #c7d2fe;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.home-hero-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    margin-right: 6px;
    vertical-align: middle;
    animation: hero-pulse 2s ease-in-out infinite;
}
@keyframes hero-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.home-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.home-hero-sub {
    font-size: 1.15rem;
    color: #a5b4fc;
    margin: 0 auto 2rem;
    max-width: 560px;
    line-height: 1.6;
}

.home-hero-search {
    display: flex;
    max-width: 520px;
    margin: 0 auto 2rem;
    gap: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.home-hero-input {
    flex: 1;
    border: none;
    padding: 0 1.25rem;
    font-size: 1rem;
    outline: none;
    height: 52px;
    background: #fff;
    color: #1e293b;
}

.home-hero-input::placeholder { color: #94a3b8; }

.home-hero-btn {
    height: 52px;
    padding: 0 1.75rem;
    border: none;
    background: #f59e0b;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.home-hero-btn:hover { background: #d97706; }

.home-hero-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stat-badge {
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 2rem;
    color: #c7d2fe;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- Homepage Stats Bar ---------- */
.home-stats {
    padding: 2.5rem 2rem;
    background: #fff;
}

.home-stats-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.home-stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.home-stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}

.home-stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ---------- Section Head (shared) ---------- */
.section-head p {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.25rem;
}

/* ---------- Homepage Features ---------- */
.home-features {
    padding: 3.5rem 2rem;
    background: #f8fafc;
}

.home-features .section-head { text-align: center; }

.home-features-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.home-feature-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    position: relative;
}
.home-feature-card:nth-child(1) .feature-icon {
    background: linear-gradient(135deg, #4f46e5, #818cf8);
}
.home-feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, #059669, #34d399);
}
.home-feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, #d97706, #fbbf24);
}
.home-feature-card:nth-child(4) .feature-icon {
    background: linear-gradient(135deg, #dc2626, #f87171);
}
.feature-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
}
.home-feature-card:nth-child(1) .feature-icon::after {
    border-radius: 50%;
    width: 16px;
    height: 16px;
}
.home-feature-card:nth-child(2) .feature-icon::after {
    border-radius: 0;
    width: 18px;
    height: 10px;
}
.home-feature-card:nth-child(3) .feature-icon::after {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}
.home-feature-card:nth-child(4) .feature-icon::after {
    width: 18px;
    height: 12px;
    border-radius: 50% 50% 50% 0;
}

.home-feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}

.home-feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* ---------- Blog Section ---------- */
.home-blog {
    padding: 3.5rem 2rem;
    background: #fff;
}

.home-blog .section-head { text-align: center; }

.blog-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.blog-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.blog-card-inner {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.blog-card-title a {
    color: var(--text-main);
    text-decoration: none;
}

.blog-card-title a:hover { color: var(--primary-color); }

.blog-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-card-excerpt p { margin: 0; }

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.read-more:hover { text-decoration: underline; }

/* ---------- No Posts / Empty State ---------- */
.no-posts {
    text-align: center;
    padding: 3rem 1.5rem;
}

.no-posts .page-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .site-header-inner { height: auto; padding: 1rem 1.5rem; flex-direction: column; gap: 1rem; }
    #primary-menu { flex-wrap: wrap; justify-content: center; }
    .section-head h2 { font-size: 1.75rem; }

    .home-hero { padding: 3rem 1.25rem 2rem; }
    .home-hero-title { font-size: 2rem; }
    .home-hero-sub { font-size: 1rem; }
    .home-hero-search { flex-direction: column; border-radius: 0.5rem; }
    .home-hero-input { border-radius: 0; }
    .home-hero-btn { border-radius: 0; }

    .home-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .home-features-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .blog-grid { grid-template-columns: 1fr; }
    .home-stats { padding: 2rem 1.25rem; }
    .home-features { padding: 2.5rem 1.25rem; }
    .home-blog { padding: 2.5rem 1.25rem; }
}

/* ==========================================
   Homepage v2 — New Sections
   ========================================== */
.home-section { max-width: 1200px; margin: 0 auto; padding: 3rem 1.25rem; overflow: hidden; }
.section-tag { display: inline-block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 0.25rem 0.75rem; border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe); color: #4f46e5; margin-bottom: 0.5rem; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head h2 { font-size: 1.5rem; font-weight: 700; color: #111827; margin: 0 0 0.25rem; }
.section-head p { font-size: 0.9rem; color: #6b7280; margin: 0; }

.price-tabs { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.5rem; }
.price-tab { padding: 0.5rem 1.25rem; border: 1px solid #e5e7eb; border-radius: 999px;
  background: #fff; color: #6b7280; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; }
.price-tab:hover { border-color: #6366f1; color: #4f46e5; }
.price-tab.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

.price-drop-table { border: 1px solid #e5e7eb; border-radius: 0.75rem; overflow: hidden; }
.price-drop-header { display: grid; grid-template-columns: 1fr 100px 100px 80px 120px;
  padding: 0.75rem 1rem; background: #f9fafb; font-weight: 600;
  font-size: 0.78rem; color: #6b7280; text-transform: uppercase; }
.price-drop-row { display: grid; grid-template-columns: 1fr 100px 100px 80px 120px;
  padding: 0.75rem 1rem; border-top: 1px solid #f3f4f6;
  text-decoration: none; color: inherit; transition: background 0.15s; align-items: center; }
.price-drop-row:hover { background: #f9fafb; }
.pdd-col { font-size: 0.85rem; }
.pdd-col.domain { font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdd-col.old-price { text-decoration: line-through; color: #9ca3af; }
.pdd-col.new-price { font-weight: 600; color: #059669; }
.pdd-col.time { font-size: 0.78rem; color: #9ca3af; }
.drop-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
  background: #fef2f2; color: #dc2626; font-weight: 600; font-size: 0.78rem; }

.ranking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.ranking-card { border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.25rem; background: #fff; }
.ranking-title { font-size: 1rem; font-weight: 700; color: #111827; margin: 0 0 1rem; }
.ranking-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ranking-row { display: grid; grid-template-columns: 28px 1fr 80px 1fr; gap: 0.5rem; align-items: center; }
.ranking-pos { font-size: 0.78rem; font-weight: 700; color: #9ca3af; text-align: center; }
.ranking-row:nth-child(1) .ranking-pos { color: #f59e0b; }
.ranking-row:nth-child(2) .ranking-pos { color: #94a3b8; }
.ranking-row:nth-child(3) .ranking-pos { color: #d97706; }
.ranking-name { font-weight: 600; font-size: 0.9rem; color: #111827; }
.ranking-count { font-size: 0.78rem; color: #6b7280; text-align: right; }
.ranking-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.ranking-bar span { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #a78bfa); border-radius: 3px; transition: width 0.3s; }

.ai-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.ai-card { display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1rem;
  background: #fff; text-decoration: none; transition: all 0.2s; }
.ai-card:hover { border-color: #6366f1; box-shadow: 0 4px 12px rgba(99,102,241,0.1); transform: translateY(-2px); }
.ai-card-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.ai-score-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.grade-a { background: #ecfdf5; color: #059669; }
.grade-b { background: #eff6ff; color: #2563eb; }
.grade-c { background: #fefce8; color: #d97706; }
.grade-d { background: #fef2f2; color: #dc2626; }
.ai-score-num { font-size: 0.85rem; font-weight: 700; color: #4f46e5; }
.ai-domain { font-size: 0.9rem; font-weight: 600; color: #111827; margin: 0 0 0.5rem; }
.ai-card-bottom { display: flex; justify-content: space-between; align-items: center; }
.ai-price { font-size: 0.85rem; font-weight: 700; color: #059669; }
.ai-label { font-size: 0.72rem; color: #6b7280; }

.trend-chart { border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.5rem; background: #fff; }
.trend-bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 180px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.trend-bar-group { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; width: 100%; align-items: center; }
.trend-bar { width: 60%; min-height: 2px; border-radius: 3px 3px 0 0; transition: height 0.5s; position: relative; }
.trend-bar-up { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
.trend-bar-down { background: linear-gradient(180deg, #6366f1, #818cf8); }
.trend-val { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 0.68rem; color: #6b7280; white-space: nowrap; }
.trend-label { font-size: 0.72rem; color: #6b7280; margin-top: 0.5rem; }
.trend-legend { display: flex; gap: 1.5rem; justify-content: center; margin-top: 1rem; font-size: 0.82rem; color: #6b7280; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.35rem; }
.dot-up { background: #f59e0b; }
.dot-down { background: #6366f1; }

.kw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.kw-card { border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1rem 1.25rem; background: #fff; transition: all 0.2s; }
.kw-card:hover { border-color: #818cf8; box-shadow: 0 2px 8px rgba(99,102,241,0.08); }
.kw-name { font-size: 1.1rem; font-weight: 700; color: #111827; margin: 0 0 0.75rem; text-transform: capitalize; }
.kw-stat { display: flex; justify-content: space-between; padding: 0.25rem 0; font-size: 0.82rem; }
.kw-stat-label { color: #6b7280; }
.kw-stat-value { font-weight: 600; color: #111827; }
.kw-link { display: inline-block; margin-top: 0.5rem; font-size: 0.78rem; color: #6366f1; text-decoration: none; font-weight: 500; }
.kw-link:hover { text-decoration: underline; }
@media (max-width: 900px) { .kw-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .kw-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 768px) {
  .price-drop-header, .price-drop-row { grid-template-columns: 1fr 70px 70px 60px; }
  .price-drop-header .pdd-col.time, .price-drop-row .pdd-col.time { display: none; }
  .ranking-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: repeat(2, 1fr); }
  .trend-bar { width: 40%; }
}
@media (max-width: 480px) {
  .ai-grid { grid-template-columns: 1fr; }
  .price-tabs { flex-wrap: wrap; }
}
.mini-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; }
.mini-card { display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.75rem; text-decoration: none; transition: all 0.2s; background: #fff; }
.mini-card:hover { border-color: #818cf8; transform: translateY(-1px); }
.mini-domain { font-size: 0.82rem; font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: keep-all; }
.mini-price { font-size: 0.78rem; color: #059669; font-weight: 500; margin-top: 0.25rem; }
.zone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.zone-card { border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.25rem; background: #fff; }
.zone-card h3 { font-size: 0.95rem; font-weight: 700; color: #111827; margin: 0 0 0.75rem; }
.zone-card h3 small { font-weight: 400; color: #6b7280; font-size: 0.78rem; }
@media (max-width: 768px) { .mini-grid { grid-template-columns: repeat(3,1fr); } .zone-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .mini-grid { grid-template-columns: repeat(2,1fr); } }
/* Scored Domain Cards */
.scored-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.scored-card {
  border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1rem;
  background: #fff; text-decoration: none; transition: all 0.2s;
}
.scored-card:hover { border-color: #818cf8; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99,102,241,0.1); }
.scored-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.scored-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  color: #fff; font-size: 0.8rem; font-weight: 700;
}
.scored-domain { font-size: 0.85rem; font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scored-bars { display: flex; flex-direction: column; gap: 3px; margin-bottom: 0.5rem; }
.scored-bar { height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; }
.scored-bar span { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #6366f1, #818cf8); }
.scored-bar .bar-suffix span { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.scored-bar .bar-price span { background: linear-gradient(90deg, #10b981, #34d399); }
.scored-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; font-weight: 600; color: #059669; }
@media (max-width: 768px) { .scored-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .scored-grid { grid-template-columns: 1fr; } }

/* ==========================================
   Design Tokens & Global UI Baseline（阶段C·批1）
   追加式增强：焦点可见性 / 触控目标 / 动效偏好 / 对比度统一
   不改动既有规则，仅补充与覆盖明确缺陷
   ========================================== */

/* ---- 键盘焦点可见性 ---- */
:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
}
/* 覆盖显式 outline:none 的控件（保留其原生 :focus 边框色反馈） */
.search-box input:focus-visible,
.filter-select:focus-visible,
.filter-group select:focus-visible,
.form-group input:focus-visible,
.form-group select:focus-visible,
.picker-select:focus-visible,
.picker-wrapper select:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 1px;
}

/* ---- 动效偏好：尊重系统「减少动态」 ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- 触屏设备：交互控件最小触控高度（44px） ---- */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .button,
    .picker-trigger,
    .btn-trigger-tld,
    .picker-select,
    .btn-query,
    .btn-reset,
    .btn-save-settings,
    .dropdown-compose-btn,
    .summary-clear-link,
    .diylist,
    .domain-tag,
    .tag-create-alert,
    .search-box input,
    .filter-inc-text,
    .filter-exc-text,
    .filter-price-inp {
        min-height: var(--touch-min);
    }
    .domain-tag { margin-bottom: 3px; }
}

/* ---- 白底小字对比度统一：#94a3b8 / #9ca3af → #6b7280（4.6:1） ---- */
.pdd-col.old-price,
.pdd-col.time,
.ranking-pos { color: #6b7280; }

/* ---- SVG 图标：标题/按钮内联对齐 ---- */
.nav-icon { vertical-align: -0.15em; }

/* ---- 首页会员方案（阶段C·批3：响应式三卡，替代内联三列 grid） ---- */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.plans-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}
.plans-card.plans-recommended {
    background: #fff;
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}
.plans-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #f59e0b; color: #fff; font-size: 0.72rem; padding: 0.15rem 0.75rem;
    border-radius: 10px; font-weight: 600;
}
.plans-name { font-size: 0.82rem; color: #6b7280; margin-bottom: 0.25rem; }
.plans-recommended .plans-name { color: #f59e0b; font-weight: 600; }
.plans-price { font-size: 2rem; font-weight: 700; color: #111827; }
.plans-sub { font-size: 0.78rem; color: #6b7280; margin-bottom: 1rem; }
.plans-features {
    list-style: none; padding: 0; margin: 0 0 1.25rem;
    text-align: left; font-size: 0.85rem; color: #374151;
}
.plans-features li { padding: 0.35rem 0; }
.plans-current { font-size: 0.82rem; color: #6b7280; }
.plans-btn {
    background: #f59e0b; border: none; color: #fff; font-weight: 600;
    padding: 0.5rem 1.5rem; border-radius: 6px; font-size: 0.9rem;
    text-decoration: none; display: inline-block;
}
.plans-btn-dark { background: #111827; }
@media (max-width: 768px) { .plans-grid { grid-template-columns: 1fr; } }

/* ---- 弹窗/查询输入框焦点边框反馈（替代原内联 onfocus 事件） ---- */
#alert-email:focus,
#whois-domain:focus { border-color: #667eea; }

/* ---- 首页热门标签 hover 反馈（替代原内联 onmouseover/out） ---- */
.hot-search-tag:hover { background: rgba(147, 197, 253, 0.15); }
.hot-tag-link:hover,
.hot-tag-preset:hover { background: rgba(255, 255, 255, 0.2); }

/* Nameremind UI pass: compact and readable on mobile */
html, body { max-width: 100%; overflow-x: hidden; }
.site-content { width: 100%; }
@media (max-width: 768px) {
    .site-header-inner { min-height: 64px; padding: .7rem 1rem; gap: .55rem; }
    .site-branding { width: 100%; text-align: center; }
    .site-title { font-size: 1.35rem; }
    .site-description { display: none; }
    .nav-toggle-button { display: none; }
    .main-navigation { width: 100%; }
    #primary-menu { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .3rem; width: 100%; }
    #primary-menu a { display:flex; min-height:38px; align-items:center; justify-content:center; padding:.35rem .25rem; font-size:.82rem; line-height:1.25; text-align:center; white-space:normal; }
    .site-main { padding-left: .85rem; padding-right: .85rem; }
}
@media (max-width: 420px) {
    #primary-menu { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #primary-menu a { min-height:36px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
