/* 
 * 电子葵花宝典 - 网址导航网站样式表
 * 仿 Windows 资源管理器风格设计
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: #333;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}



body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #eee;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    backdrop-filter: blur(10px);
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #333;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeInDown 0.5s ease-out;
    flex-wrap: wrap;
    gap: 8px;
}

.header.dark-mode {
    background: rgba(30, 30, 46, 0.75);
    color: #eee;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header.dark-mode h1 {
    color: #967151;
}

.header h1 {
    font-size: 1.6rem;
    white-space: nowrap;
    color: #967151;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    font-weight: 600;
}

.header h1:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

/* Logo样式 */
.logo-container {
    display: flex;
    align-items: center;
    gap: 4px; /* 减小间距，实现与标题的无缝融合 */
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 10px;
}

.logo-container:hover {
    background: rgba(150, 113, 81, 0.1);
    transform: scale(1.02);
}

.website-logo {
    height: 40px;
    width: 40px;
    animation: slideInLeft 0.5s ease-out;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin: 0;
    /* 移除边框、阴影和内边距，实现与标题的无缝融合 */
}

.website-logo:hover {
    transform: scale(1.05);
    /* 保持hover效果但不添加分隔元素 */
}

.website-logo.dark-mode {
    border: none;
}

.website-logo.dark-mode:hover {
    /* 保持深色模式下的hover效果 */
}

