/* ====================================
   AI 智能简历平台 - 全局样式
   ==================================== */

/* ---------- 基础 ---------- */
body {
    font-family: 'Archivo', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #FAFAFA;
    color: #09090B;
    margin: 0;
}

/* ---------- 导航栏 ---------- */
.site-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 0;
    height: 60px;
}
.site-nav .navbar-brand {
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    color: #18181B !important;
}
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
}
.site-nav .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 18px 16px !important;
    color: #3F3F46 !important;
    transition: color 0.2s;
}
.site-nav .nav-link:hover,
.site-nav .nav-link.active {
    color: #09090B !important;
}
.nav-cta {
    font-size: 0.85rem !important;
    padding: 8px 20px !important;
    background: #2563EB !important;
    border: none;
    color: #fff !important;
    font-weight: 500;
    border-radius: 6px !important;
    transition: transform 0.2s, background-color 0.2s;
}
.nav-cta:hover {
    transform: translateY(-1px);
    background: #1D4ED8 !important;
}

/* ---------- 编辑器布局 ---------- */
.editor-layout {
    height: calc(100vh - 52px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.editor-main {
    flex: 1;
    overflow: hidden;
}
.left-panel {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}
.left-panel textarea,
.left-panel .wysiwyg-area {
    flex: 1;
    overflow-y: auto;
}
.right-panel {
    height: 100%;
    overflow-y: auto;
    background: #eef0f4;
}

/* 自定义滚动条 */
.left-panel textarea::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 6px;
}
.left-panel textarea::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

/* AI 浮动按钮 */
.ai-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}
.ai-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    color: #fff;
}

/* ---------- A4 简历预览纸张 ---------- */
.a4-page {
    width: 210mm;
    min-height: 297mm;
    padding: 16mm 20mm;
    margin: 0 auto;
    background: white;
    position: relative;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.7;
    color: #2c3e50;
    transform-origin: top center;
}

@media (max-width: 1600px) {
    .a4-page { transform: scale(0.82); margin-bottom: -18%; }
}
@media (max-width: 1200px) {
    .a4-page { transform: scale(0.68); margin-bottom: -32%; }
}

/* 简历内部排版 */
.a4-page h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-align: center;
}
.a4-page h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    border-bottom: 2px solid #333;
    padding-bottom: 3px;
    margin-top: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.a4-page h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 4px;
}
.a4-page p {
    margin-bottom: 6px;
}
.a4-page ul {
    padding-left: 18px;
    margin-bottom: 6px;
}
.a4-page ul li {
    margin-bottom: 3px;
    list-style-type: disc;
}
.a4-page strong {
    font-weight: 600;
}
.a4-page code {
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    color: #555;
}

/* 简历头像拖拽缩放包装器 */
.avatar-wrapper {
    float: right;
    position: relative;
    margin-left: 20px;
    margin-bottom: 15px;
    z-index: 10;
    transition: box-shadow 0.2s;
}
.avatar-wrapper:hover {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}
.avatar-resize-handle {
    position: absolute;
    left: -10px; /* 改为左下角，因为图片靠右对齐时，拉左下角缩放更自然 */
    bottom: -10px;
    width: 24px;
    height: 24px;
    cursor: sw-resize;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-resize-handle::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #6366f1;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.2s;
}
.avatar-wrapper:hover .avatar-resize-handle::after {
    opacity: 1;
}

/* 简历分栏布局 (由 ::: left / ::: right 语法生成) */
.resume-columns {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #555;
}
.resume-col-left {
    flex: 1;
}
.resume-col-right {
    flex: 1;
    text-align: right;
}

/* 图标链接样式 */
.resume-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #555;
    text-decoration: none;
    font-size: 0.88em;
}
.resume-icon-link i {
    font-size: 0.9em;
}

/* ---------- 模板中心 ---------- */
.filter-bar .filter-btn {
    background: #f0f0f0;
    border: 1px solid transparent;
    color: #666;
    font-size: 0.82rem;
    transition: all 0.2s;
}
.filter-bar .filter-btn:hover {
    background: #e8e8ff;
    color: #6366f1;
}
.filter-bar .filter-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

.template-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.template-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
}

.template-preview-thumb {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}
.template-mini-preview {
    transform-origin: top left;
    width: 210mm;
    padding: 14mm 18mm;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    pointer-events: none;
}
.template-mini-preview h1 {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}
.template-mini-preview h2 {
    font-size: 0.95rem;
    font-weight: 700;
    border-bottom: 2px solid #333;
    padding-bottom: 2px;
    margin-top: 14px;
    margin-bottom: 8px;
}
.template-mini-preview ul {
    padding-left: 16px;
    font-size: 0.9em;
}

.template-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.template-card:hover .template-overlay {
    opacity: 1;
}

/* ---------- Landing Page ---------- */
.hero-section {
    background-color: #FAFAFA;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
}

.hero-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
}

.hero-bg-shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, rgba(255,255,255,0) 70%);
    top: -100px;
    left: -100px;
}

.hero-bg-shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, rgba(255,255,255,0) 70%);
    bottom: -100px;
    right: -50px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.landing-cta {
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.landing-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3) !important;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06) !important;
}

/* ---------- 打印样式 ---------- */
@media print {
    body * {
        visibility: hidden;
    }
    .print-page, .print-page * {
        visibility: visible;
    }
    .print-page {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 12mm 18mm;
        box-shadow: none;
        transform: none !important;
    }
    .no-print, .no-print * {
        display: none !important;
    }
    @page {
        size: A4;
        margin: 0;
    }
}
