
/* =========================================
   1. BASE LAYER (变量与全局重置)
   ========================================= */
:root {
    --primary: #9722E0;
    --primary-dark: #7c1cb8;
    --secondary: #FB983B;
    --text-main: #212121;
    --text-muted: #55657b;
    --bg-white: #ffffff;
    --bg-off: #f8fafc;
    --radius: 13px;
    --shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
    --container-width: 1200px;
    --sidebar-width: 280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans', sans-serif;
    color: var(--text-main);
    line-height: 1.5;
    background-color: var(--bg-white);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover {
    color: inherit;
}


/* Typography Defaults (减少重复定义) */
h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; color: var(--text-main); line-height: 1.2; }
h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
p  { font-size: 1rem; font-weight: 500; margin-bottom: 1rem; color: var(--text-muted); }

/* Layout Utils */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.center {
    text-align: center;
}

div {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
}

/* =========================================
   2. COMPONENT LAYER (通用组件)
   ========================================= */

/* --- LOGO --- */
.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* 虽然 SVG 是圆的，加上这个防溢出 */
    object-fit: cover;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none; /* 全局去掉默认描边 */
}
.btn:hover { 
    transform: translateY(-2px); 
    color: white;
}

.btn-primary { background-color: var(--primary); color: white; box-shadow: 0 4px 10px rgba(151, 34, 224, 0.2); }
.btn-primary:hover { background-color: var(--primary-dark); color: #fff;}

.btn-line {
    background-color: white;
    color: var(--primary);
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    box-shadow: 0 4px 10px rgba(151, 34, 224, 0.2);
}
.btn-line:hover { 
    background-color: #f3e8ff;
    color: var(--primary);
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.btn-secondary { background-color: white; color: var(--text-main); border: 1px solid #e2e8f0; }
.btn-secondary:hover { background-color: #f8fafc; color: var(--text-main); border: 1px solid #e2e8f0;}

.btn-white { background: white; color: #0f172a; }
.btn-white:hover { background: #f1f5f9; color: var(--text-main);}

.btn-sm { padding: 8px 20px; font-size: 1rem; }

.btn-google {
    background: #f3f4f6;
    color: var(--text-main);
    border: none; /* 去掉描边 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.btn-google:hover { background: #e2e8f0; }
.btn-full { width: 100%; }

/* 品牌加载动画 */
.cp-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3e8ff; /* 浅紫色底环 */
    border-top: 4px solid #9722E0; /* 品牌主色顶环 */
    border-radius: 50%;
    margin: 0 auto;
    animation: cp-spin 1s linear infinite;
}

@keyframes cp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Cards --- */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}
/* 仅在需要 hover 效果时添加此类 */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

/* --- Forms & Inputs --- */
.form-group { margin-bottom: 24px; }
.form-label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-main); font-size: 0.9rem; }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 12px 16px;
    border: 1px solid #cbd5e1; border-radius: var(--radius);
    font-size: 1rem; font-family: inherit; outline: none;
    transition: border-color 0.2s; background: #fff;
}
.form-input:focus, .form-textarea:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(151, 34, 224, 0.1); 
}
.form-textarea { resize: vertical; min-height: 120px; }

/* --- HEADER (Global Landing Pages) --- */
.header {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #f1f5f9;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; }
.nav-links { display: none; gap: 30px; }
.nav-links a { font-size: 1rem; font-weight: 600; color: var(--text-main); }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: none; gap: 15px; align-items: center; }
.mobile-menu-btn { 
    display: block; 
    background: none; 
    border: none; 
    font-size: 24px; 
    color: var(--text-main); 
    cursor: pointer;
}

@media(min-width: 768px) {
    .nav-links, .nav-actions { display: flex; }
    .mobile-menu-btn { display: none; }
}

/* 移动端菜单展开样式 */
@media (max-width: 767px) {
    /* 初始状态隐藏 */
    .nav-links, .nav-actions {
        display: none; 
    }

    /* 当添加 .active 类时显示 */
    .nav-links.active, .nav-actions.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px; /* Header 的高度 */
        left: 0;
        width: 100%;
        background: white;
        padding: 36px;
        border-bottom: 1px solid #f1f5f9;
        gap: 20px;
        text-align: center;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-actions.active {
        top: 260px; /* 根据菜单长度调整偏移量，或将其包含在同一个父级容器内 */
        border-top: none;
        padding-top: 0;
    }
}

/* --- FOOTER (Global) --- */
.footer {
    background: white;
    border-top: 1px solid #f1f5f9;
    padding: 60px 0 30px;
    text-align: center;
    margin-top: auto; /* Push to bottom */
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-weight: 500; font-size: 1rem; }
.footer-links a:hover { color: var(--primary); }
.copyright { color: #94a3b8; font-size: 0.85rem; margin-bottom: 18px}
.legal { 
    display: flex;
    justify-content: center;
    color: #94a3b8; 
    font-size: 0.85rem; 
}
.social-icon {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    font-size: 1.4rem;
    color: var(--text-main);
    transition: color 0.2s;
        }
.social-icon:hover { color: var(--text-main); }


/* --- GLOBAL MODAL SYSTEM (Legal & Notifications) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Ensure it's on top of everything */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 700px; /* Generic width */
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Limit height */
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 24px 24px 0 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.modal-close-btn:hover { color: var(--text-main); }

/* Scrollable Content Area */
.modal-body {
    padding: 32px;
    overflow-y: auto; /* Enable Scroll */
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-main);
}

/* Scrollbar Styling */
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: #f1f5f9; }
.modal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Typography inside Legal Text */
.modal-body h2 { font-size: 1.1rem; font-weight: 700; margin-top: 24px; margin-bottom: 12px; color: var(--text-main); }
.modal-body p { margin-bottom: 16px; color: var(--text-muted); }
.modal-body ul { margin-bottom: 16px; padding-left: 20px; list-style-type: disc; color: var(--text-muted); }

.modal-footer {
    padding: 16px 32px;
    border-top: 1px solid #e2e8f0;
    text-align: right;
    background: #f8fafc;
    border-radius: 0 0 24px 24px;
}

/* Prevent body scroll */
body.modal-open { overflow: hidden !important; }


/* =========================================
   3. APP SHELL (登录后核心布局)
   ========================================= */
/* 激活侧边栏布局: <body class="app-layout"> */
body.app-layout {
    flex-direction: row !important;
    height: 100vh;
    overflow: hidden;
}

body.app-layout aside {
    width: var(--sidebar-width);
    background-color: var(--bg-white); 
    border-right: 1px solid #e2e8f0;
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    flex-shrink: 0;
    z-index: 10;
    padding: 40px 24px;
    text-align: center;
}

body.app-layout main {
    flex: 1; 
    overflow-y: auto; /* 内容区独立滚动 */
    padding: 32px; 
    background-color: var(--bg-off); 
    width: 100%; 
    display: block;
}

/* --- APP SIDEBAR STYLES --- */
.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
    color: var(--text-main);
}

