/* css/cdn_style.css - 极简现代化风格 */

:root {
    --primary-hw: #e73038;  /* 华为红优化版 */
    --primary-tc: #006eff;  /* 腾讯蓝优化版 */
    --primary-ali: #ff6a00; /* 阿里橙 */
    --bg-page: #f0f2f5;
    --text-main: #333;
    --text-sub: #888;
    --card-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 16px rgba(0,0,0,0.1);
}

body.jiami-tool-body {
    background-color: var(--bg-page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tool-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* === 头部优化 === */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
}
.tool-header h1 {
    font-size: 28px;
    color: #1a1a1a;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.tool-header p {
    color: #666;
    font-size: 14px;
}

/* === 账号选择区 (三栏卡片) === */
.account-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.provider-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid rgba(0,0,0,0.03);
}
.provider-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* 厂商头部颜色条 */
.col-hw { border-top: 5px solid var(--primary-hw); }
.col-tc { border-top: 5px solid var(--primary-tc); }
.col-ali { border-top: 5px solid var(--primary-ali); }

.provider-header {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.provider-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.provider-link {
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}
.provider-link:hover { opacity: 0.8; }

/* 产品开关 (Pill 样式) */
.product-switch {
    display: flex;
    gap: 8px;
}
.product-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}
.product-pill:hover { background: #eee; }
.product-pill input { cursor: pointer; }

/* 账号列表 */
.acc-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
    background: #fafafa;
}
.acc-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
}
.acc-item:hover {
    border-color: #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.acc-item input { margin-right: 10px; transform: scale(1.1); }
.acc-name { font-weight: 600; font-size: 14px; color: #333; }
.acc-note { font-size: 12px; color: #999; margin-left: auto; background: #f5f5f5; padding: 2px 6px; border-radius: 4px; }

/* 复选框强调色 */
.hw-chk:checked { accent-color: var(--primary-hw); }
.tc-chk:checked { accent-color: var(--primary-tc); }
.ali-chk:checked { accent-color: var(--primary-ali); }


/* === 搜索操作栏 (灵动岛风格) === */
.sticky-header-container {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.btn-search {
    background: linear-gradient(135deg, #2b2b2b 0%, #000 100%);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 30px; /* 圆润按钮 */
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    min-width: 140px;
}
.btn-search:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(0,0,0,0.25); }
.btn-search:active { transform: scale(0.98); }
.btn-search:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

.search-input-group {
    flex: 1;
    position: relative;
}
.search-input {
    width: 100%;
    border: none;
    background: #f0f2f5;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}
.search-input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.total-badge {
    background: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border: 1px solid #eee;
}


/* === 结果区域 (小卡片网格) === */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* 更加紧凑 */
    gap: 15px;
}

.mini-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mini-card:hover {
    border-color: #ddd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

/* 顶部：域名 + 复制 */
.mc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.mc-domain {
    font-weight: 700;
    font-size: 15px;
    color: #222;
    word-break: break-all;
    line-height: 1.4;
}
.mc-copy {
    opacity: 0;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
}
.mini-card:hover .mc-copy { opacity: 1; }
.mc-copy:hover { color: var(--primary-tc); transform: scale(1.2); }

/* 中部：CNAME/源站 */
.mc-info {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mc-tag {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 底部：状态 + 账号 */
.mc-footer {
    margin-top: auto; /* 推到底部 */
    padding-top: 10px;
    border-top: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

/* 状态点 */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.dot-green { background: #00b894; box-shadow: 0 0 6px rgba(0,184,148,0.4); }
.dot-red   { background: #d63031; box-shadow: 0 0 6px rgba(214,48,49,0.4); }
.dot-blue  { background: #0984e3; box-shadow: 0 0 6px rgba(9,132,227,0.4); }

.acc-badge {
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 10px;
}