/* css/dnsla.css - DNSLA 域名管理专用样式 */

/* --- 基础与加载动画 --- */
.loading-spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; vertical-align: middle; margin-right: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 核心布局：顶部双模块并排 --- */
.top-modules-grid { display: grid; grid-template-columns: 3.5fr 6.5fr; gap: 20px; margin-bottom: 20px; align-items: stretch; }
.top-modules-grid .card { height: 100%; margin-bottom: 0; display: flex; flex-direction: column; }
.top-modules-grid .card-body { flex: 1; display: flex; flex-direction: column; padding: 15px; }

/* --- 左侧：账号列表 --- */
.account-scroll-area { flex: 1; max-height: 220px; overflow-y: auto; padding-right: 5px; }
.account-scroll-area::-webkit-scrollbar { width: 4px; }
.account-scroll-area::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
.account-grid-compact { display: grid; grid-template-columns: 1fr; gap: 8px; }
.account-item { position: relative; display: flex; align-items: center; padding: 10px 12px; border: 2px solid #eef2f7; border-radius: 10px; cursor: pointer; transition: all 0.2s; background: #fff; user-select: none; font-size: 13px; }
.account-item:hover { border-color: #a0ccdb; background-color: #f8faff; }
.account-item.selected { border-color: #667eea; background-color: #f8faff; }
.account-item.selected label { color: #667eea; }
.account-item input[type="checkbox"] { display: none; }
.account-item::before { content: ''; display: inline-block; width: 16px; height: 16px; border: 2px solid #ddd; border-radius: 50%; margin-right: 10px; transition: all 0.2s; }
.account-item.selected::before { background-color: #667eea; border-color: #667eea; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='10px' height='10px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.account-item label { cursor: pointer; font-weight: 600; color: #636e72; margin: 0; flex-grow: 1; }

/* --- 右侧：批量添加布局 --- */
.batch-flex-layout { display: flex; gap: 15px; height: 100%; }
.batch-input-wrapper { flex: 1; display: flex; flex-direction: column; }
.batch-textarea { width: 100%; height: 100%; min-height: 180px; padding: 12px; border: 1px solid #e9ecef; border-radius: 8px; font-family: inherit; resize: none; font-size: 13px; line-height: 1.6; }
.batch-controls-wrapper { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.control-label { font-size: 12px; font-weight: 700; color: #636e72; margin-bottom: 4px; display: block; }
.compact-select { padding: 8px; font-size: 13px; height: 36px; width: 100%; border: 1px solid #dfe6e9; border-radius: 6px; }

/* --- 锁定遮罩 --- */
.account-selector-wrapper { position: relative; z-index: 10; border-radius: 12px; overflow: hidden; margin-bottom: 20px; } /* 增加下边距 */
.lock-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(4px); z-index: 2000; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.3s; }
.lock-icon { font-size: 40px; margin-bottom: 15px; color: #636e72; }
.btn-unlock { background-color: #2d3436; color: #fff; padding: 10px 30px; border-radius: 30px; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: transform 0.2s; }
.btn-unlock:hover { transform: scale(1.05); background-color: #000; }

/* --- 核心：吸顶栏样式 --- */
.sticky-header-container {
    position: -webkit-sticky; /* Safari */
    position: sticky; 
    top: 0; 
    z-index: 999; 
    background-color: #f7f8fa; /* 背景色必须不透明，否则内容会重叠 */
    padding-top: 15px; 
    padding-bottom: 10px; 
    margin-top: 0;
    transition: all 0.3s ease;
    /* 增加一个底部阴影，滚动时更好看 */
    box-shadow: 0 5px 15px -10px rgba(0,0,0,0.1);
}
/* 锁定状态：半透明且不可点 */
.sticky-locked { opacity: 0.5; pointer-events: none; filter: grayscale(100%); user-select: none; }

/* --- 搜索栏 --- */
.action-bar { display: flex; gap: 20px; margin-bottom: 10px; align-items: flex-start; }
.action-btn-group { flex: 1; }
.search-group { flex: 2; display: flex; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-radius: 12px; background: #fff; border: 1px solid #eee; overflow: hidden; }
.search-input { flex: 1; border: none; padding: 15px; font-size: 14px; outline: none; background: transparent; resize: none; font-family: inherit; min-height: 52px; }
.search-btn { border-radius: 0 12px 12px 0 !important; padding: 0 30px !important; margin: 0 !important; box-shadow: none !important; }

/* --- 分组标签 --- */
#groupFilters { display: none; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; padding: 15px; background: #fff; border-radius: 12px; border: 1px solid #f0f0f0; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.group-tag { padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; background: #f1f2f6; color: #636e72; transition: all 0.2s; user-select: none; }
.group-tag:hover { background: #dfe6e9; transform: translateY(-1px); }
.group-tag.active { background: #6c5ce7; color: #fff; box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3); }
.group-tag.all { background: #2d3436; color: #fff; }
.group-tag.all.active { background: #000; }

/* --- 结果展示 --- */
.domain-card { border: 1px solid #f0f0f0; border-radius: 12px; margin-bottom: 15px; background: #fff; transition: all 0.2s; }
.domain-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.06); transform: translateY(-2px); }
.domain-header { padding: 18px 20px; background: #fff; display: flex; justify-content: space-between; align-items: center; cursor: pointer; border-bottom: 1px solid #f8f8f8; border-radius: 12px 12px 0 0; }
.domain-header h3 { margin: 0; font-size: 16px; color: #2d3436; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.domain-meta { font-size: 13px; color: #636e72; margin-top: 8px; display: flex; gap: 20px; align-items: center; }

.record-table-container { padding: 0; display: none; background: #fdfdfd; border-radius: 0 0 12px 12px; }
.domain-card.open .record-table-container { display: block; border-top: 1px solid #f0f0f0; }
.toggle-icon { transition: transform 0.3s; margin-left: 10px; color: #b2bec3; }
.domain-card.open .toggle-icon { transform: rotate(180deg); color: #667eea; }

.record-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.record-table th { text-align: left; color: #b2bec3; padding: 12px 20px; border-bottom: 1px solid #f0f0f0; font-weight: 500; background: #fafafa; }
.record-table td { padding: 12px 20px; border-bottom: 1px solid #f0f0f0; color: #2d3436; }
.data-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; display: block; }

/* --- 按钮与徽章 --- */
.btn-primary-gradient { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.btn-primary-gradient:hover { background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1); }
.btn-success-gradient { background: linear-gradient(135deg, #00b894 0%, #00cec9 100%); color: #fff; }
.btn-success-gradient:hover { background: linear-gradient(135deg, #00cec9 0%, #00b894 100%); }
.btn-large { padding: 12px 25px; font-size: 15px; height: 100%; width: 100%; }

.badge { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-success { background: #e6fffa; color: #00b894; }
.badge-warning { background: #fff3cd; color: #b7791f; }
.badge-account { background-color: #6c5ce7; color: white; font-size: 11px; padding: 2px 8px; border-radius: 10px; vertical-align: middle; opacity: 0.8; }

.action-btn { border: none; background: none; cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 4px; margin-right: 5px; }
.btn-edit { color: #0984e3; background: rgba(9, 132, 227, 0.1); }
.btn-delete { color: #d63031; background: rgba(214, 48, 49, 0.1); }
.btn-add-record { font-size: 13px; padding: 6px 12px; background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%); color: white; border-radius: 6px; border: none; cursor: pointer; margin-right: 15px; }
.copy-btn { display: inline-flex; align-items: center; justify-content: center; background: rgba(108, 92, 231, 0.1); color: #6c5ce7; border: none; border-radius: 4px; padding: 2px 6px; margin-left: 8px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.copy-btn:hover { background: #6c5ce7; color: white; }

/* --- 返回顶部 --- */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%); color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 24px; cursor: pointer; box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; z-index: 1000; border: none; }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* --- Modal --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(3px); z-index: 2000; justify-content: center; align-items: center; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content { background: #fff; width: 450px; max-width: 90%; border-radius: 12px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.modal-title { font-size: 18px; font-weight: bold; }
.modal-close { cursor: pointer; font-size: 24px; color: #aaa; }
.modal-footer { margin-top: 25px; display: flex; justify-content: flex-end; gap: 10px; }
.hidden { display: none !important; }

/* 响应式 */
@media (max-width: 992px) {
    .top-modules-grid { grid-template-columns: 1fr; }
    .batch-flex-layout { flex-direction: column; }
    .batch-controls-wrapper { width: 100%; }
    .action-bar { flex-direction: column; }
    .search-btn { width: 100%; border-radius: 8px !important; margin-top: 10px !important; }
}

/* --- 新增：暂停/恢复按钮样式 --- */
.btn-pause { 
    color: #f0932b; 
    background: rgba(240, 147, 43, 0.1); 
}
.btn-pause:hover { 
    background: #f0932b; 
    color: #fff; 
}

.btn-resume { 
    color: #00b894; 
    background: rgba(0, 184, 148, 0.1); 
}
.btn-resume:hover { 
    background: #00b894; 
    color: #fff; 
}
/* --- 顶部标题栏 NS 信息样式 --- */
.header-ns-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.header-ns-label {
    color: #636e72;
    font-weight: 600;
}

.header-ns-item {
    display: flex;
    align-items: center;
    background-color: #f0f7ff;
    color: #2d3436;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #cce4f7;
    font-family: 'Consolas', monospace;
    font-weight: 500;
}

.header-ns-copy {
    margin-left: 8px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 13px;
    color: #0984e3;
    display: flex;
    align-items: center;
    padding: 0;
    transition: transform 0.2s;
}

.header-ns-copy:hover {
    color: #00b894;
    transform: scale(1.2);
}

/* 响应式：手机端隐藏 NS 信息，避免标题栏太挤 */
@media (max-width: 768px) {
    .header-ns-group { display: none; }
}