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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 主容器 */
.main-content {
    min-height: 100vh;
    /* 原来的渐变背景，保留以备后用 */
    /* background: linear-gradient(135deg, #fff7ed 0%, #eff6ff 100%); */
}

/* 左侧侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 15%;
    height: 70vh;
    width: 200px;
    background-color: rgb(255, 255, 255, 0.9);

    color: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 50;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.sidebar.visible {
    transform: translateX(0);
}


.sidebar-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 用户头像区域 */
.user-section {
    display: none;
    align-items: center;
    margin-bottom: 32px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background-color: #f97316;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-info {
    margin-left: 12px;
}

.user-email {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.user-subtitle {
    font-size: 12px;
    color: #9ca3af;
}

/* 导航菜单 */
.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: rgb(18, 18, 15);
    transition: background-color 0.2s ease;
}

.nav-item:hover {
    background-color: #374151;
    color: rgb(255, 255, 255);

}

.nav-item.active {
    background-color: #ea580c;
    color: rgb(255, 255, 255);

}

.nav-item svg {
    margin-right: 12px;
    flex-shrink: 0;
}


.setting-btn {
    display: flex;
    align-items: center;
    padding: 12px;
    color: rgb(18, 18, 15);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    position: relative;
}

.setting-btn:hover {
    background-color:#374151;
    color: #ffffff;
}

