/* ============================================
   桂老师的AI资源分享站 - 样式表
   严格参照 leleo.top 布局实现
   ============================================ */

/* ---------- CSS变量定义 ---------- */
:root {
    /* 背景 */
    --bg-primary: url('../images/hero-bg.jpg');
    --bg-overlay: rgba(190, 200, 215, 0.45);

    /* 毛玻璃卡片 */
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-hover: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-blur: blur(20px);

    /* 小毛玻璃（标签、按钮） */
    --glass-sm-bg: rgba(255, 255, 255, 0.45);
    --glass-sm-border: rgba(255, 255, 255, 0.5);

    /* 搜索框毛玻璃 */
    --search-bg: rgba(255, 255, 255, 0.35);
    --search-blur: blur(16px);

    /* 时钟面板毛玻璃 */
    --clock-bg: rgba(255, 255, 255, 0.4);
    --clock-blur: blur(20px);

    /* 视频列表毛玻璃 */
    --video-bg: rgba(255, 255, 255, 0.3);

    /* 按钮悬浮毛玻璃 */
    --btn-bg: rgba(255, 255, 255, 0.4);

    /* 文字颜色 */
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-white: #ffffff;

    /* 强调色 */
    --accent-orange: #e67e22;
    --accent-orange-hover: #d35400;

    /* 阴影 */
    --shadow-card: 0 8px 32px rgba(31, 38, 135, 0.08);
    --shadow-card-hover: 0 16px 48px rgba(31, 38, 135, 0.15);
    --shadow-avatar: 0 4px 16px rgba(230, 126, 34, 0.35);

    /* 圆角 */
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-pill: 24px;
    --gray-50: #f5f5f5;
    --gray-900: #1a1a1a;
    --border-shadow-light: 0 0 0 1px rgba(0,0,0,0.06);

    /* 头像渐变 */
    --avatar-gradient: linear-gradient(135deg, #e67e22, #f39c12);
}

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- body样式 ---------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    /* 页面加载淡入 */
    opacity: 0;
    animation: bodyFadeIn 0.6s ease forwards;
    padding: 14px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

@keyframes bodyFadeIn {
    to {
        opacity: 1;
    }
}

/* ---------- 全屏背景图 ---------- */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-primary);
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
}

/* ---------- 主内容容器 ---------- */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   上半部分：Hero三栏区域
   ============================================ */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 2.5fr 1fr;
    gap: 16px;
    min-height: 55vh;
    align-items: center;
}

/* ---------- 入场动画 ---------- */
.hero-left {
    animation: fadeInUp 0.5s ease 0.1s both;
}

.hero-center {
    animation: fadeInUp 0.5s ease 0.2s both;
}

.hero-right {
    animation: fadeInUp 0.5s ease 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   左栏
   ============================================ */
.hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ---------- 头像 ---------- */
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--avatar-gradient);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-avatar);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    /* 呼吸动画 */
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

