/*头部文件*/
/* ==================== 超美观响应式导航：手机自动两行 ==================== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    font-size: 28px;
    font-weight: bold;
    color: #ff6b35;
    white-space: nowrap;
}

.logo img {
    height: 76px;
}

.logo span {
    color: #ff6b35;
}


/* 导航核心：手机自动换行 + 居中 + 美观 */
.nav-links {
    display: flex;
    flex-wrap: wrap;           /* 关键！允许换行 */
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.nav-links a {
    color: #333;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s;
    white-space: nowrap;
    background: transparent;
}

.nav-links a:hover {
    background: #fff0eb;
    color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.2);
}

/* 手机端：两行布局，字体稍小，间距紧凑 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 14px 0;
    }
    .logo {
        margin-bottom: 12px;
        font-size: 24px;
    }
    .logo img {
        height: 64px;
    }
    .nav-links {
        gap: 12px 20px;  /* 垂直12px，水平20px */
    }
    .nav-links a {
        font-size: 16px;
        padding: 10px 18px;
        border-radius: 50px;
    }
}

    /*主页*/
        :root {
            --primary: #FF6A3D;
            --accent: #1A9FFF;
            --bg: #fafbfc;
            --card-bg: #ffffff;
        }
        * { margin:0; padding:0; box-sizing:border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "Segoe UI", sans-serif;
            background: var(--bg);
            color: #333;
            line-height: 1.6;
        }
        .container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

        header {
            background: white;
            padding: 24px 0;
            box-shadow: 0 2px 20px rgba(0,0,0,0.08);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .logo {
            font-size: 32px;
            font-weight: 900;
            background: linear-gradient(120deg, #FF6A3D, #FF8E53);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: inline-block;
        }
        .logo i { margin-right: 8px; color: #FF6A3D; }

        /* 超大搜索框 */
        .search-box {
            margin: 40px auto;
            max-width: 720px;
            position: relative;
        }
        .search-box input {
            width: 100%;
            padding: 18px 70px 18px 24px;
            font-size: 18px;
            border: 3px solid var(--primary);
            border-radius: 50px;
            outline: none;
        }
        .search-box button {
            position: absolute;
            right: 6px;
            top: 6px;
            width: 56px;
            height: 56px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 50%;
            font-size: 24px;
            cursor: pointer;
        }

        .page-title {
            text-align: center;
            font-size: 34px;
            font-weight: 800;
            margin: 20px 0 12px;
            color: #222;
        }
        .page-desc {
            text-align: center;
            color: #666;
            font-size: 18px;
            margin-bottom: 50px;
        }

        .tools-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px 30px;
            margin-bottom: 80px;
        }
        .tool-card {
            background: var(--card-bg);
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.08);
            transition: all 0.3s;
            display: flex;
            align-items: stretch;
        }
        .tool-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
        }
        .tool-img {
            width: 60%;
            object-fit: contain;
        }
        .tool-content {
            width: 50%;
            padding: 28px 24px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .tool-label {
            font-size: 13px;
            color: var(--primary);
            margin-bottom: 8px;
            font-weight: 600;
        }
        .tool-title {
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 12px;
            color: #222;
        }
        .tool-desc {
            color: #666;
            font-size: 15px;
            margin-bottom: 20px;
            line-height: 1.5;
        }
        .tool-btn {
            display: inline-block;
            background: var(--primary);
            color: white;
            padding: 10px 24px;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 600;
            font-size: 15px;
            width: fit-content;
        }
        .tool-btn:hover { background: #e55a00; }

        footer {
            text-align: center;
            padding: 40px 20px;
            color: #888;
            font-size: 14px;
            border-top: 1px solid #eee;
        }

        @media (max-width: 768px) {
            .tools-grid { grid-template-columns: 1fr; gap: 30px; }
            .tool-card { flex-direction: column; }
            .tool-img, .tool-content { width: 100%; }
            .tool-img { height: 180px; }
            .page-title { font-size: 28px; }
        }
            .translate-container {
        max-width: 1100px;
        margin: 50px auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.08);
        overflow: hidden;
    }

    /*翻译工具*/
    .translate-box {
        padding: 30px;
        display: flex;
        flex-direction: column;
        height: 400px;
        box-sizing: border-box;
    }
    .lang-select {
        padding: 12px 16px;
        font-size: 16px;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 16px;
        background: #fafafa;
    }
    textarea {
        flex: 1;
        padding: 20px;
        font-size: 18px;
        line-height: 1.6;
        border: none;
        resize: none;
        outline: none;
        background: #f8f9fa;
        border-radius: 8px;
    }
    .right-box textarea {
        background: #eef7ff;
        color: #1a0dab;
    }
    .action-bar {
        margin-top: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .char-count {
        color: #888;
        font-size: 14px;
    }
    .swap-lang {
        background: none;
        border: none;
        font-size: 28px;
        cursor: pointer;
        color: #666;
    }
    .translate-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        padding: 14px 36px;
        font-size: 18px;
        border-radius: 50px;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(102,126,234,0.4);
        transition: all 0.3s;
    }
    .translate-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102,126,234,0.5);
    }
    .translate-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
    }
    #copy-btn {
        background: #28a745;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 8px;
        cursor: pointer;
    }
    @media (max-width: 768px) {
        .translate-container { grid-template-columns: 1fr; }
        .swap-lang { display: none; }
    }

    /*翻译清除效果*/
    .clear-btn {
    background: none;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    color: #aaa;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    background: #ffe6e6;
    color: #ff4d4f;
}