/* 响应式设计：平板设备 */
@media (max-width: 768px) {
    .website-logo {
        height: 36px;
        width: 36px;
        border-radius: 6px;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
    
    .logo-container {
        gap: 4px;
    }
}

/* 响应式设计：移动设备 */
@media (max-width: 480px) {
    .website-logo {
        height: 32px;
        width: 32px;
        border-radius: 5px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .logo-container {
        gap: 3px;
        padding: 2px 6px;
    }
}

/* 响应式设计：超小屏幕设备 */
@media (max-width: 360px) {
    .website-logo {
        height: 28px;
        width: 28px;
        border-radius: 4px;
    }
    
    .logo-container {
        gap: 3px;
    }
}

.search-box {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    flex: 1;
    min-width: 0;
}

.search-box input {
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    width: 100%;
    min-width: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease-out;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: rgba(0, 120, 215, 0.5);
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.2);
}

.search-box input.dark-mode {
    background: rgba(51, 51, 51, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.search-box input.dark-mode:focus {
    border-color: rgba(0, 120, 215, 0.7);
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.3);
}

/* 统一占位符样式 */
.search-box input::placeholder {
    font-size: 13px;
}

.search-box button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #0078d7;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease-out 0.1s both;
    font-size: 14px;
    white-space: nowrap;
}

.search-box button:hover {
    background: rgba(240, 240, 240, 0.9);
    transform: translateY(-1px);
}

.search-box button:active {
    background: rgba(220, 220, 220, 0.9);
    transform: translateY(0);
}

.search-box button.dark-mode {
    background: rgba(0, 90, 158, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box button.dark-mode:hover {
    background: rgba(0, 70, 120, 0.9);
}

.search-box button.dark-mode:active {
    background: rgba(0, 50, 100, 0.9);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 1.1rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInRight 0.5s ease-out 0.2s both;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    user-select: none;
    outline: none;
    transform: scale(1);
    transition: all 0.3s ease;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(248,239,230,0.8) 0%, rgba(248,239,230,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: rotate(12deg) scale(1.05);
}

.theme-toggle:hover::before {
    opacity: 1;
}

.theme-toggle:active {
    transform: rotate(24deg) scale(0.95);
}

.theme-toggle-clicked {
    animation: themeToggleClick 0.3s ease;
}

@keyframes themeToggleClick {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(0.9) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.theme-toggle.dark-mode {
    background: rgba(40, 40, 60, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-toggle:focus {
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.5);
}

.theme-toggle.dark-mode:focus {
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.7);
}

.theme-toggle.dark-mode:hover {
    background: rgba(50, 50, 70, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.theme-toggle.dark-mode::before {
    background: radial-gradient(circle, rgba(200,200,255,0.2) 0%, rgba(200,200,255,0) 70%);
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 8px;
    animation: fadeIn 0.8s ease-out;
}

/* 侧边栏样式 */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    padding: 8px 0;
    transition: background-color 0.3s, border-color 0.3s;
    margin-right: 8px;
    animation: slideInLeft 0.5s ease-out;
}

.sidebar.dark-mode {
    background: rgba(45, 45, 45, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.folder-tree {
    padding: 0 8px;
}

.tree-node {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.tree-node ul {
    margin-left: 16px;
    display: none;
    transition: all 0.3s ease;
    animation: slideInLeft 0.3s ease-out;
}

.tree-node.expanded > ul {
    display: block;
}

.tree-item {
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 1px 0;
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease-out;
    font-size: 14px;
    min-height: 36px;
}

.tree-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.tree-item:hover.dark-mode {
    background-color: rgba(255, 255, 255, 0.1);
}

.tree-item.selected {
    background-color: rgba(0, 120, 215, 0.2);
    color: #0078d7;
    animation: pulse 1s infinite;
}

.tree-item.selected.dark-mode {
    background-color: rgba(0, 120, 215, 0.3);
    color: #4da6ff;
}

.tree-link-item {
    cursor: pointer;
}

.tree-link-item:hover {
    background-color: rgba(0, 120, 215, 0.1);
    transform: translateX(2px);
}

.tree-link-item:hover.dark-mode {
    background-color: rgba(0, 120, 215, 0.2);
}

.tree-item .icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tree-item .toggle {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.tree-item .toggle:hover {
    transform: scale(1.1);
}

.folder-icon::before {
    content: "📁";
}

.folder-icon[data-expanded="true"]::before {
    content: "📂";
}

.link-icon::before {
    content: "🔗";
}

.tree-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.tree-link:hover {
    text-decoration: underline;
}

/* 内容区域样式 */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInRight 0.5s ease-out;
}

.content-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 8px;
    animation: slideInDown 0.5s ease-out;
}

.content-header.dark-mode {
    background: rgba(61, 61, 61, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    flex-wrap: wrap;
}

.back-button {
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.2s ease;
    animation: slideInLeft 0.3s ease-out;
    white-space: nowrap;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    color: #333;
}

.back-button:hover:not(:disabled) {
    background: linear-gradient(to bottom, #ffffff, #ebebeb);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.back-button:active:not(:disabled) {
    background: linear-gradient(to bottom, #e0e0e0, #f0f0f0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.back-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.back-button.dark-mode {
    background: linear-gradient(to bottom, #4a4a4a, #3a3a3a);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.back-button.dark-mode:hover:not(:disabled) {
    background: linear-gradient(to bottom, #505050, #404040);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.back-button.dark-mode:active:not(:disabled) {
    background: linear-gradient(to bottom, #303030, #404040);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.back-button.back-button-active:not(:disabled) {
    background: linear-gradient(to bottom, #e0e0e0, #f0f0f0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.back-button.dark-mode.back-button-active:not(:disabled) {
    background: linear-gradient(to bottom, #303030, #404040);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.breadcrumb-item {
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 5px;
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease-out;
    font-size: 13px;
    white-space: nowrap;
    min-height: 32px;
    display: flex;
    align-items: center;
}

.breadcrumb-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.breadcrumb-item:hover.dark-mode {
    background-color: rgba(255, 255, 255, 0.1);
}

.breadcrumb-separator {
    color: #999;
    animation: fadeIn 0.3s ease-out;
    font-size: 13px;
}

.breadcrumb-separator.dark-mode {
    color: #aaa;
}

.items-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background-color 0.3s;
    border-radius: 10px;
    animation: fadeIn 0.5s ease-out;
}

/* 虚拟滚动样式 */
.virtual-scroll-container {
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    border-radius: 0;
}

.virtual-scroll-content {
    background: transparent;
}

.virtual-scroll-content .item-row {
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.virtual-scroll-content .item-row:last-child {
    border-bottom: none;
}

.virtual-scroll-content .item-row:hover {
    background: rgba(150, 113, 81, 0.1);
    transform: none;
    box-shadow: none;
}

.dark-mode .virtual-scroll-content .item-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .virtual-scroll-content .item-row:hover {
    background: rgba(150, 113, 81, 0.15);
}

.items-container.dark-mode {
    background: rgba(30, 30, 30, 0.6);
}

.item-row {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: slideInUp 0.4s ease-out;
    min-height: 56px;
}

.item-row:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.item-row:hover.dark-mode {
    background: rgba(45, 45, 45, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.item-row.folder {
    border-left: 3px solid #ffd700;
}

.item-row.link {
    border-left: 3px solid #0078d7;
}

.item-row.dark-mode {
    background: rgba(45, 45, 45, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    animation: bounceIn 0.5s ease-out;
}

.item-favicon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.item-title-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.item-title {
    font-weight: 600;
    font-size: 15px;
    animation: fadeIn 0.3s ease-out;
    word-break: break-word;
}

.item-description {
    font-weight: normal;
    font-size: 13px;
    color: #666;
    animation: fadeIn 0.3s ease-out 0.1s both;
    word-break: break-word;
}

.item-description.dark-mode {
    color: #aaa;
}

.item-url {
    font-size: 12px;
    color: #0078d7;
    animation: fadeIn 0.3s ease-out 0.2s both;
    word-break: break-all;
}

.item-url.dark-mode {
    color: #4da6ff;
}

/* 搜索高亮样式 */
mark {
    background-color: #ffeb3b;
    color: #000;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: bold;
    animation: highlight 1s ease-out;
}

mark.dark-mode {
    background-color: #ffd54f;
    color: #000;
}

/* 动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

@keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    0% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(0.97, 0.97, 0.97);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 120, 215, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 120, 215, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 120, 215, 0);
    }
}

@keyframes highlight {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: #ffeb3b;
        transform: scale(1.1);
    }
    100% {
        background-color: #ffeb3b;
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width:768px) {
    .main-content {
        flex-direction: row;
        padding: 5px;
        height: calc(100% - 60px);
    }
    
    .header {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .header h1 {
        font-size: 1.3rem;
        color: #967151;
    }
    
    .logo-container {
        gap: 4px;
        cursor: pointer;
        padding: 4px 6px;
        border-radius: 8px;
    }
    
    .logo-container:hover {
        background: rgba(150, 113, 81, 0.1);
        transform: scale(1.02);
    }
    
    .website-logo {
        height: 36px;
        width: 36px;
        border-radius: 6px;
    }
    
    .header-controls {
        gap: 5px;
        width: 100%;
    }
    
    .search-box {
        width: 100%;
        padding: 5px 0;
        gap: 5px;
    }
    
    .search-box input {
        width: 100%;
        padding: 8px 10px;
        font-size: 14px;
        min-height: 36px;
    }
    
    .search-box input::placeholder {
        font-size: 12px;
    }
    
    .search-box button {
        padding: 8px 12px;
        font-size: 14px;
        min-height: 36px;
    }
    
    .sidebar {
        width: 50%;
        border-right: 1px solid #ddd;
        border-bottom: none;
        max-height: 100%;
        margin-right: 5px;
        margin-bottom: 0;
        padding: 5px 0;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar.dark-mode {
        border-right: 1px solid #444;
    }
    
    .folder-tree {
        padding: 0 5px;
        overflow-y: auto;
        flex: 1;
    }
    
    .tree-node ul {
        margin-left: 12px;
    }
    
    .tree-item {
        padding: 8px 10px;
        gap: 8px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .content-area {
        width: 50%;
        display: flex;
        flex-direction: column;
    }
    
    .content-header {
        padding: 0 5px;
        gap: 5px;
    }
    
    .breadcrumb {
        gap: 5px;
        padding: 3px 0;
    }
    
    .back-button {
        padding: 6px 10px;
        font-size: 13px;
        min-height: 36px;
        border-radius: 6px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    
    .breadcrumb-item {
        padding: 6px 8px;
        font-size: 13px;
        min-height: 36px;
    }
    
    .breadcrumb-separator {
        font-size: 13px;
    }
    
    .items-container {
        padding: 5px;
        gap: 6px;
        flex: 1;
        overflow-y: auto;
    }
    
    .item-row {
        padding: 12px;
        gap: 12px;
        min-height: 60px;
    }
    
    .item-row:hover {
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }
    
    .item-icon {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
    
    .item-favicon {
        width: 20px;
        height: 20px;
    }
    
    .item-info {
        gap: 4px;
    }
    
    .item-title {
        font-size: 15px;
    }
    
    .item-description {
        font-size: 13px;
    }
    
    .item-url {
        font-size: 12px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .theme-toggle:hover {
        background: rgba(248, 239, 230, 0.95);
    }
    
    .theme-toggle::before {
        background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    }
}

/* 小屏幕设备优化 */
@media (max-width:480px) {
    .header {
        padding: 6px 8px;
        gap: 4px;
    }
    
    .header h1 {
        font-size: 1.2rem;
        color: #967151;
    }
    
    .logo-container {
        gap: 3px;
        cursor: pointer;
        padding: 3px 5px;
        border-radius: 7px;
    }
    
    .logo-container:hover {
        background: rgba(150, 113, 81, 0.1);
        transform: scale(1.02);
    }
    
    .website-logo {
        height: 32px;
        width: 32px;
        border-radius: 5px;
    }
    
    .sidebar {
        max-height: 100%;
    }
    
    .tree-item {
        padding: 6px 8px;
        font-size: 13px;
        min-height: 36px;
    }
    
    .item-row {
        padding: 10px;
        min-height: 56px;
    }
    
    .item-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .item-description {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .item-url {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .back-button {
        padding: 5px 8px;
        font-size: 12px;
        min-height: 32px;
        border-radius: 6px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    
    .breadcrumb-item {
        padding: 4px 6px;
        font-size: 12px;
        min-height: 32px;
    }
    
    .content-header {
    }
    
    .search-box input {
        padding: 6px 8px;
        font-size: 13px;
        min-height: 32px;
    }
    
    .search-box input::placeholder {
        font-size: 11px;
    }
    
    .search-box button {
        padding: 6px 10px;
        font-size: 13px;
        min-height: 32px;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    /* 移动端跑马灯效果 */
    .item-info {
        overflow: hidden;
        position: relative;
    }
    
    .item-title,
    .item-description,
    .item-url {
        position: relative;
        transition: transform 0.3s ease;
        display: block;
        width: 100%;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }
    
    /* 自动滚动类 - 持续滚动效果 */
    .item-title.auto-scroll,
    .item-description.auto-scroll,
    .item-url.auto-scroll {
        animation: marquee-auto 12s linear infinite;
    }
    
    @keyframes marquee-auto {
        0% {
            transform: translateX(100%);
        }
        100% {
            transform: translateX(-100%);
        }
    }
}

/* 超小屏幕设备优化 */
@media (max-width:360px) {
    .header {
        padding: 5px 6px;
        gap: 3px;
    }
    
    .header h1 {
        font-size: 1.1rem;
        color: #967151;
    }
    
    .logo-container {
        gap: 3px;
        cursor: pointer;
        padding: 2px 4px;
        border-radius: 6px;
    }
    
    .logo-container:hover {
        background: rgba(150, 113, 81, 0.1);
        transform: scale(1.02);
    }
    
    .website-logo {
        height: 28px;
        width: 28px;
        border-radius: 4px;
    }
    
    .header-controls {
        gap: 4px;
    }
    
    .search-box {
        gap: 4px;
    }
    
    .search-box input {
        padding: 5px 6px;
        font-size: 12px;
        min-height: 30px;
    }
    
    .search-box input::placeholder {
        font-size: 10px;
    }
    
    .search-box button {
        padding: 5px 8px;
        font-size: 12px;
        min-height: 30px;
    }
    
    .sidebar {
        max-height: 100%;
    }
    
    .tree-item {
        padding: 5px 6px;
        font-size: 12px;
        min-height: 32px;
    }
    
    .item-row {
        padding: 8px;
        min-height: 50px;
    }
    
    .item-title {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .item-description {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .item-url {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .back-button {
        padding: 4px 6px;
        font-size: 11px;
        min-height: 30px;
        border-radius: 6px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    
    .breadcrumb-item {
        padding: 3px 5px;
        font-size: 11px;
        min-height: 30px;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    /* 移动端跑马灯效果 */
    .item-info {
        overflow: hidden;
        position: relative;
    }
    
    .item-title,
    .item-description,
    .item-url {
        position: relative;
        transition: transform 0.3s ease;
        display: block;
        width: 100%;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }
    
    /* 自动滚动类 - 持续滚动效果 */
    .item-title.auto-scroll,
    .item-description.auto-scroll,
    .item-url.auto-scroll {
        animation: marquee-auto 12s linear infinite;
    }
}