/* ---------- Tags标题 ---------- */
.tags-title {
    margin-top: 20px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ---------- 标签pill容器 ---------- */
.tags-container {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.tag-pill {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 14px;
    background: var(--glass-sm-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-sm-border);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: default;
}

.tag-pill:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: scale(1.05);
}

/* ---------- 社交图标行 ---------- */
.social-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.social-icon {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-sm-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-sm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: scale(1.1);
    color: var(--accent-orange);
}

/* ---------- 底部AI头像装饰 ---------- */
.color-wheel {
    margin-top: 16px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
}


/* ---------- 头像提示文字 ---------- */
.logo-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.logo-tip:hover {
    color: #ffffff;
    transform: scale(1.03);
}

/* ---------- 搜索框 ---------- */
.search-box {
    width: 100%;
    max-width: 520px;
    height: 48px;
    background: var(--search-bg);
    backdrop-filter: var(--search-blur);
    -webkit-backdrop-filter: var(--search-blur);
    border-radius: var(--radius-pill);
    --gray-50: #f5f5f5;
    --gray-900: #1a1a1a;
    --border-shadow-light: 0 0 0 1px rgba(0,0,0,0.06);
    border: 1px solid var(--glass-sm-border);
    display: flex;
    align-items: center;
    padding: 0 6px 0 12px;
    gap: 8px;
}

/* 下拉按钮 */
.search-dropdown {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    background: var(--glass-sm-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--glass-sm-border);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-dropdown:hover {
    background: rgba(255, 255, 255, 0.6);
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
}

/* 输入框 */
.search-input {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* 搜索按钮 */
.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-sm-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-sm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

/* ---------- 大标题 ---------- */
.main-title {
    margin-top: 30px;
    font-size: 64px;
    font-weight: 900;
    font-style: italic;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    line-height: 1.2;
}

/* ---------- 打字机文字 ---------- */
.typewriter-wrapper {
    margin-top: 20px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.quote-left,
.quote-right {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
}

.typewriter-text {
    min-height: 24px;
}

/* 闪烁光标 */
.cursor {
    display: inline-block;
    width: 2px;
    height: 18px;
    background: var(--accent-orange);
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* ---------- "资源分类"小标题 ---------- */
.section-subtitle {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.subtitle-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* ============================================
   右栏 - 时钟面板
   ============================================ */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.clock-panel {
    position: relative;
    width: 100%;
    max-width: 200px;
    background: var(--clock-bg);
    backdrop-filter: var(--clock-blur);
    -webkit-backdrop-filter: var(--clock-blur);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    border: 1px solid var(--glass-sm-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

/* 装饰圆环 */
.clock-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(52, 152, 219, 0.4);
    opacity: 0.3;
    animation: rotateRing 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateRing {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 时间 */
.clock-time {
    position: relative;
    z-index: 1;
    font-size: 38px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

/* 日期 */
.clock-date {
    position: relative;
    z-index: 1;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* 星期 */
.clock-weekday {
    position: relative;
    z-index: 1;
    margin-top: 2px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ============================================
   下半部分：卡片网格区域
   ============================================ */
.cards-section {
    margin-top: 16px;
}

/* ---------- 卡片网格 ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ---------- 卡片依次入场 ---------- */
.resource-card:nth-child(1) {
    animation: fadeInUp 0.5s ease 0.15s both;
}

.resource-card:nth-child(2) {
    animation: fadeInUp 0.5s ease 0.3s both;
}

.resource-card:nth-child(3) {
    animation: fadeInUp 0.5s ease 0.45s both;
}

.resource-card:nth-child(4) {
    animation: fadeInUp 0.5s ease 0.6s both;
}

/* ---------- 卡片容器 ---------- */
.resource-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    background: var(--glass-bg-hover);
}

/* ---------- 图片区域 ---------- */
.card-image-wrapper {
    width: 100%;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: transform 0.3s ease;
}

.resource-card:hover .card-image {
    transform: scale(1.05);
}

/* ---------- 内容区域 ---------- */
.card-content {
    padding: 14px 16px;
    flex: 1;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-desc {
    margin-top: 4px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    /* 单行截断 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 底部操作栏 ---------- */
.card-actions {
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* 操作按钮通用样式 */
.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    background: var(--btn-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-sm-border);
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: scale(1.05);
}

.action-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* 展开按钮箭头旋转 */
.btn-arrow {
    transition: transform 0.3s ease;
}

.action-btn.expanded .btn-arrow {
    transform: rotate(180deg);
}

/* ---------- 视频列表 ---------- */
.video-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--video-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 视频项 */
.video-item {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.video-item:last-child {
    border-bottom: none;
}

/* 视频信息（左侧） */
.video-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.play-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-orange);
    flex-shrink: 0;
}

.video-name {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 视频时长 */
.video-duration {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

/* 视频链接按钮 */
.video-link {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    background: var(--glass-sm-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-sm-border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.video-link:hover {
    background: rgba(255, 255, 255, 0.65);
    color: var(--accent-orange);
}

/* ============================================
   响应式设计
   ============================================ */

/* ---------- 平板 (768-1024px) ---------- */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr 2fr 1fr;
        gap: 12px;
    }

    .main-title {
        font-size: 48px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- 手机 (<768px) ---------- */
@media (max-width: 767px) {
    body {
        padding: 10px;
    }

    /* Hero区域改为单栏垂直堆叠 */
    .hero-section {
        grid-template-columns: 1fr;
        gap: 20px;
        min-height: auto;
    }

    .hero-left {
        order: 1;
    }

    .hero-center {
        order: 2;
    }

    .hero-right {
        order: 3;
    }

    /* 左栏内容居中 */
    .hero-left {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .avatar {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .tags-title {
        margin-top: 0;
        width: 100%;
    }

    .tags-container {
        margin-top: 6px;
        width: 100%;
    }

    .social-links {
        margin-top: 8px;
    }

    .color-wheel {
        margin-top: 8px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
    object-position: top;
    }

    /* 中栏 */
    .search-box {
        max-width: 100%;
    }

    .main-title {
        font-size: 32px;
        margin-top: 20px;
    }

    .typewriter-wrapper {
        font-size: 14px;
        margin-top: 12px;
    }

    .section-subtitle {
        margin-top: 20px;
    }

    /* 时钟面板 */
    .clock-panel {
        max-width: 160px;
        padding: 20px 16px;
    }

    .clock-time {
        font-size: 28px;
    }

    .clock-ring {
        width: 90px;
        height: 90px;
    }

    /* 卡片单列 */
    .cards-grid {
        grid-template-columns: 1fr;
    }
}


/* 右上时钟 */
.clock-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    --gray-50: #f5f5f5;
    --gray-900: #1a1a1a;
    --border-shadow-light: 0 0 0 1px rgba(0,0,0,0.06);
    background: var(--gray-50);
    box-shadow: var(--border-shadow-light);
    font-size: 13px;
    color: var(--text-secondary);
}


/* ---------- 登录/注册按钮 ---------- */
.hero-auth-row {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hero-auth-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--glass-sm-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-sm-border);
    color: var(--text-secondary);
    text-decoration: none;
}

.hero-auth-btn:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: scale(1.05);
    color: var(--text-primary);
}

.hero-auth-btn-primary {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    font-weight: 500;
}

.hero-auth-btn-primary:hover {
    background: rgba(255, 255, 255, 0.75);
    color: #1a2332;
}

/* HerAgent 侧边栏 - 用户信息栏（登录后显示在侧边栏顶部） */
.ha-user-bar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #222;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.ha-user-bar .ha-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--avatar-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    font-weight: 600;
    flex-shrink: 0;
}

.ha-user-bar .ha-user-name {
    flex: 1;
    font-size: 13px;
    color: #fff;
    font-weight: 500;
}

.ha-user-bar .ha-user-pwd {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 13px;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.ha-user-bar .ha-user-pwd:hover {
    color: #fff;
}

.ha-user-bar .ha-user-logout {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.ha-user-bar .ha-user-logout:hover {
    color: #e74c3c;
}

/* ============================================
   登录/注册 Modal - 纯白 + Vercel蓝
   ============================================ */
.auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: 100000;
    justify-content: center;
    align-items: center;
}

.auth-overlay.show { display: flex; }

.auth-modal {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(200,200,200,0.5);
    border-radius: var(--radius-lg);
    padding: 32px 28px 24px;
    width: 380px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    animation: modalIn 0.3s ease;
    position: relative;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal .modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none;
    font-size: 20px; color: var(--text-muted);
    cursor: pointer; width: 30px; height: 30px;
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    transition: all 0.2s;
}

.auth-modal .modal-close:hover {
    background: var(--gray-50);
    color: var(--text-primary);
}

.auth-modal .modal-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.auth-modal .modal-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.auth-modal .form-group { margin-bottom: 16px; }

.auth-modal .form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.auth-modal .form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #d0d0d0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: var(--text-primary);
    box-sizing: border-box;
}

.auth-modal .form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,112,243,0.1);
}

.auth-modal .form-group input.error { border-color: #e00; }

.auth-modal .submit-btn {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-900);
    color: #fff;
    margin-top: 8px;
}

.auth-modal .submit-btn:hover { background: #000; }

.auth-modal .submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-modal .form-error {
    color: #e00;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
    min-height: 18px;
}

.auth-modal .form-success {
    color: #13a10e;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
    min-height: 18px;
}

.auth-modal .form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-modal .form-footer a {
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.auth-modal .form-footer a:hover { text-decoration: underline; }

/* Tab切换 */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-50);
    box-shadow: var(--border-shadow-light);
}

.auth-tab {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.auth-tab.active {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #d0d0d0;
    font-weight: 500;
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* 注册面板美化 */
.reg-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
}
.reg-note-icon { font-size: 18px; }
.reg-note-text { font-size: 13px; color: #666; line-height: 1.4; }

.reg-row {
    display: flex;
    gap: 12px;
}
.reg-row .form-group {
    flex: 1;
    margin-bottom: 16px;
}

.field-icon { font-size: 13px; margin-right: 2px; }



/* ============================================
   HerAgent 侧栏 - 黑白极简
   ============================================ */
.ha-chat-head {
    background: var(--gray-900) !important;
    color: #fff !important;
}
.ha-chat-head .ha-chat-name { color: #fff !important; }
.ha-chat-head .ha-chat-status { color: rgba(255,255,255,0.7) !important; }
.ha-chat-head .ha-close-btn {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}
.ha-chat-head .ha-close-btn:hover {
    background: rgba(255,255,255,0.3) !important;
    color: #fff !important;
}
.ha-send-btn { background: var(--gray-900) !important; }



@media (max-width: 767px) {
    .auth-modal { padding: 24px 20px 20px; width: 95vw; }
}
/* ============================================
   重设计登录/注册卡片
   ============================================ */
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    width: 400px;
    max-width: 92vw;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.08);
    animation: modalIn 0.3s ease;
    position: relative;
}

.auth-card-top {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    border: 2px solid rgba(255,255,255,0.85);
    box-shadow: 0 4px 16px rgba(230,126,34,0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 16px;
    letter-spacing: 1px;
    animation: breathe 3s ease-in-out infinite;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: #888;
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.15s;
}

.auth-close:hover {
    background: #f0f0f0;
    color: #333;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 3px;
}

.auth-tab {
    flex: 1;
    padding: 8px 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.auth-field {
    margin-bottom: 14px;
}

.auth-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #111;
    box-sizing: border-box;
}

.auth-field input:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.auth-field input::placeholder {
    color: #bbb;
}

.auth-btn {
    width: 100%;
    padding: 11px;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
    color: #111;
    margin-top: 4px;
}

.auth-btn:hover {
    background: #f8f8f8;
    border-color: #bbb;
}

.auth-btn:active {
    transform: scale(0.98);
}

.auth-msg {
    color: #e00;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    min-height: 0;
}

.auth-success {
    color: #13a10e;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    min-height: 0;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #888;
}

.auth-footer a {
    color: #111;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Hide auth panels by default */
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* ---------- Logo打字机文字 ---------- */
.logo-typewriter-text {
    font-size: 12px;
    min-height: 18px;
}

/* ---------- Logo光标 ---------- */
.logo-cursor {
    display: inline-block;
    width: 2px;
    height: 16px;
    background: var(--accent-orange);
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
    vertical-align: middle;
}

/* ---------- 社交图标悬浮提示（二维码） ---------- */
.social-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    z-index: 100;
    padding: 8px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-tooltip img {
    width: 140px;
    height: 140px;
    display: block;
    border-radius: 4px;
}

.social-icon:hover .social-tooltip {
    display: block;
}

/* 小三角箭头 */
.social-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #ffffff;
}

/* ==================== 分类目录样式 ==================== */
.category-group {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.category-group:last-child {
    border-bottom: none;
}
.category-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}
.cat-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #5b6abf;
    opacity: 0.85;
}
.cat-name {
    font-size: 13px;
}
.category-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 30px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background 0.15s;
    cursor: pointer;
}
.category-item:hover {
    background: #f5f5f5;
}
.cat-item-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #888;
}
.cat-item-name {
    font-size: 13px;
    flex: 1;
}
.cat-item-link {
    font-size: 11px;
    color: #999;
    font-family: monospace;
}
.empty-hint {
    padding: 20px;
    text-align: center;
    color: #bbb;
    font-size: 13px;
}

/* ---------- 展开平台下拉滑杆 ---------- */
.video-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.video-list.expanded {
    max-height: 65vh;
    overflow-y: auto;
    border-top: 1px solid var(--glass-border, rgba(255,255,255,0.2));
}
.video-list.expanded::-webkit-scrollbar {
    width: 4px;
}
.video-list.expanded::-webkit-scrollbar-track {
    background: transparent;
}
.video-list.expanded::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}
.video-list.expanded::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}
