/* xxxMac Styles - 全新白橙配色方案 */

:root {
    /* 主色调 - 橙色系 */
    --primary-orange: #FF6B35;
    --primary-orange-light: #FF8C42;
    --primary-orange-dark: #E65100;
    --accent-orange: #FFA500;

    /* 背景色 - 白色系 */
    --bg-white: #FFFFFF;
    --bg-gray-50: #F8F9FA;
    --bg-gray-100: #F5F5F5;
    --bg-gray-200: #EEEEEE;

    /* 文字颜色 */
    --text-dark: #1F2937;
    --text-gray: #374151;
    --text-light: #6B7280;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-orange: 0 10px 30px -5px rgba(255, 107, 53, 0.3);
}

html {
    scroll-behavior: smooth;
}

html,
body {
    overscroll-behavior: none;
    overscroll-behavior-y: none;
}

body {
    background: var(--bg-white);
    color: var(--text-dark);
    overflow-x: hidden;
    min-height: 100vh;
}

/* 导航链接状态修复 */
.nav-link {
    color: #374151 !important;
    /* text-gray-700 */
}

.nav-link:visited {
    color: #374151 !important;
    /* 保持灰色，不变紫色 */
}

.nav-link:hover {
    color: var(--primary-orange) !important;
    background-color: rgba(255, 107, 53, 0.1) !important;
}

.nav-link:active,
.nav-link:focus {
    color: var(--primary-orange) !important;
    background-color: rgba(255, 107, 53, 0.1) !important;
    outline: none;
}

.nav-link.active {
    color: var(--primary-orange) !important;
    background-color: rgba(255, 107, 53, 0.1) !important;
    font-weight: 600;
}

/* 防止所有链接访问后变色 */
a:visited {
    color: inherit;
}

a:active {
    color: inherit;
}

/* TB5 服务选中状态样式 */
#addon-tb5-checkbox:checked~div .tb5-indicator {
    background-color: #ea580c !important;
    border-color: #ea580c !important;
}

#addon-tb5-checkbox:checked~div .tb5-check {
    color: white !important;
}

#addon-tb5-checkbox:checked~div .animate-pulse {
    display: inline-block !important;
}

/* 现代白色卡片 */
.glass-panel {
    background: var(--bg-white);
    border: 1px solid var(--bg-gray-200);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* 橙色渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   苹果风格滚动动画效果
   ======================================== */

/* 滚动动画初始状态 */
.scroll-animate {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 滚动动画激活状态 */
.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* 延迟动画 */
.scroll-animate-delay-1 {
    transition-delay: 0.1s;
}

.scroll-animate-delay-2 {
    transition-delay: 0.2s;
}

.scroll-animate-delay-3 {
    transition-delay: 0.3s;
}

.scroll-animate-delay-4 {
    transition-delay: 0.4s;
}

/* 从左侧滑入 */
.scroll-slide-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* 从右侧滑入 */
.scroll-slide-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-slide-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* 缩放淡入 */
.scroll-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
}

.hidden-page {
    display: none;
}

.active-page {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 现代滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-orange-light);
    border-radius: 5px;
    border: 2px solid var(--bg-gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}

/* 步骤条连接线 */
.step-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-orange), transparent);
    z-index: -1;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .step-connector::after {
        display: none;
    }
}





/* 橙色渐变背景 */
.gradient-orange-bg {
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-orange));
}

/* 悬停提升效果 */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}



/* 渐变动画按钮 */
.btn-gradient-animate {
    background-size: 200% auto;
    background-image: linear-gradient(to right, var(--primary-orange) 0%, var(--accent-orange) 51%, var(--primary-orange) 100%);
    transition: 0.5s;
}

.btn-gradient-animate:hover {
    background-position: right center;
}

/* 额外的阴影层级 */
.shadow-3xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}













