﻿/*  SiteSheet.css */
:root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --card: #f8fafc;
    --ring: #e2e8f0;
    --shadow: 0 8px 24px rgba(15,23,42,.08);
}

/* ========== 基础 ========== */
* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif
}

a {
    color: inherit;
    text-decoration: none
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    border: 0;
    cursor: pointer
}

    .btn:hover {
        background: var(--primary-600)
    }

.pill {
    border: 1px solid var(--ring);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--muted);
    background: #fff
}

    .pill.block, .btn.block {
        width: 100%;
        justify-content: center
    }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px
}

.card {
    background: #fff;
    border: 1px solid var(--ring);
    border-radius: 16px;
    box-shadow: var(--shadow)
}

.muted {
    color: var(--muted)
}

/* ========== 欢迎横幅（右→左） ========== */
.welcome-bar {
    background: #f1f5ff;
    border-bottom: 1px solid var(--ring);
    overflow: hidden
}

.welcome-track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    will-change: transform;
    animation: scrollLeft 25s linear infinite
}

.welcome-text {
    padding: 8px 0;
    color: #1e293b;
    font-weight: 600
}

.welcome-bar:hover .welcome-track {
    animation-play-state: paused
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0)
    }

    100% {
        transform: translateX(-50%)
    }
}

/* ========== 导航 + 悬浮 Logo ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--ring);
    backdrop-filter: saturate(180%) blur(6px)
}

.nav {
    display: flex;
    align-items: center;
    height: 64px;
    position: relative
}

.nav-right-only {
    justify-content: flex-end
}

.nav-right {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px
}

    .nav-right a:not(.btn):not(.pill) {
        padding: 8px 10px;
        white-space: nowrap;
        border-radius: 8px;
    }
    .nav-right a.btn {
        padding: 12px 18px;
        border-radius: 12px;
    }
        .nav-right a:not(.btn):hover {
            background: #f1f5f9;
        }
        .nav-right a.btn:hover {
            background: var(--primary-600);
            color: #fff;
        }
/* 悬浮在左上角，不抬高导航 */
.logo-float {
    position: absolute;
    left: 0;
    top: -22px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 60
}

.brand-logo {
    height: clamp(120px, 7vw, 88px);
    width: auto;
    display: block
}
/* 稳定尺寸 */
.brand-fallback {
    font-weight: 800;
    font-size: clamp(22px,4vw,40px);
    color: var(--primary);
    display: none
}

.logo-badge {
    margin-left: 6px
}

/* ========== 桌面/移动可见性（统一放这里并加权） ========== */
/* 桌面：显示完整菜单，隐藏汉堡 */
.navbar .desktop-only {
    display: flex !important;
}

.navbar .mobile-only {
    display: none !important;
}

/* 小屏：隐藏完整菜单，显示汉堡 */
@media (max-width:768px) {
    .navbar .desktop-only {
        display: none !important;
    }

    .navbar .mobile-only {
        display: block !important;
    }

    .logo-float {
        top: -16px;
    }
}

/* 汉堡按钮样式 */
.hamburger {
    width: 44px;
    height: 38px;
    border: 1px solid var(--ring);
    border-radius: 10px;
    background: #fff;
    display: grid;
    place-items: center;
    gap: 4px;
    cursor: pointer
}

    .hamburger span {
        display: block;
        width: 20px;
        height: 2px;
        background: #0f172a;
        border-radius: 2px
    }

/* 抽屉菜单 + 遮罩 */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0;
    visibility: hidden;
    transition: .2s;
    z-index: 80
}

    .backdrop.show {
        opacity: 1;
        visibility: visible
    }

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(86vw,360px);
    background: #fff;
    border-left: 1px solid var(--ring);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 90;
    display: flex;
    flex-direction: column
}

    .mobile-menu.open {
        transform: translateX(0)
    }

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ring);
    font-weight: 700
}

    .mobile-menu-header .close {
        border: 1px solid var(--ring);
        background: #fff;
        border-radius: 10px;
        padding: 6px 10px;
        cursor: pointer
    }

.mobile-menu-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px
}

    .mobile-menu-body a {
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid var(--ring)
    }

        .mobile-menu-body a:hover {
            background: #f8fafc
        }

.mobile-lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--ring);
    border-radius: 10px;
    padding: 8px 12px
}

    .mobile-lang select {
        border: 0;
        background: #fff
    }

body.menu-open {
    overflow: hidden
}

/* ========== Hero & Section（如有） ========== */
.hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    align-items: center;
    padding: 40px 0
}

    .hero h1 {
        font-size: 40px;
        line-height: 1.1;
        margin: 0 0 12px
    }

    .hero p {
        margin: 0 0 20px;
        color: var(--muted)
    }