.setting-btn svg {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.setting-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 8px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 120px;
    z-index: 1000;
    padding: 4px 0;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

.submenu-item:hover {
    background-color: #F3F4F6;
    color: #374151;
}

.submenu-item svg {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

/* 登录入口 */
.login-section {
    margin-top: auto;
}

.login-btn {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    background-color: #f97316;
    transition: background-color 0.2s ease;
    width: 100%;
    justify-content: center;
}

.login-btn:hover {
    background-color: #ea580c;
}

.login-btn svg {
    margin-right: 8px;
}

/* 菜单按钮 */
.menu-toggle {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.menu-toggle:hover {
    /* background-color: #f9fafb; */
    transform: scale(1.05);
}

.menu-toggle svg {
    color: #374151;
}

/* 菜单按钮在侧边栏展开时的位置 */
.menu-toggle.in-sidebar {
    left: 220px; /* 288px - 48px = 240px，在侧边栏内右侧 */
    /* border-color: #d1d5db; */
}

/* 登录按钮 */
.login-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    min-width: 60px;
}

.login-toggle:hover {
    transform: scale(1.05);
    background-color: #f9fafb;
}

/* 登录按钮隐藏状态 */
.login-toggle.hidden {
    display: none;
}




/* 英雄区 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    /* 使用bg.svg作为背景图片 */
    background-image: url('../../public/bg.svg'), linear-gradient(135deg, #f7f0e7 0%, #dde4ed 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    max-width: 1024px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 24px;
    line-height: 1.2;
}

.highlight {
    color: #f97316;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: #6b7280;
    margin-bottom: 48px;
}

/* 搜索容器 */
.search-container {
    max-width: 512px;
    margin: 0 auto 32px;
}

/* 搜索框容器 - 相对定位，增加高度 */
.search-box {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    padding: 16px;
    height: 180px;
}

/* 搜索输入框 - 自适应高度的多行输入 */
.search-input {
    width: 100%;
    height: calc(100% - 20px);
    padding: 16px;
    font-size: 1.125rem;
    border: none;
    outline: none;
    border-radius: 12px;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.search-input::placeholder {
    color: #9ca3af;
}

/* 创作按钮 - 较小尺寸，定位到右下角 */
.create-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background-color: #f97316;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
    z-index: 1;
}

.create-btn:hover {
    background-color: #ea580c;
}

/* 示例按钮滚动容器 */
.examples {
    display: flex;
    gap: 12px;
    overflow: hidden;
    position: relative;
    margin: 0 10%;
    align-items: center;
    border-radius: 200px;
}

/* 滚动内容 */
.examples-scroll {
    display: flex;
    gap: 12px;
    animation: scrollLeft 15s linear infinite;
    white-space: nowrap;
    transform: translateX(0);
}

/* 示例按钮 */
.example-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.example-btn:hover {
    background: white;
    transform: translateY(-1px);
}

.work-pages{
    display: flex;
    align-items: center;
    gap:0.2rem;
         }
/* 滚动动画 */
@keyframes scrollLeft {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 内容展示区 */
.content-section {
    padding: 64px 24px;
    background: white;
}

.content-container {
    max-width: 1152px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    margin-bottom: 40px;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.tabs-container {
    display: flex;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 9999px;
    padding: 4px;
}

.tab-btn {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 9999px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.tab-btn:hover {
    background: #e5e7eb;
}

.tab-btn.active {
    background: #f97316;
    color: white;
}

.tab-btn svg {
    margin-right: 8px;
}

/* 作品网格 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}



.work-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.work-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.work-image {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #fed7aa 0%, #dbeafe 100%);
    position: relative;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-info {
    padding: 0.5rem;
}

.work-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.work-author {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.work-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #6b7280;
}

.work-likes {
    display: flex;
    align-items: center;
    gap: 4px;
}

.work-likes svg {
    width: 16px;
    height: 16px;
}

/* 查看更多按钮 */
.load-more {
    text-align: center;
}

/* 绘本模态框样式 */
.storybook-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.storybook-modal.show {
    opacity: 1;
    visibility: visible;
}

.storybook-container {
    max-width: 87%;
    height: 95%;
    aspect-ratio: 3/2;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.storybook-modal.show .storybook-container {
    transform: scale(1);
}

.storybook-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: rgba(239, 236, 236, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.storybook-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
}

.storybook-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

/* 封面样式 */

.cover-image{
    width: 100%;
    position: relative;
}

.storybook-cover:hover {
    transform: scale(1.02);
}

.storybook-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* 书本页面样式 */
.storybook-page {
    width: 100%;
    height: 100%;
    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.page-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    position: relative;
    cursor: pointer;
}

.page-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    position: relative;
    cursor: pointer;
}


.page-image,
.page-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.page-right h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #333;
    line-height: 1.4;
}

.page-right p {
    margin: 0;
    font-size: 2rem;
    line-height: 1.6;
    color: #555;
}

/* 页码样式 */
.page-number {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* 页面导航提示 */
.storybook-nav-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.storybook-container:hover .storybook-nav-hint {
    opacity: 1;
}

/* 页面结束提示 */
.page-end-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 193, 7, 0.9);
    color: #333;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-end-hint.show {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        /* 移动端高度自适应，避免固定180px导致空间浪费 */
        height: auto;
    }
    
    .search-input {
        padding: 16px;
        /* 输入区在移动端按内容扩展 */
        height: auto;
        min-height: 120px;
    }
    
    .tabs-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.visible {
        transform: translateX(0);
    }
    
    .storybook-container {
        width: 95%;
        height: 95%;
    }
    
    .storybook-content {
        padding: 20px;
    }
    
    .storybook-page {
        flex-direction: column;
    }
    
    .page-right {
        padding: 10rem;
    }
    
    .storybook-cover {
        max-width: 300px;
        max-height: 450px;
    }
    
    /* 修复移动端溢出问题 */
    .hero-section {
        padding: 16px;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        min-width: 0;
    }
    
    .search-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 32px;
        padding: 0;
        min-width: 0;
    }
    
    .examples {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 48px;
        overflow: hidden;
        min-width: 0;
    }
    .examples-scroll {
        white-space: normal;
        flex-wrap: nowrap; /* 保持横向流动，但允许换行时不产生溢出 */
        max-width: 100%;
    }
    .examples {
        overflow: hidden;
    }
}

/* 优先考虑减少动效的用户：禁用滚动与旋转等持续动画 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .examples-scroll {
        animation: none !important;
        transform: none !important;
    }
}

/* 加载动画 */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 绘本卡片菜单样式 */
.picbook-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    width: 20px;
    height: 15px;
}
.menu-trigger{
    border: none;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    width: 20px;
    height: 15px;
}
.menu-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.menu-btn svg {
    width: 12px;
    height: 12px;
    color: #6b7280;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 80px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 20;
    border: 1px solid #e5e7eb;
}

.menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #b70000;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

/* .menu-item:hover {
    background-color: #f3f4f6;
} */

.menu-item.delete {
    color: #ef4444;
}

.menu-item.delete:hover {
    background-color: #fef2f2;
}

.menu-item svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* 删除动画效果 */
.picbook-card.deleting {
    transition: all 0.3s ease;
    transform: scale(0.95);
    opacity: 0.7;
}