.clear-btn svg {
    width: 18px;
    height: 18px;
}

/* usercss用户中心 */

.user-layout {
        max-width: 1200px;
        margin: 20px auto 60px;
        display: flex;
        gap: 24px;
        align-items: flex-start;
    }

    /* 左侧侧边栏 */
    .user-sidebar {
        width: 230px;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
        border: 1px solid #e5e7eb;
        padding: 18px 16px 14px;
        position: sticky;
        top: 80px;
    }

    .user-sidebar-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
    }

    .user-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: linear-gradient(135deg,#fb7185,#fb923c);
        display:flex;
        align-items:center;
        justify-content:center;
        color:#fff;
        font-weight:700;
        font-size:20px;
    }

    .user-name {
        font-size: 15px;
        font-weight: 600;
        color: #111827;
    }

    .user-level-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(245, 158, 11, 0.08);
        color: #d97706;
        font-size: 11px;
        margin-top: 2px;
    }

    .user-sidebar-nav-title {
        font-size: 12px;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin: 10px 0 4px;
    }

    .user-sidebar-nav {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .user-sidebar-nav li {
        margin-bottom: 2px;
    }

    .user-sidebar-link {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 10px;
        border-radius: 10px;
        color: #4b5563;
        font-size: 13px;
        text-decoration: none;
        transition: background 0.15s, color 0.15s, transform 0.1s;
    }

    .user-sidebar-link i {
        font-size: 14px;
        width: 16px;
        text-align: center;
    }

    .user-sidebar-link:hover {
        background: #f3f4f6;
        color: #111827;
        transform: translateX(1px);
    }

    .user-sidebar-link.active {
        background: #0f172a;
        color: #f9fafb;
    }

    .user-sidebar-divider {
        border-top: 1px dashed #e5e7eb;
        margin: 10px 0 8px;
    }

    /* 右侧主体内容 */
    .user-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .user-card {
        background: #ffffff;
        border-radius: 16px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
        padding: 18px 20px 18px;
    }

    .user-card-header {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:10px;
        margin-bottom: 12px;
    }

    .user-card-title {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
        display:flex;
        align-items:center;
        gap:6px;
    }

    .user-card-sub {
        font-size: 12px;
        color: #9ca3af;
    }

    .user-tag {
        display:inline-flex;
        align-items:center;
        gap:4px;
        padding:3px 8px;
        border-radius:999px;
        background:#eff6ff;
        color:#1d4ed8;
        font-size:11px;
    }

    /* 会员信息区块 */
    .user-info-grid {
        display:grid;
        grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
        gap:10px 18px;
        font-size: 13px;
        color:#4b5563;
    }

    .user-info-item-label {
        font-size:12px;
        color:#9ca3af;
        margin-bottom:2px;
    }

    .user-info-item-value {
        font-weight:500;
    }

    /* 强制下线设备 */
/* ========== 全局 Flash 提示样式 ========== */
.flash-wrapper {
    max-width: 720px;
    margin: 10px auto 0;
    padding: 0 12px;
}

.flash-message {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
}

.flash-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}


/*====================翻译手机适配==================*/
/* ========== GPT翻译页：手机端全屏适配 ========== */
/*====================翻译手机适配==================*/
@media (max-width: 768px) {

    /* 页面整体边距更小 */
    .container {
        padding: 12px 10px 24px;
    }

    /* =================== 文本框高度优化 =================== */

    /* 两个翻译文本框：宽度满屏，但高度更矮 */
    #source-text,
    #target-text {
        width: 100%;
        min-height: 120px;          /* 通用高度 */
        max-height: 180px;
        font-size: 14px;
        line-height: 1.5;
        padding: 10px 12px;
        border-radius: 10px;
    }

    /* 上方输入框稍微高一点 */
    #source-text {
        min-height: 140px;          /* 输入框更高 */
    }

    /* 下方输出框更矮 */
    #target-text {
        min-height: 140px;          /* 输出更紧凑 */
    }

    /* =================== 盒子整体样式 =================== */

    .translate-box {
        width: 100%;
        padding: 12px 12px 14px;
        border-radius: 12px;
        margin-bottom: 10px;
    }

    /* 下拉选择更简洁 */
    .lang-select {
        height: 38px;
        font-size: 14px;
        padding: 0 8px;
        margin-bottom: 8px;
    }

    /* 上方工具栏紧凑 */
    .action-bar {
        margin-top: 6px;
        gap: 8px;
    }

    /* 翻译按钮：更矮更精致 */
    .translate-btn {
        width: 100%;
        padding: 10px 0;
        font-size: 15px;
        border-radius: 999px;
    }
}
/* ========== 修复翻译页手机版中间大空白 ========== */
@media (max-width: 768px) {

    /* 强制容器改为完全的竖排布局 */
    .translate-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* 让每个翻译块紧凑贴合，不产生多余高度 */
    .translate-box {
        width: 100% !important;
        margin: 0 !important;
        height: auto !important;
    }
}

/*===========修改密码样式=============*/
/* toast 容器：水平居中，固定在顶部 */
.toast-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

/* 单条提示 */
.toast {
    min-width: 260px;
    max-width: 90vw;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    color: #fff;
    margin-bottom: 8px;
}

/* 成功样式 */
.toast-success {
    background: #22c55e;
}

/* 也可以预留失败样式 */
.toast-error {
    background: #ef4444;
}