.sidebar-logo .logo-img {
    width: 35px;
    height: 35px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    margin-bottom: 40px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.social-icons {
    display: flex;
    gap: 24px;
    font-size: 24px;
    color: var(--text-main);
    transition: color 0.2s;
}

.copyright-text {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}

.legal-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
}

.legal-link {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    body.app-layout {
        flex-direction: column !important;
        height: auto;
        overflow: auto;
    }
    body.app-layout aside {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 20px;
    }
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        margin-bottom: 20px;
    }
    body.app-layout main {
        padding: 16px;
    }
}

/* =========================================
   4. PAGE SPECIFIC LAYERS (页面特有)
   ========================================= */

/* ------ AUTH PAGES (Login/Signup) ------ */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background-color: var(--bg-off);
}
.auth-card {
    background: white;
    width: 100%;
    max-width: 520px; /* Default, can be overridden */
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
}
.auth-header { margin-bottom: 55px; text-align: center; }
.auth-header h1 { font-size: 2rem; font-weight: 800; color: var(--text-main); }
.auth-header p { color: var(--text-muted); font-size: 1rem; line-height: 1.6; margin-top: 8px; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--text-main); font-size: 0.95rem; }
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(151, 34, 224, 0.1); }

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 24px 0;
}
.divider::before, .divider::after {
    content: ''; flex: 1; border-bottom: 1px solid #e2e8f0;
}
.divider::before { margin-right: 16px; }
.divider::after { margin-left: 16px; }

.google-icon { width: 20px; height: 20px; }

/* ------ DASHBOARD PAGE ------ */
/* EMPTY STATE */

.empty-state-wrapper {
    display: block; /*以此覆盖原来的 flex center，允许内容自然向下排列 */
    text-align: left;
    padding-bottom: 60px;
    padding-top: 20px;
}

.empty-header {
    margin-bottom: 40px;
}

.empty-header h1 {
    font-size: 3rem; /* Bigger Title */
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
}

.empty-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.empty-content {
    width: 100%;
    text-align: center;
    margin-bottom: 60px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background-color: #f3e8ff;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 24px;
}


/* Hero Search Form */

.hero-search-form { 
    display: flex; 
    margin: 0 auto 60px; 
    background: white; p
    adding: 6px; 
    border-radius: 50px; 
    box-shadow: var(--shadow); 
    max-width: 600px; 
    border: 1px solid #e2e8f0;
}

.hero-search-form:hover {
    border-color: var(--primary); 
}

.hero-search-input {
    flex: 1;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: var(--text-main);
}

.hero-search-btn {
    border-radius: 40px;
    font-size: 1rem;
    box-shadow: none; 
    background-color: var(--primary); 
    color: white; 
    border: none; 
    padding: 0 32px; 
    font-weight: 600; 
    cursor: pointer; 
}

/* Trending Charts */

/* --- 1. Trending Ranking --- */
.trending-header {
    display: flex;
    justify-content: space-between; /* 关键：左右撑开 */
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}
.trending-header h2 { 
    font-size: 2rem;
    margin-bottom: 0.5rem;
} 

.filter-group {
    display: flex;
    gap: 12px;
    margin-left: auto; /* 双重保险：强制靠右 */
}
/* 找到这个类并替换 */
.filter-select {
    font-size: 0.9rem;          
    color: var(--text-muted);   
    font-weight: 500;          
    line-height: 1.5;
    padding: 8px 24px;        
    padding-right: 5px;      
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background-color: white;
    cursor: pointer;
    min-width: 140px;     
    outline: none;
    appearance: none;           /* 必须：隐藏浏览器默认的丑箭头 */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;                 
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--primary); 
    color: var(--text-main);     
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239722E0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}


/* 轮播容器 (无手势版) */
.trending-carousel-window {
    overflow: hidden;
    position: relative;
    padding: 10px 0 30px;
}

.trending-slides-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.trending-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    padding: 0 4px;
}

/* Trending 卡片 */
.trend-card {
    background: white;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid #f1f5f9;
}

/* 排名数字 */
.trend-rank {
    position: absolute;
    top: -8px; left: 6px;
    font-size: 2.4rem; font-weight: 800;
    color: #a855f7;
    line-height: 1; z-index: 2;
    text-shadow: 2px 2px 0px #fff;
    font-family: 'Noto Sans', sans-serif;
}