.photo {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--ring)
}

.section {
    padding: 40px 0
}

    .section h2 {
        font-size: 28px;
        margin: 0 0 16px
    }

/* ========== Slider（横向滑动：5个/行） ========== */
.slider-wrap {
    position: relative
}

.slider {
    position: relative;
    overflow: hidden
}

    /* 关键：一行横向排列，不换行 */
    .slider .track {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 16px;
        scroll-behavior: smooth;
    }

    /* 关键：固定每个卡片宽度 */
    .slider .slide {
        flex: 0 0 calc((100% - 16px*4)/5) !important; /* 5个一行 */
        max-width: calc((100% - 16px*4)/5) !important;
    }

        /* 缩略图容器 */
        .slider .slide .thumb {
            height: 220px;
            background: var(--card);
            border: 1px solid var(--ring);
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        /* 让每个模板卡片变成“上图 + 下内容”，并且下内容把按钮推到底 */
        .slider .slide.card {
            display: flex;
            flex-direction: column;
            height: 100%;
        }

            /* 下面的内容区（thumb 后面的那个 div）也变成纵向布局 */
            .slider .slide.card > div:not(.thumb) {
                display: flex;
                flex-direction: column;
                flex: 1;
            }

                /* 标题固定占 2 行高度（不够也留空），最多显示 2 行 */
                .slider .slide.card > div:not(.thumb) > div:first-child {
                    line-height: 1.2;
                    min-height: 2.4em; /* 2 行高度 */
                    display: -webkit-box;
                    -webkit-line-clamp: 2;
                    -webkit-box-orient: vertical;
                    overflow: hidden;
                }

                /* 按钮那一行永远贴到卡片底部 -> 所有按钮就对齐了 */
                .slider .slide.card > div:not(.thumb) .row {
                    margin-top: auto;
                }
/* 左右箭头 */
.slider-wrap .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--ring);
    background: #fff;
    cursor: pointer
}

    .slider-wrap .arrow:hover {
        background: #f8fafc
    }

    .slider-wrap .arrow.left {
        left: -4px
    }

    .slider-wrap .arrow.right {
        right: -4px
    }

/* 响应式：4/3/2 个 */
@media (max-width:1024px) {
    .slider .slide {
        flex-basis: calc((100% - 16px*3)/4);
        max-width: calc((100% - 16px*3)/4)
    }
}

@media (max-width:768px) {
    .slider .slide {
        flex-basis: calc((100% - 16px*2)/3);
        max-width: calc((100% - 16px*2)/3)
    }
}
@media (max-width: 768px) {
    .img-left {
        float: left;
        width: 100px;
        margin: 0 10px 10px 0;
    }
}
@media (max-width:560px) {
    .slider .slide {
        flex-basis: calc((100% - 16px)/2);
        max-width: calc((100% - 16px)/2)
    }

    .hero {
        grid-template-columns: 1fr
    }

        .hero h1 {
            font-size: 32px
        }
}

/* ========== Jobs / Footer ========== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 16px
}

.job {
    padding: 16px;
    border: 1px solid var(--ring);
    border-radius: 14px;
    background: #fff
}




/* ===== Template Preview Modal ===== */
/* ===== Template Preview Modal (center + blur + full-height) ===== */
.preview-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.45); /* 半透明遮罩 */
    backdrop-filter: blur(8px) saturate(120%); /* 背景模糊 */
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    opacity: 0;
    visibility: hidden;
    transition: .2s;
    z-index: 1000;
}

    .preview-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

.preview-modal {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    max-width: min(980px, 96vw); /* 不超过屏幕宽 */
    max-height: 92vh; /* 不超过屏幕高 */
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ring);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ring);
}

.preview-title {
    font-weight: 700;
}

.preview-close {
    border: 1px solid var(--ring);
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.preview-body {
    background: #0b1220; /* 深色底衬 */
    display: grid;
    place-items: center;
    padding: 12px;
}

    .preview-body img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 86vh; /* 关键：满屏高度内 */
        object-fit: contain; /* 等比缩放，完整显示 */
        border-radius: 8px;
        background: #fff;
    }

/* 小屏优化 */
@media (max-width:560px) {
    .preview-body img {
        max-height: 78vh;
    }
}




/* ===== 顶部用户头像 + 套餐状态 + 简单下拉菜单 ===== */
/* 外层，用来定位菜单 */
.account-wrapper {
    position: relative;
    display: inline-block;
}

/* 头像按钮 */
.account-trigger {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: #6366f1;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 菜单位置：在按钮下面，默认隐藏 */
.account-menu {
    position: absolute;
    right: 0;
    top: 40px;
    width: 260px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: none; /* 默认隐藏 */
    z-index: 50;
}

    /* 打开时显示 */
    .account-menu.open {
        display: block;
    }

/* 白色主菜单卡片 */
.account-menu-inner {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.12);
    padding: 10px 0;
}