@media (max-width: 480px) {
    .hero-section {
        padding: 16px;
    }
    
    .content-section {
        padding: 32px 16px;
    }
    
    .hero-title {
            font-size: 1.75rem;
    }
    
    .login-form-container {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    /* 移动端菜单按钮稍大一些 */
    .menu-btn {
        width: 28px;
        height: 28px;
    }
    
    .menu-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* 收藏按钮样式 */
.work-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.work-favorite:hover {
    background-color: rgba(255, 59, 48, 0.1);
    transform: scale(1.1);
}

.work-favorite svg {
    color: #8e8e93;
    transition: all 0.2s ease;
}

.work-favorite.favorited svg {
    color: #ff3b30;
    fill: #ff3b30;
}

.work-favorite.favorited:hover {
    background-color: rgba(255, 59, 48, 0.15);
}

/* 用户绘本卡片中的状态标签 */


.user-picbook-card .work-status.status-created {
    background-color: #007aff;
    color: white;
}

.user-picbook-card .user-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 122, 255, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 移动端将.search-box高度设为auto；添加prefers-reduced-motion降级；不改变平板网格列数 */
.search-box {
    /* 移动端高度自适应，避免固定180px导致空间浪费 */
    height: auto;
}
.search-input {
    /* 输入区在移动端按内容扩展 */
    height: auto;
    min-height: 120px;
}

/* 登录模态框样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.login-modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1001;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    margin: 0.8rem 0;
}

.close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.close-btn:hover {
    background: white;
    color: #374151;
    transform: scale(1.02);
}

.login-form-container {
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.input-field {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fafafa;
    height: 56px;
    box-sizing: border-box;
}

.input-field:focus {
    outline: none;
    border-color: #f97316;
}

.input-field::placeholder {
    color: #9ca3af;
}

.input-error {
    color: #ef4444;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

/* 验证码输入容器 */
.code-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem;
    transition: border-color 0.2s ease;
    height: 56px;
    box-sizing: border-box;
    background: transparent;
}

.code-input-container:focus-within {
    border-color: #f97316;
}

.code-input {
    flex: 1;
    text-align: center;
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 1.1rem;
    border: none;
    outline: none;
    background: transparent;
    height: 100%;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.resend-btn {
    padding: 0 0.75rem;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 80px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-right: 0;
    flex-shrink: 0;
}


.resend-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.countdown {
    color: #f97316;
    font-weight: 600;
}

/* 提交按钮 */
.submit-btn {
    padding: 1rem;
    background: linear-gradient(135deg,  #ee8349,#f97316);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
    background:linear-gradient(135deg, #ea580c, #f97316);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 绘本卡片菜单样式 */
.picbook-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    width: 20px;
    height: 15px;
}
.menu-trigger{
    border: none;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    width: 20px;
    height: 15px;
}
.menu-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.menu-btn svg {
    width: 12px;
    height: 12px;
    color: #6b7280;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 80px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 20;
    border: 1px solid #e5e7eb;
}

.menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #b70000;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

/* .menu-item:hover {
    background-color: #f3f4f6;
} */

.menu-item.delete {
    color: #ef4444;
}

.menu-item.delete:hover {
    background-color: #fef2f2;
}

.menu-item svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* 删除动画效果 */
.picbook-card.deleting {
    transition: all 0.3s ease;
    transform: scale(0.95);
    opacity: 0.7;
}

@media (max-width: 480px) {
    .hero-section {
        padding: 16px;
    }
    
    .content-section {
        padding: 32px 16px;
    }
    
    .hero-title {
            font-size: 1.75rem;
    }
    
    .login-form-container {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    /* 移动端菜单按钮稍大一些 */
    .menu-btn {
        width: 28px;
        height: 28px;
    }
    
    .menu-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* 收藏按钮样式 */
.work-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.work-favorite:hover {
    background-color: rgba(255, 59, 48, 0.1);
    transform: scale(1.1);
}

.work-favorite svg {
    color: #8e8e93;
    transition: all 0.2s ease;
}

.work-favorite.favorited svg {
    color: #ff3b30;
    fill: #ff3b30;
}

.work-favorite.favorited:hover {
    background-color: rgba(255, 59, 48, 0.15);
}

/* 用户绘本卡片中的状态标签 */
.user-picbook-card .work-status.status-favorited {
    background-color: #ff3b30;
    color: white;
}

.user-picbook-card .work-status.status-created {
    background-color: #007aff;
    color: white;
}

.user-picbook-card .user-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 122, 255, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