/* 缩略图 */
.trend-thumb-box {
    width: 100%;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
    background: #f1f5f9;
    cursor: pointer;
}
.trend-thumb { width: 100%; height: 100%; object-fit: cover; }

/* 黑色浮层 (播放量) */
.view-overlay {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.7); color: white;
    font-size: 0.75rem; font-weight: 700; padding: 2px 6px; border-radius: 4px;
    display: flex; align-items: center; gap: 4px;
}

/* 标题 */
.trend-title {
    font-size: 0.9rem; font-weight: 700; line-height: 1.3;
    margin-bottom: 8px; color: var(--text-main);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    height: 38px; cursor: pointer;
}
.trend-title:hover { color: var(--primary); }

/* 底部行：频道名 + 按钮 (左右分布) */
.trend-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* 推到底部 */
}

.trend-chn {
    font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 60%; /* 防止挤压按钮 */
}

.btn-analyze-xs {
    border: 1px solid #d8b4fe; /* 浅紫描边 */
    color: var(--primary);
    background: white;
    padding: 3px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-analyze-xs:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* 圆点 */
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.dot { width: 8px; height: 8px; background: #e2e8f0; border-radius: 50%; cursor: pointer; transition: 0.2s; }
.dot.active { background: var(--primary); transform: scale(1.2); }


/* --- 2. Niche Grids (Category Columns) --- */
.channel-header {
    margin-bottom: 30px;
    margin-top: 20px;
}

.channel-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.channel-desc p {
    margin-bottom: 10px;
}

.niche-super-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 60px;
}

/* 分类外框 (带底色) */
.niche-cat-card {
    background: #F1F2F5; /* 浅灰底 */
    border-radius: 20px;
    padding: 20px 16px; /* 上下20，左右16 */
    border: 1px solid #e2e8f0;
}

.cat-header-title {
    text-align: center;
    color: var(--primary);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* 内部列表：滚动容器 */
.cat-channel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 340px; /* 限制高度，约等于5个卡片的高度 */
    overflow-y: auto;  /* 开启垂直滚动 */
    padding-right: 4px; 
    padding-top: 4px;
}

/* 滚动条美化 */
.cat-channel-list::-webkit-scrollbar { width: 4px; }
.cat-channel-list::-webkit-scrollbar-track { background: transparent; }
.cat-channel-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* 频道单行条目 */
.niche-row-item {
    background: white;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.nr-left { display: flex; align-items: center; gap: 12px; overflow: hidden;}
.nr-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; }
.nr-info { display: flex; flex-direction: column; overflow: hidden; }
.nr-name { font-size: 0.9rem; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px;}
.nr-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.nr-score {
    background: #f0fdf4; color: #15803d;
    font-size: 0.7rem; font-weight: 700;
    padding: 3px 8px; border-radius: 6px;
    white-space: nowrap;
}

/* 紫色 Hover 特效 */
.hover-purple-border { transition: all 0.2s; border: 1px solid transparent; }
.hover-purple-border:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(151, 34, 224, 0.15);
    z-index: 10;
}

/* 响应式 */
@media(max-width: 1024px) {
    .trending-slide { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, auto); }
    .niche-super-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 768px) {
    .trending-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .filter-group { width: 100%; justify-content: space-between; margin-left: 0; }
    .filter-select { flex: 1; }
    .trending-slide { grid-template-columns: 1fr; grid-template-rows: repeat(8, auto); }
    .niche-super-grid { grid-template-columns: 1fr; }
}

/* Header & Usage Bar */
.search-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 20px; background: transparent; border: none; height: auto; }
.header-title h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.header-title p { color: var(--text-muted); font-size: 14px; margin-bottom: 4px; }