/* 模态框淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.2s ease-out;
}

/* 隐藏滚动条但保持滚动功能 */
.hide-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* 账单卡片动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.invoice-card-animate {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.invoice-card-animate:nth-child(1) {
    animation-delay: 0.05s;
}

.invoice-card-animate:nth-child(2) {
    animation-delay: 0.1s;
}

.invoice-card-animate:nth-child(3) {
    animation-delay: 0.15s;
}

.invoice-card-animate:nth-child(4) {
    animation-delay: 0.2s;
}

.invoice-card-animate:nth-child(5) {
    animation-delay: 0.25s;
}

.invoice-card-animate:nth-child(6) {
    animation-delay: 0.3s;
}

/* 支付按钮脉冲动画 */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(147, 51, 234, 0);
    }
}

.btn-pulse {
    animation: pulse-glow 2s infinite;
}

/* 状态点动画 */
@keyframes status-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.status-dot-animate {
    animation: status-pulse 2s ease-in-out infinite;
}



/* 聊天消息淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

/* 弹窗缩放淡入动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-modal {
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 金属渐变文字 */
.text-metallic {
    background: linear-gradient(180deg, #9CA3AF 0%, #374151 50%, #1F2937 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ========================================
   3D & Complex Animations Additions
   ======================================== */

/* Perspective & 3D Transform Utilities */
.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.translate-z-0 {
    transform: translateZ(0px);
}

.translate-z-10 {
    transform: translateZ(30px);
    /* Increased for meaningful depth */
}

/* Custom Rotations */
.rotate-y-12 {
    transform: rotateY(12deg);
}

.rotate-x-6 {
    transform: rotateX(6deg);
}

/* Enhanced hover group overrides */
.group:hover .group-hover\:rotate-y-12 {
    transform: rotateY(-10deg) rotateX(5deg);
}

.group:hover .group-hover\:translate-z-10 {
    transform: translateZ(50px) translateY(-10px);
}

/* Blob Animation for Background */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Parallax Container Smoothness */
.parallax-container {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ========================================
   拟态 3D 立体按钮样式
   ======================================== */

.btn-3d {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    border-radius: 0.75rem;
    /* rounded-xl */
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    outline: none;
    /* 3D Depth Shadow + Top Highlight (Inset) */
    box-shadow: 0 4px 0 var(--btn-shadow, #9ca3af),
        0 8px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: translateY(0);
}

.btn-3d:active {
    transform: translateY(4px);
    /* Remove depth shadow, keep inner shadow for sunk effect */
    box-shadow: 0 0 0 var(--btn-shadow, #9ca3af),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* VNC / Remote Button (Purple) */
.btn-3d-primary {
    background: linear-gradient(to bottom, #a78bfa, #7c3aed);
    /* violet-400 to violet-600 */
    --btn-shadow: #5b21b6;
    /* violet-800 */
}

.btn-3d-primary:hover {
    background: linear-gradient(to bottom, #8b5cf6, #6d28d9);
    filter: brightness(110%);
}

/* Power On (Green) */
.btn-3d-success {
    background: linear-gradient(to bottom, #4ade80, #16a34a);
    /* green-400 to green-600 */
    --btn-shadow: #14532d;
    /* green-900 */
}

.btn-3d-success:hover {
    background: linear-gradient(to bottom, #22c55e, #15803d);
    filter: brightness(110%);
}

/* Restart (Blue) */
.btn-3d-info {
    background: linear-gradient(to bottom, #60a5fa, #2563eb);
    /* blue-400 to blue-600 */
    --btn-shadow: #1e3a8a;
    /* blue-900 */
}

.btn-3d-info:hover {
    background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
    filter: brightness(110%);
}

/* Power Off (Red) */
.btn-3d-danger {
    background: linear-gradient(to bottom, #f87171, #dc2626);
    /* red-400 to red-600 */
    --btn-shadow: #7f1d1d;
    /* red-900 */
}

.btn-3d-danger:hover {
    background: linear-gradient(to bottom, #ef4444, #b91c1c);
    filter: brightness(110%);
}

/* Button Group Container Adjustments */
.btn-3d-group {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding-bottom: 4px;
    /* Space for the shadow movement */
}

/* ========================================
   Mac 盒子拟态卡片样式 (实例列表)
   ======================================== */
.mac-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    /* 极简白/灰渐变 */
    border: 1px solid #e5e7eb;
    border-bottom: 4px solid #d1d5db;
    /* 增加底部厚度感 */
    border-radius: 1.25rem;
    /* 大圆角 */
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    /* 顶部高光 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    isolation: isolate;
}

.mac-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: #d1d5db;
    border-bottom-color: #9ca3af;
}

/* 选中状态 - 橙色光晕主题 */
.mac-card.active {
    background: linear-gradient(180deg, #fffbf7 0%, #fff7ed 100%);
    /* 极淡的暖色背景 */
    border-color: #fdba74;
    /* orange-300 */
    border-bottom-color: #ea580c;
    /* orange-600 */
    box-shadow:
        0 0 0 2px #fff,
        /* 隔离白圈 */
        0 0 0 4px #f97316,
        /* 橙色外环 */
        0 20px 25px -5px rgba(249, 115, 22, 0.15),
        0 8px 10px -6px rgba(249, 115, 22, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-4px);
    z-index: 10;
}

/* 选中时的图标容器 */
.mac-card.active .mac-icon-box {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #ea580c;
}

/* ========================================
   拟态发票/收据样式 (快捷操作)
   ======================================== */
.receipt-paper {
    position: relative;
    background: #ffffff;
    width: 100%;
    border-radius: 0.5rem 0.5rem 0 0;
    /* Top rounded only */
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', Courier, monospace;
    /* 模拟打印机字体 */
    color: #374151;
    overflow: visible;
    /* Allow jagged edge to show */
    transform: rotate(-1deg);
    /* Slight natural rotation */
    transition: transform 0.3s ease;
}

.receipt-paper:hover {
    transform: rotate(0deg) translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
}

/* 顶部装饰条 */
.receipt-header-strip {
    height: 8px;
    background: repeating-linear-gradient(45deg,
            #ef4444,
            #ef4444 10px,
            #ffffff 10px,
            #ffffff 20px,
            #3b82f6 20px,
            #3b82f6 30px,
            #ffffff 30px,
            #ffffff 40px);
    border-radius: 0.5rem 0.5rem 0 0;
    opacity: 0.8;
}

/* 锯齿底部 */
.receipt-paper::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 10px;
    background-image: linear-gradient(135deg, white 50%, transparent 50%), linear-gradient(225deg, white 50%, transparent 50%);
    background-position: 0 0;
    background-size: 20px 20px;
    background-repeat: repeat-x;
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1));
    /* 让锯齿也有阴影 */
    z-index: 1;
}

/* 发票行项目 */
.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-bottom: 2px dashed #e5e7eb;
    transition: all 0.2s;
    position: relative;
}

.receipt-row:hover {
    background-color: #fff7ed;
    /* orange-50 */
}

/* 最后一行去掉虚线 */
.receipt-footer-row {
    border-bottom: none;
    padding-bottom: 1.5rem;
}

/* 模拟墨水效果 */
.receipt-ink {
    color: #1f2937;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.receipt-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

/* 条形码装饰 */
.barcode-strip {
    height: 30px;
    width: 80%;
    margin: 0 auto;
    background-image: linear-gradient(90deg,
            #000 0%, #000 4%,
            transparent 4%, transparent 6%,
            #000 6%, #000 12%,
            transparent 12%, transparent 14%,
            #000 14%, #000 20%,
            transparent 20%, transparent 24%,
            #000 24%, #000 26%,
            transparent 26%, transparent 30%,
            #000 30%, #000 36%,
            transparent 36%, transparent 40%,
            #000 40%, #000 46%,
            transparent 46%, transparent 50%,
            #000 50%, #000 52%,
            transparent 52%, transparent 56%,
            #000 56%, #000 64%,
            transparent 64%, transparent 68%,
            #000 68%, #000 72%,
            transparent 72%, transparent 76%,
            #000 76%, #000 82%,
            transparent 82%, transparent 86%,
            #000 86%, #000 90%,
            transparent 90%, transparent 94%,
            #000 94%, #000 100%);
    opacity: 0.7;
}

/* 图钉装饰 */
.push-pin {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 30% 30%, #4b5563, #1f2937);
    /* metallic dark gray head */
    border-radius: 50%;
    box-shadow:
        2px 4px 6px rgba(0, 0, 0, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.5),
        inset 2px 2px 4px rgba(255, 255, 255, 0.4);
    position: absolute;
    z-index: 20;
}

.push-pin::after {
    /* Pin highlight */
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    filter: blur(1px);
}

/* ========================================
   拟物化组件：名片与信封
   ======================================== */

/* 1. 商务名片 (Business Card) */
.business-card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        /* Subtle base shadow */
        0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
}

.business-card::before {
    /* 纸张纹理 */
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3h1v1H1V3zm2-2h1v1H3V1z' fill='%23000000' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.business-card:hover {
    transform: translateY(-4px) rotateX(2deg) rotateY(-2deg);
    box-shadow:
        5px 15px 25px rgba(0, 0, 0, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
}

/* 2. 航空信封 (Air Mail Envelope) */
.air-mail-envelope {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    /* Purple/Indigo base */
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 航空条纹边框 */
.air-mail-stripes {
    position: absolute;
    inset: 0;
    border: 6px solid transparent;
    border-image: repeating-linear-gradient(-45deg,
            #ef4444 0,
            #ef4444 10px,
            transparent 10px,
            transparent 20px,
            #3b82f6 20px,
            #3b82f6 30px,
            transparent 30px,
            transparent 40px) 10;
    opacity: 0.6;
    pointer-events: none;
}

/* 三角形信封盖 */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    clip-path: polygon(0 0, 100% 0, 50% 45%);
    z-index: 10;
}

.air-mail-envelope:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 10px 20px -2px rgba(124, 58, 237, 0.4);
}

.air-mail-envelope:hover .fa-envelope {
    animation: bounce-slight 0.5s ease infinite alternate;
}

@keyframes bounce-slight {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-4px);
    }
}

/* ========================================
   拟物化组件：文件夹弹窗与索引卡片
   ======================================== */

/* 1. 文件夹弹窗 (Folder Modal) */
.folder-modal {
    background: #fcf8ec;
    /* 浅米色/马尼拉纸色 */
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4),
        0 0 0 1px rgba(210, 190, 160, 0.3);
    /* 边框 */
    position: relative;
    overflow: visible;
}

/* 文件夹标签页 */
.folder-tab {
    position: absolute;
    top: -44px;
    left: 0;
    height: 44px;
    padding: 0 2rem;
    background: #fcf8ec;
    border-radius: 0.75rem 0.75rem 0 0;
    display: flex;
    align-items: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 -2px 4px rgba(0, 0, 0, 0.02);
    z-index: 10;
}

/* 文件夹标签页的光影修饰 */
.folder-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: #fcf8ec;
    /* 遮挡接缝 */
    z-index: 20;
}

/* 文件夹内容区域纹理 */
.folder-content-texture {
    background-image:
        linear-gradient(#e5e7eb 1px, transparent 1px),
        linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: #fdfdfd;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* 2. 索引卡片 (Index Card Ticket) */
.ticket-index-card {
    background: #ffffff;
    border-radius: 2px;
    padding: 1.25rem;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    /* 轻微阴影 */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #e5e7eb;
    font-family: 'Courier New', Courier, monospace;
    /* 打字机字体 */
}

/* 顶部红色高亮线 (索引卡特征) */
.ticket-index-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ef4444;
    /* red-500 */
    opacity: 0.8;
}

.ticket-index-card:hover {
    transform: translateY(-4px) rotate(0.5deg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border-color: #d1d5db;
}

/* 状态公章 (Rubber Stamp) */
.status-stamp {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 2px solid currentColor;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    transform: rotate(-8deg);
    /* 倾斜 */
    mix-blend-mode: multiply;
    /* 正片叠底模拟印泥 */
    mask-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3Crect width='100%25' height='100%25' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3Crect width='100%25' height='100%25' fill='black'/%3E%3C/svg%3E");
    mask-composite: exclude;
}

/* 纸张纹理背景 */
.paper-texture {
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ========================================
   拟物化组件：信纸风格详情页 (Letter Style)
   ======================================== */

.letter-modal {
    background: #fdfbf7;
    /* Cream paper */
    background-image: linear-gradient(#fdfbf7 0%, #fdfbf7 100%);
    /* Solid base */
    position: relative;
    box-shadow:
        0 0 0 1px #e5e5e5,
        0 20px 50px -10px rgba(0, 0, 0, 0.2);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    border-radius: 4px;
}

/* 顶部信头 */
.letter-header {
    background: #fdfbf7;
    padding: 2rem 3rem 1rem 3rem;
    border-bottom: 2px solid #333;
    position: relative;
    z-index: 10;
}

/* ... existing styles ... */

/* ========================================
   高级交互动画 (Advanced Interactions)
   ======================================== */

/* 1. 聚光灯卡片效果 (Spotlight Effect) */
.spotlight-group {
    /* Container for spotlight cards if needed, enables group isolation */
    isolation: isolate;
}

.spotlight-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    /* Fallback */
}

/* 光照层 */
.spotlight-card::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 107, 53, 0.06),
            transparent 40%);
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 2;
}

.spotlight-card:hover::after {
    opacity: 1;
}

/* 边框高亮层 (需要父容器支持或伪元素) */
.spotlight-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 1;
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 107, 53, 0.3),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: inherit;
    /* 遮罩，只显示边框 */
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.spotlight-card:hover::before {
    opacity: 1;
}

/* 2. 磁力按钮 (Magnetic Button) */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
    will-change: transform;
}

/* 3. 本地流光文字 (Flowing Gradient Text) */
.gradient-text-flow {
    background: linear-gradient(to right,
            var(--primary-orange) 20%,
            var(--accent-orange) 40%,
            var(--accent-orange) 60%,
            var(--primary-orange) 80%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}



/* 5. 悬浮微动 (Micro Float) */
.hover-float-micro {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-float-micro:hover {
    transform: translateY(-4px) scale(1.02);
}


/* ========================================
   拟物化组件：银色金属风格 (Silver Box Style)
   用于认证、密码等系统级弹窗
   ======================================== */

.silver-box-modal {
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 50%, #e0e0e0 100%);
    border-radius: 20px;
    box-shadow:
        0 20px 50px -12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

/* 金属拉丝质感头部 */
.silver-header {
    background: linear-gradient(to bottom, #f0f0f0, #dcdcdc);
    border-bottom: 1px solid #c0c0c0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 10;
}

.silver-header h3 {
    color: #333;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* 内嵌式输入框 */
.silver-input {
    background: #f2f2f2;
    border: 1px solid #c8c8c8;
    border-radius: 8px;
    box-shadow:
        inset 1px 2px 4px rgba(0, 0, 0, 0.08),
        inset -1px -1px 0 rgba(255, 255, 255, 0.8);
    color: #333;
    transition: all 0.2s;
}

.silver-input:focus {
    background: #ffffff;
    border-color: #999;
    box-shadow:
        inset 1px 2px 4px rgba(0, 0, 0, 0.05),
        0 0 0 2px rgba(0, 0, 0, 0.05);
    outline: none;
}

/* 玻璃质感 Logo 容器 */
.silver-logo-box {
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    border-radius: 16px;
    box-shadow:
        5px 5px 10px rgba(0, 0, 0, 0.1),
        -5px -5px 10px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* 雕刻文字效果 */
.engraved-text {
    color: rgba(0, 0, 0, 0.6);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7);
}

.letter-header::after {
    /* 双底线效果 */
    content: '';
    position: absolute;
    bottom: 2px;
    left: 3rem;
    right: 3rem;
    height: 1px;
    background: #333;
}

.letter-meta-row {
    display: flex;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.letter-label {
    width: 80px;
    font-weight: bold;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* 信纸主体 (带横线) */
.letter-body {
    background-color: #fdfbf7;
    background-image: linear-gradient(#f0f0f0 1px, transparent 1px);
    /* Slightly lighter lines */
    background-size: 100% 2rem;
    /* 行高 32px */
    padding: 0 3rem;
    min-height: 200px;
    /* Reduced min-height for flexibility */
}

/* 消息段落 */
.letter-message {
    padding: 1rem 0 1rem 3.5rem;
    /* Add left padding for stamp */
    line-height: 2rem;
    /* 对齐横线 */
    position: relative;
    margin-bottom: 1rem;
}

.letter-message p {
    margin: 0;
    font-size: 1rem;
    color: #1f2937;
    word-break: break-word;
    /* Prevent overflow */
}

/* 发件人印章/标记 */
.sender-mark {
    position: absolute;
    top: 0.8rem;
    /* Align with first line visually */
    left: 0;
    font-size: 0.7rem;
    font-weight: 800;
    transform: rotate(-12deg);
    padding: 2px 6px;
    border: 2px solid currentColor;
    border-radius: 4px;
    background: rgba(253, 251, 247, 0.9);
    /* Match paper bg */
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 5;
    text-align: center;
    min-width: 40px;
}

.sender-mark.admin {
    color: #d946ef;
    border-color: #d946ef;
}

.sender-mark.me {
    color: #3b82f6;
    border-color: #3b82f6;
}

/* 底部回复区 */
.letter-footer {
    background: #fdfbf7;
    padding: 1.5rem 3rem;
    border-top: 2px solid #333;
    /* Stronger separation */
    position: relative;
    z-index: 10;
}

/* Base styles remain, adding responsive adjustments */
@media (max-width: 640px) {
    .letter-header {
        padding: 1.5rem 1rem 1rem 1rem;
    }

    .letter-header::after {
        left: 1rem;
        right: 1rem;
    }

    .letter-body {
        padding: 0 1rem;
    }

    .letter-footer {
        padding: 1rem 1rem;
    }

    .letter-message {
        padding-left: 0;
        /* Stack on mobile */
        padding-top: 2.5rem;
        /* Make space for stamp on top */
    }

    .sender-mark {
        left: 0;
        top: 0.5rem;
        transform: rotate(-5deg);
    }
}

/* 纸张纹理叠加 */
.paper-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 50;
    mix-blend-mode: multiply;
}

/* 输入框样式 */
.typewriter-input {
    width: 100%;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    line-height: 2rem;
    background-image: linear-gradient(#ccc 1px, transparent 1px);
    background-size: 100% 2rem;
    background-position: 0 2rem;
    /* Align lines */
    resize: none;
    outline: none;
}

.typewriter-input:focus {
    background-image: linear-gradient(#9ca3af 1px, transparent 1px);
}

/* 自定义滚动条 for letter body */
.letter-scroll::-webkit-scrollbar {
    width: 6px;
}

.letter-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

/* ========================================
   Floating CTA Widget
   ======================================== */
.floating-cta {
    animation: float 4s ease-in-out infinite;
    z-index: 9999;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.02); }
    100% { transform: translateY(0px) scale(1); }
}

.glow-effect {
    position: absolute;
    inset: -4px;
    background: linear-gradient(45deg, #fb923c, #ea580c, #f43f5e, #fb923c);
    background-size: 400%;
    z-index: -1;
    filter: blur(8px);
    animation: glowing 20s linear infinite;
    border-radius: 9999px;
    opacity: 0.6;
}

@keyframes glowing {
