/* Custom styles from business-showcase.html */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: linear-gradient(135deg, #e8eaf6 0%, #f5f5f5 100%);
    min-height: 100vh;
    font-family: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 3px; }

/* Sidebar scrollbar */
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 2px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }

/* Sidebar Gradient */
.sidebar-gradient {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #6B73FF 100%);
}

/* Sidebar Navigation Enhancement */
aside h2 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.05em;
}
aside nav a {
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
aside nav a:hover {
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Custom Select */
.custom-select {
    appearance: none;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    padding: 14px 40px 14px 16px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}
.custom-select:hover {
    background-color: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}
.custom-select:focus {
    outline: none;
    background-color: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
}
.custom-select option {
    background: #667eea;
    color: white;
    padding: 10px;
}

/* 3D Book Card */
.book-container { 
    perspective: 1000px; 
    cursor: pointer;
}
.book {
    transform-style: preserve-3d;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    width: 100%;
    aspect-ratio: var(--card-ratio, 1/1);
}
.book:hover {
    transform: rotateY(-20deg) rotateX(5deg) scale(1.03);
}
.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 100%;
    transform: rotateY(-90deg) translateX(-12.5px);
    transform-origin: right;
    border-radius: 4px 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.book-spine span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.book-cover {
    position: absolute;
    inset: 0;
    border-radius: 0 12px 12px 0;
    overflow: hidden;
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.4);
    transition: box-shadow 0.5s ease;
}
.book:hover .book-cover {
    box-shadow: 0 30px 50px -12px rgba(0,0,0,0.5), 0 0 30px rgba(102,126,234,0.3);
}
.book-pages {
    position: absolute;
    top: 3px;
    right: 0;
    bottom: 3px;
    width: 8px;
    background: repeating-linear-gradient(to bottom, #f5f5f5 0px, #e5e5e5 1px, #f5f5f5 2px);
    transform: translateX(2px);
    border-radius: 0 2px 2px 0;
}
.shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.book:hover .shine { transform: translateX(100%); }

/* Glow effect */
.glow-effect {
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}
.book:hover .glow-effect { opacity: 1; }

/* Info Card */
.info-card {
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.info-card .icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 950px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 20px;
    background: white;
}
.modal-content.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

/* Button styles */
.btn-outline {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-outline:hover { border-color: #667eea; color: #667eea; }
.btn-primary {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-primary:hover { box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-card { animation: fadeInUp 0.5s ease forwards; }

/* Custom writing mode for book spine */
.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.icon-display {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif !important;
}

/* ==================== 移动端适配 ==================== */

/* 移动端汉堡菜单按钮 */
.mobile-menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}
.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 移动端遮罩层 */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    /* 显示汉堡菜单按钮 */
    .mobile-menu-btn {
        display: flex;
        position: fixed;
        top: 16px;
        left: 16px;
    }
    
    /* 侧边栏移动端样式 */
    aside {
        position: fixed;
        left: -220px;
        top: 0;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 0 0 30px rgba(0,0,0,0.3);
    }
    aside.active {
        left: 0;
    }
    
    /* 主内容区域 */
    main {
        margin-left: 0 !important;
        padding: 16px !important;
    }
    
    /* 顶部 - 简化 */
    header {
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 16px !important;
        min-height: auto;
    }
    
    /* 项目卡片网格 */
    #projectGrid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* 3D书本卡片移动端优化 */
    .book {
        height: 280px;
    }
    .book:hover {
        transform: rotateY(-15deg) rotateX(3deg) scale(1.02);
    }
    .book-cover {
        font-size: 14px;
    }
    .book-cover h3 {
        font-size: 18px;
    }
    .book-cover .text-6xl {
        font-size: 3rem;
    }
    
    /* 分页按钮 */
    .flex.justify-center.items-center {
        flex-wrap: wrap;
        padding: 0 8px;
    }
    .flex.justify-center.items-center a,
    .flex.justify-center.items-center span {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* 模态框移动端优化 */
    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 16px;
    }
    .modal-content .p-8 {
        padding: 20px !important;
    }
    .modal-content h2 {
        font-size: 22px;
    }
    .modal-content .text-xl {
        font-size: 16px;
    }
    
    /* 锁定界面移动端优化 */
    .col-span-full {
        padding: 40px 20px !important;
    }
    .col-span-full h3 {
        font-size: 20px;
    }
    .col-span-full .flex.gap-4 {
        flex-direction: column;
        width: 100%;
    }
    .col-span-full .flex.gap-4 a {
        width: 100%;
        text-align: center;
    }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    aside {
        width: 220px;
    }
    main {
        margin-left: 220px !important;
        padding: 24px;
    }
    #projectGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .mobile-menu-btn {
        width: 45px;
        height: 45px;
        top: 14px;
        left: 12px;
        position: fixed;
    }
    
    main {
        padding: 12px !important;
    }
    
    header {
        padding: 14px 12px 12px 12px !important;
        min-height: auto;
        padding-left: 70px !important;
    }
    
    .book {
        height: 260px;
    }
    
    .book-spine {
        width: 20px;
    }
    
    .book-spine span {
        font-size: 10px;
    }
    
    /* 小屏幕侧边栏字体调整 */
    aside h2 {
        font-size: 1.125rem !important;
    }
    aside nav a span.text-base,
    aside nav div span.text-base {
        font-size: 0.9375rem !important;
    }
    aside nav a span.text-lg {
        font-size: 1rem !important;
    }
}