.usage-bar { display:flex; justify-content: left; align-items: center; }
.usage-label-1 { font-weight: 600; font-size: 0.9rem; color: var(--primary); }
.progress-bg-1 { height: 6px; width: 30%; background: #ddd; border-radius: 10px; overflow: hidden; margin-right: 12px; }
.progress-fill-1 { height: 100%; background: var(--primary); border-radius: 10px; }

/* Search Box (Result Page) */
.search-box { display: flex; background: white; border: 1px solid #cbd5e1; border-radius: var(--radius); overflow: hidden; width: 100%; max-width: 400px; }
.search-box input { border: none; padding: 12px 16px; flex: 1; outline: none; font-family: inherit; }
.search-box button { background-color: var(--primary); color: white; border: none; padding: 0 24px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.search-box button:hover { background-color: var(--primary-dark); }

/* DASHBOARD STYLES */

.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force 4 columns */
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card-split {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-value-sm {
    font-size: 1.25rem; /* Smaller than main stats */
    font-weight: 700;
    color: var(--text-main);
}

.wide-chart {
    width: 100%;
    margin-bottom: 24px;
}

.stats-grid h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin-bottom: 24px; font-weight: 500; }
.card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid #e2e8f0; }

.channel-info { display: flex; align-items: center; gap: 16px; }
.channel-avatar { width: 64px; height: 64px; border-radius: 50%; border: 3px solid #f3e8ff; object-fit: cover; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-main); }

.chart-section { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid #e2e8f0; margin-bottom: 24px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-header h3 { font-size: 1.1rem; font-weight: 700; }
.chart-container { position: relative; height: 300px; width: 100%; }

.middle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media(max-width:1000px) { .middle-grid { grid-template-columns: 1fr; } }

.tags-wrapper { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { background: #f1f5f9; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.top-tag { background: #f3e8ff; color: var(--primary); font-weight: 700; }


/* Description and ai analyzer */
/* 局部样式：三行截断与过渡 */
.desc-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-muted);
    line-height: 1.6;
    transition: all 0.3s ease;
}
.desc-expanded {
    -webkit-line-clamp: unset;
    display: block;
}
/* AI Analyzer 样式 */
.ai-card-locked {
    cursor: not-allowed;
}
.ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.ai-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* 简单的 Tooltip 实现 */
[ai-tooltip]:hover::after {
    content: attr(ai-tooltip);
    position: absolute;
    bottom: 29%;
    right: 54%;
    transform: translateX(-50%);
    background: #fff;
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* AI Report Custom Styling */
#ai-content-area h3 {
    color: #5b21b6; /* 深紫色 */
    background: #f7f3fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1.05rem;
    margin-top: 25px;
    margin-bottom: 12px;
    border-left: 4px solid #9333ea;
}
#ai-content-area ul {
    list-style: none;
    padding-left: 5px;
}
#ai-content-area li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #334155;
}
#ai-content-area li::before {
    content: "•";
    color: #9333ea;
    font-weight: bold;
    position: absolute;
    left: 0;
}
#ai-content-area strong {
    color: #1e293b;
}

/* CSV Export Button Styles */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 禁用状态按钮 (灰色) */
.btn-disabled {
    background-color: #c2cbd6 !important; /* 灰色 */
    border-color: #cbd5e1 !important;
    color: #fff !important;
    cursor: not-allowed;
    pointer-events: auto; /* 确保能触发 hover */
    position: relative;
}

/* Tooltip 提示框样式 */
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 7%;
    right: 29%;
    transform: translateX(-50%);
    background: #fff;
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Table Specific */

.td-likes {
    width: 80px; /* 强制缩小 */
    text-align: right;
}

.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.table-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #e2e8f0; overflow: hidden; }
.table-header { padding: 24px; border-bottom: 1px solid #f1f5f9; }
.table-header h3 { font-size: 1.1rem; font-weight: 700; }
.table-container { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 16px 24px; background: #f8fafc; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; font-weight: 600; }
td { padding: 16px 24px; border-bottom: 1px solid #f1f5f9; color: var(--text-main); font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }
table,td,th { border:none;}

.video-cell { display: flex; align-items: center; gap: 12px; }
.video-thumb { width: 80px; height: 45px; border-radius: 6px; background-color: #cbd5e1; object-fit: cover; }

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .stats-grid-4 { grid-template-columns: 1fr; }
    .middle-grid { grid-template-columns: 1fr; }
    .search-box { max-width: 100%; }
}

/* ------ INDEX PAGE ------ */

.hero {
    padding: 80px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
}
.blob-1 { top: -100px; left: 50%; transform: translateX(-50%); width: 900px; height: 600px; background: #ce94f3; }
.blob-2 { top: 130px; right: -100px; width: 600px; height: 600px; background: #f0d9ba; opacity: 0.5; }
.blob-3 { top: 90px; left: 0; width: 600px; height: 500px; background: #bdb2e5; opacity: 0.5; }

.social-proof-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid #f3e8ff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 22px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #581c87;
}
.stars { color: #fb923c; letter-spacing: 2px; }

.hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 48px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

/* Hero Video Container */
.hero-video-container {
    position: relative;
    width: 100%;
    max-width: 1000px; 
    aspect-ratio: 1000 / 720; 
    margin: 60px auto 0px; 
    border-radius: 20px; 
    overflow: hidden;
    box-shadow: 0 10px 50px -10px rgba(0,0,0,0.3); 
    background: #fff; 
    background-image: url('https://channelprofiler.com/wp-content/uploads/custom-assets/images/hero-video.jpg'); /* 原图作为兜底 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Video Element */
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保填满容器 */
    display: block;
}

@media(min-width: 768px) {
    .hero h1 { font-size: 4.5rem; }
    .hero-actions { flex-direction: row; }
}

@media (max-width: 767px) {
    .hero-video-container {
        background-image: url('https://channelprofiler.com/wp-content/uploads/custom-assets/images/hero-video-mobile.jpg');
    }
}

/* Value Props */
.value-section { padding: 80px 0; }
.value-header { text-align: center; margin-bottom: 60px; }
.value-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; }
.value-header p { font-size: 1.125rem; color: var(--text-muted); }

.cards-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media(min-width: 768px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
    padding: 40px;
    border-radius: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.card-orange { background: linear-gradient(to bottom, #fff7ed, #fff); border-color: #ffedd5; }
.card-purple { background: linear-gradient(to bottom, #faf5ff, #fff); border-color: #f3e8ff; }
.card-blue { background: linear-gradient(to bottom, #eff6ff, #fff); border-color: #dbeafe; }

.card-icon {
    width: 60px; height: 60px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin-bottom: 24px;
}
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-purple { background: #f3e8ff; color: var(--primary); }
.icon-blue { background: #dbeafe; color: #2563eb; }

.feature-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.feature-card p { color: var(--text-muted); line-height: 1.6; }

/* Mockup Section */
.mockup-section { padding: 60px 0; background-color: var(--bg-off); }
.mockup-container {
    background: white; border-radius: 32px; padding: 40px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1); border: 1px solid #e2e8f0;
    position: relative; overflow: hidden;
}
.mockup-top-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, var(--primary), #f97316);
}
.mockup-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media(min-width: 768px) { 
    .mockup-grid { grid-template-columns: 1fr 1fr; } 
    .mockup-container { padding: 60px; }
}

.mockup-list li { display: flex; align-items: flex-start; margin-bottom: 16px; font-weight: 500; }
.check-icon {
    color: #10b981; background: #d1fae5; border-radius: 50%; width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center; margin-right: 12px; font-size: 12px; margin-top: 3px;
}

.css-chart-box {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px;
    height: 250px; position: relative; display: flex; align-items: center; justify-content: center;
}
.chart-float {
    background: white; padding: 20px; border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); position: absolute; bottom: 20px; right: 20px;
}

/* CTA Section */
.cta-section { padding: 80px 0; }
.cta-card {
    background: linear-gradient(135deg, var(--primary), #4c1d95);
    border-radius: 40px; padding: 60px 20px; text-align: center;
    color: white; position: relative; overflow: hidden;
}
.cta-blob {
    position: absolute; width: 300px; height: 300px; background: white;
    opacity: 0.1; border-radius: 50%; filter: blur(50px); top: -100px; right: -100px;
}
.cta-card h2 { font-size: 2.5rem; font-weight: 800; color: white; margin-bottom: 16px; }
.cta-card p { font-size: 1.1rem; color: #e9d5ff; margin-bottom: 32px; max-width: 500px; margin: 0 auto 32px; }


/* ------ FEATURES PAGE ------ */

.features-hero {
    background: linear-gradient(124deg, #ead3f9, #faf1ea); padding: 80px 0; text-align: center; border-bottom: 1px solid #f3e8ff;
}
.features-hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
.features-hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* Zig Zag */
.zig-zag-section { padding: 80px 0; }
.feature-row {
    display: flex; flex-direction: column; gap: 60px; align-items: center; margin-bottom: 120px;
}
.feature-text { flex: 1; order: 2; }
.feature-visual { flex: 1; width: 100%; order: 1; position: relative; }
.feature-number {
    display: inline-flex; width: 32px; height: 32px; background: #f3e8ff; color: var(--primary);
    border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 16px;
}
.feature-text h2 { font-size: 2.25rem; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.feature-text h3 { font-size: 1.125rem; font-weight: 600; color: var(--primary); margin-bottom: 24px; }
.feature-text p { font-size: 1.125rem; line-height: 1.6; color: var(--text-muted); }

.visual-card {
    background: #ffffff; border-radius: 24px; padding: 40px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1); border: 1px solid #e2e8f0;
    position: relative; z-index: 1; overflow: hidden;
}
.visual-blob {
    position: absolute; top: -20px; bottom: -20px; left: -20px; right: -20px;
    background: #f3e8ff; border-radius: 30px; z-index: 0; transform: rotate(-2deg);
}
.feature-row:nth-child(even) .visual-blob { background: #ffedd5; transform: rotate(2deg); }

@media(min-width: 900px) {
    .feature-row { flex-direction: row; }
    .feature-row:nth-child(odd) .feature-text { order: 1; }
    .feature-row:nth-child(odd) .feature-visual { order: 2; }
    .feature-row:nth-child(even) .feature-text { order: 2; }
    .feature-row:nth-child(even) .feature-visual { order: 1; }
}

/* Visualizations */
.heatmap-grid { display: grid; grid-template-columns: 40px 1fr; gap: 10px; height: 200px; }
.days-col { display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; color: #94a3b8; }
.cells-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(7, 1fr); gap: 4px; }
.cell { background: var(--primary); border-radius: 2px; opacity: 0.1; }
.cell:nth-child(3n) { opacity: 0.4; } .cell:nth-child(7n) { opacity: 0.8; } .cell:nth-child(11n) { opacity: 1; }

.title-list { display: flex; flex-direction: column; gap: 12px; }
.title-item { background: #f8fafc; padding: 12px; border-radius: 8px; border: 1px solid #e2e8f0; font-size: 0.9rem; font-weight: 500; color: #334155; }
.highlight { background: #fef08a; color: #854d0e; padding: 2px 6px; border-radius: 4px; margin: 0 2px; }

.scatter-box { height: 220px; position: relative; border-left: 2px solid #e2e8f0; border-bottom: 2px solid #e2e8f0; margin: 20px; }
.scatter-dot { position: absolute; width: 8px; height: 8px; background: #cbd5e1; border-radius: 50%; }
.sweet-spot { position: absolute; left: 30%; bottom: 40%; width: 80px; height: 80px; background: rgba(249, 115, 22, 0.1); border: 2px dashed rgba(249, 115, 22, 0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dot-hot { background: #f97316; }

.tag-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-content: center; height: 200px; }
.tag { padding: 6px 14px; border-radius: 50px; font-weight: 700; font-size: 0.8rem; }
.tag-lg { font-size: 1.1rem; padding: 8px 18px; }
.tag-purple { background: #f3e8ff; color: var(--primary); }
.tag-orange { background: #ffedd5; color: #ea580c; }
.tag-gray { background: #f1f5f9; color: #64748b; }

.trend-container { width: 100%; height: 180px; position: relative; display: flex; align-items: flex-end; }

.footer-cta { background: linear-gradient(135deg, var(--primary), #4c1d95); color: white; text-align: center; padding: 80px 20px; }
.footer-cta h2 { font-size: 2.5rem; margin-bottom: 32px; color: white;}


/* ------ PRICING PAGE ------ */

.pricing-hero { padding: 80px 0 60px; text-align: center; }
.pricing-hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 16px; }
.pricing-hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 100px; align-items: center; }
@media(min-width: 900px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.pricing-plan-card {
    background: white; border: 1px solid #e2e8f0; border-radius: 24px; padding: 40px;
    text-align: center; transition: 0.3s; display: flex; flex-direction: column; height: 100%;
}
.pricing-plan-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.price { font-size: 3rem; font-weight: 800; color: var(--text-main); margin-bottom: 6px; display: block; }
.price span { font-size: 1rem; color: var(--text-muted); font-weight: 500; }

.features-list { list-style: none; text-align: left; margin-bottom: 32px; flex: 1; }
.features-list li { margin-bottom: 16px; color: #475569; display: flex; align-items: flex-start; }
.check-icon { color: var(--primary); margin-right: 10px; font-weight: 800; }

.plan-btn { width: 100%; padding: 14px; border-radius: 14px; font-weight: 700; cursor: pointer; transition: 0.2s; border: none; }

/* Plus Card Highlight */
.pricing-plan-card.plus {
    border-color: var(--primary); background: linear-gradient(to bottom, #faf5ff, #ffffff);
    box-shadow: 0 20px 40px -10px rgba(151, 34, 224, 0.15); transform: scale(1.05); position: relative; z-index: 10;
}
.badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white; padding: 4px 16px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}

.btn-starter { background: #f1f5f9; color: var(--text-main); }
.btn-starter:hover { background: #e2e8f0; }

.btn-plus { background: var(--primary); color: white; box-shadow: 0 10px 20px -5px rgba(151, 34, 224, 0.3); }
.btn-plus:hover { background: var(--primary-dark); transform: translateY(-2px); }

.btn-pro { background: #0f172a; color: white; }
.btn-pro:hover { background: #334155; }

/* ------ GUIDES PAGE ------ */

.guides-hero {
    padding: 80px 0 60px; text-align: center;
    background: linear-gradient(to bottom, #fdfbff, #ffffff); border-bottom: 1px solid #f1f5f9;
}
.guides-hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 16px; }
.guides-hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.filter-bar {
    display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
    margin: -25px auto 60px; position: relative; z-index: 10;
}
.filter-btn {
    background: white; border: 1px solid #e2e8f0; padding: 8px 24px;
    border-radius: 50px; font-weight: 500; color: var(--text-muted);
    cursor: pointer; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: 0.2s;
}
.filter-btn:hover { color: var(--primary); border-color: #d8b4fe; }
.filter-btn.active { background: #1e293b; color: white; border-color: #1e293b; }

.guides-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 80px; }
@media(min-width: 768px) { .guides-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 1024px) { .guides-grid { grid-template-columns: repeat(3, 1fr); } }

.guide-card {
    background: white; border: 1px solid #e2e8f0; border-radius: 20px;
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}
.guide-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #e9d8fd; }

.guide-card:hover .card-img { transform: scale(1.05); }

.category-badge {
    position: absolute; top: 16px; left: 16px; background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px); color: var(--primary); font-size: 0.75rem; font-weight: 700;
    padding: 4px 12px; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.5px;
}

.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.guide-card:hover .card-title { color: var(--primary); }

.card-excerpt { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.card-meta {
    border-top: 1px solid #f1f5f9; padding-top: 16px; display: flex;
    justify-content: space-between; font-size: 0.8rem; font-weight: 600; color: #94a3b8; text-transform: uppercase;
}

/* ------ LOGIN PAGE ------ */

.forgot-password {
    display: block; text-align: left; font-size: 0.9rem; color: var(--text-muted); margin-top: 16px;
}
.link-accent { color: #ea580c; font-weight: 600; }
.auth-bottom-link {
    margin-top: 32px; padding-top: 24px; border-top: 1px solid #f1f5f9;
    text-align: center; font-size: 0.95rem; color: var(--text-muted);
}
.link-primary { color: var(--primary); font-weight: 700; }
.link-primary:hover { color: var(--primary-dark); text-decoration: underline; }

/* ------ SIGNUP PAGE ------ */

.legal-text {
    margin-top: 24px; font-size: 0.85rem; color: var(--text-muted);
    text-align: center; line-height: 1.5;
}
.legal-text a { text-decoration: underline; color: var(--text-muted);
    font-size: 0.80rem; }


/* ------ CONTACT PAGE ------ */

.contact-hero { text-align: center; padding: 80px 0 60px; }
.contact-hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 16px; }
.contact-hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.contact-container { width: 100% ; margin: 0 auto 100px; padding: 0 20px; display: flex; align-items:center; justify-content: center;}

.contact-form-card { width: 100% ; max-width: 520px; background: white; padding: 48px; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid #e2e8f0; }
.form-input, .form-textarea { width: 100%; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: var(--radius); font-family: inherit; font-size: 1rem; outline: none; transition: 0.2s; background: #F8FAFC; }
.form-input:focus, .form-textarea:focus { border-color: var(--primary); background: white; }
.form-textarea { resize: vertical; min-height: 120px; }
.submit-btn { width: 100%; background-color: var(--primary); color: white; padding: 14px; border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.2s; }
.submit-btn:hover { background-color: var(--primary-dark); transform: translateY(-2px); }

/* ------ BLOG PAGE ------ */

.blog-container {
    max-width: 1200px; /* Wider container for grid */
    margin: 0 auto;
}

/* Hero Section inside Main */
.blog-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
}

.blog-header p { font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* Filter Bar */
.filter-bar {
    display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 40px;
}
.filter-btn {
    background: white; border: 1px solid #e2e8f0; padding: 8px 24px;
    border-radius: 50px; font-weight: 600; color: var(--text-muted);
    cursor: pointer; transition: 0.2s; font-size: 0.9rem;
}
.filter-btn:hover { color: var(--primary); border-color: #d8b4fe; }
.filter-btn.active { background: var(--text-main); color: white; border-color: var(--text-main); }

/* Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

/* Card Styles */
.blog-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none; /* Remove link underline */
    color: inherit;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: #e9d8fd;
}

.card-img-box { 
    position: relative;
    padding-top: 66.66%; 
    background: #f1f5f9;
    overflow: hidden; 
}

.card-img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s; 
}

.blog-card:hover .card-img { transform: scale(1.05); }

.category-badge {
    position: absolute; top: 16px; left: 16px;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(4px);
    color: var(--primary); font-size: 0.75rem; font-weight: 700;
    padding: 4px 12px; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }

.card-title {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 12px;
    line-height: 1.4; color: var(--text-main);
    transition: color 0.2s;
}
.blog-card:hover .card-title { color: var(--primary); }

.card-excerpt {
    color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px;
    flex: 1;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.6;
}

.card-meta {
    border-top: 1px solid #f1f5f9; padding-top: 16px;
    display: flex; justify-content: space-between;
    font-size: 0.8rem; font-weight: 600; color: #94a3b8;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-header h1 { font-size: 2rem; }
}

/* ------ PLANS PAGE ------ */

.plans-header p {
    font-size: 1.1rem;
}

/* 1. Pricing Cards Row */
.pricing-section {
    margin-bottom: 48px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: start; /* Align top */
}

.plan-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: transform 0.2s;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.plan-name { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.plan-price { font-size: 2.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 2px; margin-top: 11px; }
.plan-price span { font-size: 1rem; color: var(--text-muted); font-weight: 500; }

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
    margin-top: 14px;
    flex: 1; /* Pushes button down */
}
.features-list li { margin-bottom: 14px; color: #475569; font-size: 0.95rem; display: flex; align-items: flex-start; }
.features-list i { color: var(--primary); margin-right: 10px; margin-top: 4px; font-size: 0.9rem; }

/* Highlighted Pro Card */
.plan-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(to bottom, #faf5ff, #ffffff);
    box-shadow: 0 20px 40px -10px rgba(151, 34, 224, 0.15);
    transform: scale(1.02);
    z-index: 5;
}
.popular-badge {
    position: absolute;
    top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white;
    padding: 4px 16px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}

/* --- Simplified Yearly Toggle --- */
.yearly-toggle-wrapper {
    margin: 0 0 24px 0;
    display: flex;
    justify-content: center;
}

.yearly-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed #c3c7cd;
    transition: all 0.2s;
}

.yearly-checkbox:hover {
    border-color: var(--primary);
    background: #fff;
}

.yearly-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid var(--primary);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: 0.2s;
}

.yearly-checkbox input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.yearly-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.toggle-text {
    color: var(--primary);
    font-weight: 500;
}

/* 2. Status & Credits Row */
.status-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.status-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
}

/* Current Plan Styling */
.current-plan-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.plan-detail-label { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 4px; }
.plan-detail-title { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.plan-detail-expiry { font-size: 0.9rem; color: #64748b; margin-top: 4px; }
.status-badge {
    background: #dcfce7; color: #166534; padding: 6px 12px; border-radius: 50px; font-weight: 700; font-size: 0.85rem;
}

/* Usage Bar */
.usage-label-2 { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.progress-bg-2 { height: 10px; background: #f1f5f9; border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.progress-fill-2 { height: 100%; background: var(--primary); border-radius: 10px; }

/* 3. Invoices Table */
.invoice-table-wrapper {
    background: white;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.invoice-header { padding: 24px; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }
.invoice-header h3 { font-size: 1.1rem; font-weight: 700; }

.paid-badge { background: #f3e8ff; color: var(--primary); padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.action-link { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: 0.2s; cursor: pointer; }
.action-link:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 1024px) {
    .status-grid { grid-template-columns: 1fr; }
}

/* ------ ACCOUNT PAGE ------ */

.account-container {
    max-width: 800px;
    margin: 0 auto;
}

/* 1. Profile Header Card */
.profile-header {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background-color: #F6AD55;
    color: white;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.profile-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
    color: var(--text-main);
}


/* ... (中间的通用样式保持不变) ... */
.settings-card { background: white; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); border: 1px solid #e2e8f0; margin-bottom: 32px; }
.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 24px; color: var(--text-main); padding-bottom: 16px; border-bottom: 1px solid #f1f5f9; }
.form-group { margin-bottom: 24px; }
.form-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-main); }
.form-input { width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: var(--radius); font-size: 1rem; outline: none; transition: 0.2s; color: var(--text-main); font-family: inherit; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(151, 34, 224, 0.1); }
.form-input:disabled { background-color: #f1f5f9; color: #94a3b8; cursor: not-allowed; border-color: #e2e8f0; }
#password-trigger-wrapper p { color: var(--text-muted); margin-bottom: 16px; font-size: 0.95rem; }
#password-form { display: none; opacity: 0; transition: opacity 0.3s ease; }
#password-form.active { display: block; opacity: 1; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.danger-zone { border: 1px solid #fecaca; background-color: #fffafa; }
.danger-zone .section-title { border-bottom-color: #fecaca; color: #991b1b; }
.danger-text { color: #7f1d1d; font-size: 0.9rem; margin-bottom: 24px; line-height: 1.6; }
.btn-danger { background-color: #ef4444; color: white; border: none; padding: 10px 24px; border-radius: var(--radius); font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-danger:hover { background-color: #dc2626; }

/* NEW: Sign Out Section Styles */
.sign-out-section {
    margin-top: 48px;
    text-align: center;
    padding-bottom: 32px; /* Add spacing at the bottom of the page */
}

.sign-out-btn {
    color: var(--text-muted); /* Slightly muted text for secondary action */
    border-color: #cbd5e1;
}
.sign-out-btn:hover {
    background-color: #e2e8f0;
    color: var(--text-main);
}


/* Responsive Fix */
@media (max-width: 768px) {
    .profile-header { flex-direction: column; text-align: center; gap: 20px; }
    .profile-info { flex-direction: column; }
    main { padding: 20px; }
}

/* ------ NOTIFICATIONS PAGE ------ */

.notifications-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Tabs */

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 40px;
}

.tab-btn {
    padding-bottom: 16px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    background: none;
    border-top: none; border-left: none; border-right: none;
}

.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--text-main); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Notification List */
.notif-list { display: flex; flex-direction: column; gap: 24px; }
.notif-item { display: flex; gap: 24px; align-items: flex-start; }

/* Icon */
.notif-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 6px rgba(151, 34, 224, 0.2);
    margin-top: 10px;
}

/* Card - Added Cursor Pointer for interaction */
.notif-card {
    flex: 1;
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer; /* Show clickable cursor */
}

.notif-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary); /* Highlight border on hover */
}

.notif-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.notif-body { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; line-height: 1.6; }
.notif-date { font-size: 0.85rem; color: #94a3b8; font-weight: 500; }
.new-badge { background-color: #ef4444; width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 8px; vertical-align: middle; }

/* --- MODAL STYLES (New) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Dimmed background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 80vh; /* Limit height to 80% of screen */
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.modal-close-btn:hover { color: var(--text-main); }

/* Scrollable Body */
.modal-body {
    padding: 24px;
    overflow-y: auto; /* Enable vertical scrolling */
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-main);
}

/* Scrollbar styling for modal */
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

/* Prevent body scroll when modal open */
body.modal-open { overflow: hidden; }

/* ------ FEEDBACK PAGE ------ */

.feedback-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.feedback-header {
    text-align: center;
    margin-bottom: 40px;
}

.feedback-header p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; line-height: 1.6; }

/* Reuse Contact Card Style */
.feedback-card { 
    width: 100%; 
    max-width: 520px; 
    background: white; 
    padding: 48px; 
    border-radius: 24px; 
    box-shadow: var(--shadow); 
    border: 1px solid #e2e8f0; 
}

.form-input, .form-textarea, .form-select { 
    width: 100%; 
    padding: 12px 16px; 
    border: 1px solid #e2e8f0; 
    border-radius: var(--radius); 
    font-family: inherit; 
    font-size: 1rem; 
    outline: none; 
    transition: 0.2s; 
    background: #F8FAFC; 
    color: var(--text-main);
}

.form-input:focus, .form-textarea:focus, .form-select:focus { 
    border-color: var(--primary); 
    background: white; 
    box-shadow: 0 0 0 3px rgba(151, 34, 224, 0.1);
}

.form-textarea { resize: vertical; min-height: 120px; }

/* Select styling */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.submit-btn { 
    width: 100%; 
    background-color: var(--primary); 
    color: white; 
    padding: 14px; 
    border: none; 
    border-radius: var(--radius); 
    font-size: 1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.2s; 
}
.submit-btn:hover { 
    background-color: var(--primary-dark); 
    transform: translateY(-2px); 
}

/* =========================================
   6. PLUGIN OVERRIDES (PMPro 美化)
   ========================================= */

/* --- 通用表单重置 --- */
/* 针对登录表单 (#pmpro_login_form) 和 注册表单 (#pmpro_form) */
#pmpro_login_form, #pmpro_form {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* --- 输入框样式 (强制覆盖) --- */
#pmpro_login_form input[type="text"],
#pmpro_login_form input[type="password"],
#pmpro_form input[type="text"],
#pmpro_form input[type="password"],
#pmpro_form input[type="email"],
#pmpro_form select,
#pmpro_form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 13px; /* 你的圆角 DNA */
    font-size: 1rem;
    font-family: 'Noto Sans', sans-serif;
    margin-bottom: 16px;
    background: #F8FAFC;
    color: #1e293b;
    box-shadow: none;
    outline: none;
    transition: border-color 0.2s;
}

/* 输入框聚焦状态 */
#pmpro_login_form input:focus,
#pmpro_form input:focus,
#pmpro_form select:focus {
    border-color: #9722E0; /* 你的主色 */
    background: white;
    box-shadow: 0 0 0 3px rgba(151, 34, 224, 0.1);
}

/* --- 标签样式 --- */
#pmpro_login_form label,
#pmpro_form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 0.95rem;
}

/* --- 按钮样式 (强制变成你的紫色大按钮) --- */
#pmpro_login_form input[type="submit"],
#pmpro_form input[type="submit"],
#pmpro_btn-submit {
    background-color: #9722E0 !important;
    color: white !important;
    width: 100%;
    padding: 14px;
    border-radius: 13px !important;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s;
    text-transform: none; /* 防止插件强制大写 */
}

#pmpro_login_form input[type="submit"]:hover,
#pmpro_form input[type="submit"]:hover {
    background-color: #7c1cb8 !important;
    transform: translateY(-2px);
}

/* --- 隐藏不需要的元素 (可选) --- */
/* 比如隐藏插件自带的一些分割线或提示 */
.pmpro_checkout-fields hr {
    display: none;
}

/* 错误提示信息美化 */
div.pmpro_message {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}
div.pmpro_message.pmpro_success {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

/* --- PMPro Invoices Table Styling --- */
.pmpro_section_title { display: none; }
.pmpro_actions_nav-right { display:none; }
.pmpro_actions_nav-left { display:none; }

/* --- WP RESET OVERRIDES --- */
/* 移除 WP 自动生成的顶部空白 */
html { margin-top: 0 !important; }
body { margin: 0 !important; padding: 0 !important; }

/* 确保 Blank Slate 模板全宽 */
.entry-content, .wp-site-blocks { 
    max-width: 100% !important; 
    width: 100% !important; 
    padding: 0 !important; 
    margin: 0 !important;
}