/* ===== 爱云工具箱 - 公共样式表 =====
 * 适用：所有子页面（about/privacy/sitemap/tutorial等）
 * 版本：2026-05-13
 * 说明：与index.html导航栏保持一致，统一视觉风格
 */

/* ---------- 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;

    /* 辅助色 */
    --secondary-color: #1e293b;
    --accent-color: #dc2626;
    --success-color: #10b981;
    --warning-color: #f59e0b;

    /* 背景色 */
    --bg-page: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --bg-card: #ffffff;
    --bg-light: #f8fafc;

    /* 文字色 */
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;

    /* 边框与阴影 */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 6px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

    /* 圆角与过渡 */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg-page);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- 导航栏 ---------- */
.top-nav {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    flex-shrink: 0;
    white-space: nowrap;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.9;
}

.logo img {
    height: 26px;
    width: auto;
    display: block;
    border: none;
}

/* 图片加载失败时隐藏 */
.logo img[src=""],
.logo img:not([src]) {
    display: none;
}

.logo i {
    font-size: 20px;
    color: #1abc9c;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    gap: 5px;
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* ---------- 主体容器 ---------- */
.wrap {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.wrap-wide {
    max-width: 1200px;
}

/* 内容卡片 */
.card {
    background: var(--bg-card);
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ---------- 排版 ---------- */
h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 25px;
    color: var(--secondary-color);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
}

h2 {
    font-size: 22px;
    color: var(--secondary-color);
    margin: 30px 0 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    color: var(--primary-color);
    font-size: 20px;
}

h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin: 25px 0 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

h3 i {
    color: var(--primary-color);
}

h4 {
    font-size: 16px;
    color: var(--text-medium);
    margin: 18px 0 10px;
    font-weight: 600;
}

p {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 16px;
    line-height: 1.8;
}

/* 首行缩进段落 */
.indent p {
    text-indent: 2em;
}

/* ---------- 链接 ---------- */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ---------- 列表 ---------- */
ul, ol {
    margin: 12px 0;
    padding-left: 20px;
}

ul li, ol li {
    margin: 8px 0;
    color: var(--text-medium);
    line-height: 1.7;
}

/* 无符号列表 */
.list-none {
    list-style: none;
    padding-left: 0;
}

.list-none li {
    padding-left: 20px;
    position: relative;
}

.list-none li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ---------- 表格 ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 15px;
}

table th {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    text-align: left;
    background: var(--bg-light);
    font-weight: 600;
    color: var(--secondary-color);
    white-space: nowrap;
}

table td {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    vertical-align: top;
    color: var(--text-medium);
}

table tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

.table-wrapper {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: var(--radius);
}

/* ---------- 表单元素 ---------- */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-card);
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-warning {
    background: var(--warning-color);
    color: #fff;
}

/* ---------- 提示框 ---------- */
.tip-box {
    background: rgba(37, 99, 235, 0.08);
    border-left: 4px solid var(--primary-color);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.tip-box p {
    margin-bottom: 0;
    font-size: 15px;
}

.tip-box strong {
    color: var(--primary-dark);
}

/* 警告提示 */
.alert-box {
    background: rgba(245, 158, 11, 0.08);
    border-left: 4px solid var(--warning-color);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* 成功提示 */
.success-box {
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid var(--success-color);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- 特色模块 ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.feature-item h4 {
    font-size: 17px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-item h4 i {
    color: var(--primary-color);
    font-size: 18px;
}

.feature-item p {
    text-indent: 0;
    margin-bottom: 0;
    font-size: 15px;
    color: var(--text-light);
}

/* ---------- 底部 ---------- */
.foot {
    text-align: center;
    margin: 50px 0 30px;
    color: var(--text-light);
    font-size: 14px;
    padding: 0 20px;
    line-height: 2;
}

.foot p {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.foot a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.foot a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* ---------- 广告位 ---------- */
.ad-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px dashed var(--warning-color);
    padding: 18px;
    text-align: center;
    margin: 25px 0;
    border-radius: var(--radius);
    color: #92400e;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ad-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.15);
}

.ad-box::before {
    content: '广告';
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--warning-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    opacity: 0.9;
}

/* ---------- 工具网格 ---------- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    text-align: center;
    padding: 24px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-item:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.tool-item:hover::before {
    transform: scaleX(1);
}

.tool-item i {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary-color);
    transition: var(--transition);
}

.tool-item:hover i {
    color: #fff;
}

.tool-item span {
    font-size: 14px;
    font-weight: 500;
}

/* ---------- 备案信息框 ---------- */
.icp-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    padding: 16px;
    text-align: center;
    margin: 20px 0;
    border-radius: var(--radius);
    color: #0369a1;
    font-size: 14px;
}

.icp-box a {
    color: #0369a1;
    font-weight: 600;
    border-bottom: 1px dashed #0369a1;
}

.icp-box a:hover {
    color: #0284c7;
    border-bottom-style: solid;
}

/* ---------- 响应式断点 ---------- */

/* 中等屏幕 */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .logo {
        font-size: 16px;
    }

    .logo img {
        height: 24px;
    }

    .nav-links a {
        font-size: 14px;
        padding: 6px 10px;
    }

    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* 平板/手机横屏 */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        padding: 10px 15px;
        gap: 10px;
    }

    .logo {
        font-size: 16px;
        order: 1;
        flex: 1;
    }

    .logo img {
        height: 24px;
    }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        order: 4;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        border-radius: 0;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .wrap {
        margin: 20px auto;
        padding: 0 15px;
    }

    .card {
        padding: 24px 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 17px;
    }

    p {
        font-size: 15px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tool-item {
        padding: 18px 8px;
    }

    .tool-item i {
        font-size: 24px;
    }

    table {
        font-size: 14px;
    }

    table th,
    table td {
        padding: 10px 8px;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    table {
        min-width: 400px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .logo {
        font-size: 15px;
        gap: 6px;
    }

    .logo img {
        height: 22px;
    }

    .card {
        padding: 20px 15px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}