* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #eef2f9;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    padding: 20px 16px 30px;
    color: #1a2a3a;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.news-container {
    max-width: 830px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 40, 80, 0.08);
    overflow: hidden;
    padding: 20px 16px 24px;
    transition: all 0.2s;
}
.header-hero-outside {
    width: 100%;
    max-width: 830px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 20, 40, 0.06);
    padding: 18px 28px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: nowrap; /* ← 修改：改为 nowrap，防止换行 */
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(0, 80, 160, 0.06);
    transition: all 0.2s;
}

.header-hero-left {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 14px;
    flex-shrink: 0; /* ← 新增：防止被压缩 */
}

.header-hero-title {
    font-size: 26px;
    font-weight: 700;
    color: #0a2a44;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #0b3b5e, #1a5a8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap; /* ← 新增：防止标题文字折行 */
}

.header-hero-domain {
    font-size: 16px;
    color: #2f5577;
    font-weight: 400;
    background: rgba(230, 242, 250, 0.6);
    padding: 2px 14px 2px 12px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
}

.header-hero-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* ← 新增：防止被压缩 */
}

.header-hero-home {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #1e4a6e;
    background: #f0f6fe;
    padding: 4px 16px 4px 12px;
    border-radius: 40px;
    border: 1px solid rgba(0, 60, 120, 0.08);
    text-decoration: none;
    font-weight: 500;
    transition: 0.15s;
    white-space: nowrap; /* ← 新增：防止按钮文字折行 */
}

.header-hero-home:hover {
    background: #dce8f5;
    border-color: #b0c8dd;
}

.header-hero-home::before {
    content: "🏠";
    font-size: 16px;
    margin-right: 4px;
}
/* ===== 添加网站专用样式 ===== */
.add-site-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 8px 0;
}

.add-site-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e6edf4;
    box-shadow: 0 2px 12px rgba(0, 20, 40, 0.04);
    padding: 28px 32px;
    margin-bottom: 28px;
    transition: all 0.2s;
}

.add-site-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #0a2a44;
    border-bottom: 2px solid #e6edf4;
    padding-bottom: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-site-card-title .icon {
    font-size: 22px;
}

.add-site-form-group {
    margin-bottom: 20px;
}

.add-site-form-group label {
    display: block;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 14px;
    margin-bottom: 6px;
}

.add-site-form-group label .required {
    color: #cc3344;
    margin-left: 2px;
}

.add-site-form-group input,
.add-site-form-group select,
.add-site-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0dcec;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fafdff;
    color: #1e2a3a;
}

.add-site-form-group input:focus,
.add-site-form-group select:focus,
.add-site-form-group textarea:focus {
    outline: none;
    border-color: #0a4870;
    box-shadow: 0 0 0 3px rgba(10, 72, 112, 0.08);
}

.add-site-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.add-site-form-group .hint {
    font-size: 13px;
    color: #6a7f96;
    margin-top: 4px;
}

.add-site-form-group .error-msg {
    color: #cc3344;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.add-site-form-group .error-msg.show {
    display: block;
}

.add-site-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.add-site-submit-btn {
    background: #0a4870;
    color: white;
    border: none;
    padding: 10px 36px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.3px;
}

.add-site-submit-btn:hover {
    background: #0d5a8a;
}

.add-site-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-site-tip {
    background: #f0f6fe;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    color: #1e3a5f;
    margin-top: 6px;
    border-left: 3px solid #0a4870;
}

.add-site-tip strong {
    color: #0a2a44;
}

/* ===== 成功提示 ===== */
.success-toast {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1e5a2a;
    padding: 12px 18px;
    border-radius: 12px;
    margin-top: 16px;
    display: none;
    font-weight: 500;
}

.success-toast.show {
    display: block;
}

/* ===== 移动端隐藏域名 ===== */
.hide-on-mobile {
    display: inline-block;
}

/* ===== 移动端适配 ===== */
@media (max-width: 640px) {
    .add-site-card {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .add-site-card-title {
        font-size: 18px;
    }

    .add-site-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .add-site-submit-btn {
        width: 100%;
        justify-content: center;
    }

    /* ===== 头部适配 - 保持一行 ===== */
    .header-hero-outside {
        flex-direction: row; /* ← 保持一行 */
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 14px 16px;
        border-radius: 32px;
    }

    .header-hero-title {
        font-size: 20px; /* ← 调小字体 */
    }

    .header-hero-right {
        width: auto;
        justify-content: flex-end;
        flex-shrink: 0;
    }

    .header-hero-home {
        font-size: 12px;
        padding: 3px 12px 3px 8px;
    }

    .header-hero-home::before {
        font-size: 14px;
    }

    /* ===== 手机端隐藏域名 ===== */
    .hide-on-mobile {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .header-hero-title {
        font-size: 17px;
    }
    .header-hero-home {
        font-size: 11px;
        padding: 2px 10px 2px 6px;
    }
    .header-hero-home::before {
        font-size: 12px;
    }
}