.account-email {
    padding: 8px 16px;
    font-size: 13px;
    color: #6b7280;
}

.account-status {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

/* 菜单行：a 或 button 都用这一套 */
.account-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    text-decoration: none;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}

    .account-item:hover {
        background: #f3f4f6;
    }

    /* 如果是 form 包着 button，用这个去掉默认样式 */
    .account-item.account-item-btn {
        padding: 0;
    }

        .account-item.account-item-btn button {
            width: 100%;
            padding: 8px 16px;
            border: none;
            background: transparent;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: #111827;
            cursor: pointer;
        }

/* 图标 */
.account-item-icon {
    width: 18px !important;
    height: 18px !important;
    display: inline-flex;
    justify-content: center;
}

/* 文本 */
.account-item-label {
    flex: 1;
}

/* 未读 badge */
.account-item-badge {
    min-width: 18px;
    padding: 0 6px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========== RTL tweaks (Arabic / Uyghur) ========== */
/* When <html dir="rtl">, mirror the top navbar: logo to the right, menu to the left */
html[dir="rtl"] .nav-right-only {
    justify-content: flex-start;
}

html[dir="rtl"] .logo-float {
    left: auto;
    right: 0;
}

/* Badge spacing next to the logo */
html[dir="rtl"] .logo-badge {
    margin-left: 0;
    margin-right: 6px;
}

/* Small screens: keep the same mirrored behavior */
@media (max-width:768px) {
    html[dir="rtl"] .logo-float {
        left: auto;
        right: 0;
    }
}

/* ========== RTL navbar layout fix (v2) ========== */
/* Put logo and menu in normal flow so they don't overlap */
html[dir="rtl"] .logo-float {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    margin-top: -22px; /* keep the same visual lift as the old absolute top:-22px */
}

/* Reverse row so logo ends up on the right, menu on the left */
html[dir="rtl"] .nav-right-only {
    flex-direction: row-reverse;
    justify-content: space-between;
}

/* In RTL, keep the menu items starting from the left side */
html[dir="rtl"] .nav-right.desktop-only {
    justify-content: flex-start;
}

/* Mobile: keep hamburger reachable and avoid overlap */
@media (max-width:768px) {
    html[dir="rtl"] .nav-right-only {
        flex-direction: row-reverse;
        justify-content: space-between;
    }

    html[dir="rtl"] .logo-float {
        margin-top: -22px;
    }
}



.site-footer {
    margin-top: 40px;
    background: radial-gradient(1200px 600px at 20% 0%, #0b1b39 0%, #07101f 45%, #050a14 100%);
    color: #dbe4f3;
    border: none;
}


.site-footer__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 16px 26px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 28px;
}


.site-footer__brand {
    font-weight: 900;
    font-size: 20px;
    letter-spacing: .2px;
    color: #ffffff;
}

.site-footer__desc {
    margin-top: 10px;
    color: rgba(219,228,243,.85);
    line-height: 1.6;
    max-width: 360px;
}

.site-footer__cta {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

    .site-footer__cta:hover {
        filter: brightness(1.05);
    }

.site-footer__title {
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: .6px;
    font-size: 13px;
}

.site-footer__link {
    display: block;
    width: fit-content;
    color: rgba(219,228,243,.85);
    text-decoration: none;
    margin: 6px 0;
}

    .site-footer__link:hover {
        color: #fff;
        text-decoration: underline;
    }

.site-footer__small {
    margin: 8px 0 6px;
    color: rgba(219,228,243,.7);
    line-height: 1.6;
}

.site-footer__kv {
    color: rgba(219,228,243,.85);
    line-height: 1.8;
}

.site-footer__bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255,255,255,.06);
    color: rgba(219,228,243,.75);
    font-size: 13px;
}

    .site-footer__bottom a {
        color: rgba(219,228,243,.85);
        text-decoration: none;
    }

        .site-footer__bottom a:hover {
            color: #fff;
            text-decoration: underline;
        }
.site-footer__col {
    min-width: 0;
   
}

    .site-footer__col > *:first-child {
        margin-top: 0;
    }
/* Responsive */
@media (max-width: 980px) {
    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
    }
}



.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
        border-bottom: 1px solid #e5e7eb;
        font-size: 14px;
    }

    .admin-table th {
        text-align: left;
        color: #6b7280;
        font-weight: 600;
    }

.badge {
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 999px;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-gray {
    background: #e5e7eb;
    color: #374151;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: #2563eb;
    cursor: pointer;
}


