/* 全局变量定义 */
:root {
    /* 明亮主题配色 */
    --color-bg-main: #F5F2E9;
    --color-bg-dark: #FEFBF6;
    --color-bg-calc: #FFFFFF;
    --color-border-main: #8B6B3D;
    --color-text-main: #634726;
    --color-text-secondary: #8B7355;
    --color-btn-bg: #F5F2E9;
    --color-btn-border: #D4C4A7;
    --color-icon-bg: #4A4166;
    --color-level-text: #FFB648;
    --color-folder-header: #8B6B3D;
    --color-completed: #8B8B8B;
    --color-primary: #8B6B3D;
    --color-secondary: #C9A86A;
    --color-accent: #E7D7B1;
    --color-bg-light: #F0E6D2;
    --color-card-bg: #FFFFFF;
    --color-card-shadow: rgba(0, 0, 0, 0.1);
    --color-card-hover: rgba(139, 107, 61, 0.05);
}

/* 夜间模式配色 */
[data-theme="dark"] {
    --color-bg-main: #181411;
    --color-bg-dark: #181411;
    --color-bg-calc: #2A2320;
    --color-border-main: #C9A86A;
    --color-text-main: #F5ECD7;
    --color-text-secondary: #C9A86A;
    --color-btn-bg: #3A322C;
    --color-btn-border: #C9A86A;
    --color-icon-bg: #4A4166;
    --color-level-text: #FFB648;
    --color-folder-header: #C9A86A;
    --color-completed: #8B8B8B;
    --color-primary: #2A2320;
    --color-secondary: #C9A86A;
    --color-accent: #E7D7B1;
    --color-bg-light: #2A2320;
    --color-card-bg: #2A2320;
    --color-card-shadow: rgba(0, 0, 0, 0.3);
    --color-card-hover: rgba(201, 168, 106, 0.1);
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: 
        background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--color-bg-main);
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 顶部导航栏 */
.header {
    background: var(--color-bg-main);
    border-bottom: 1px solid var(--color-border-main);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-secondary);
}

.logo-icon {
    width: 24px;
    height: 24px;
}

.logo span {
    color: var(--color-text-main);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 时间显示框 */
.local-time-box {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-border-main);
    border-radius: 10px;
    padding: 6px 10px;
    background: var(--color-bg-light);
}

.time-row {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.time-row .time-label {
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
    color: var(--color-secondary);
}

.time-row .time-value {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-text-main);
    font-family: 'Noto Sans SC', sans-serif;
}

/* 主题切换按钮 */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--color-secondary);
    color: var(--color-bg-main);
    transform: scale(1.05) rotate(15deg);
    box-shadow: 0 4px 16px rgba(201, 168, 106, 0.3);
}

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

.theme-toggle i {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 设置按钮样式 */
.settings-button {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.settings-button:hover {
    background: var(--color-secondary);
    color: var(--color-bg-main);
    transform: scale(1.05) rotate(15deg);
    box-shadow: 0 4px 16px rgba(201, 168, 106, 0.3);
}

.settings-button:active {
    transform: scale(0.95) rotate(-15deg);
}

.settings-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
}

.settings-button:hover .settings-icon {
    filter: brightness(1.1) saturate(1.2) invert(1);
}

/* 主要内容区域 */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 140px);
}

/* 主布局容器 */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* 工具区域 */
.tools-section {
    min-width: 0; /* 防止网格溢出 */
}

/* 欢迎区域 */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 0px 0;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-level-text));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* 工具卡片网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 倒计时面板 */
.countdown-panel {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border-main);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--color-card-shadow);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    transition: all 0.3s ease;
    /* 隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 折叠状态的面板 */
.countdown-panel.collapsed-panel {
    padding: 0 16px;
    max-height: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

/* 隐藏Webkit浏览器的滚动条 */
.countdown-panel::-webkit-scrollbar {
    display: none;
}

.countdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-main);
    transition: all 0.3s ease;
}

/* 折叠状态下的标题 */
.countdown-panel.collapsed-panel .countdown-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.countdown-header h3 {
    color: var(--color-text-main);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    line-height: 1;
}

/* 折叠状态下的标题文字 */
.countdown-panel.collapsed-panel .countdown-header h3 {
    font-size: 1rem;
    line-height: 1;
    margin: 0;
}

/* 移动端标题可点击样式 */
@media (max-width: 768px) {
    #countdownTitle {
        cursor: pointer;
        user-select: none;
    }
    
    #countdownTitle:hover {
        color: var(--color-secondary);
    }
    
    /* 移动端按钮：折叠状态下隐藏，展开状态下显示 */
    .countdown-panel.collapsed-panel .countdown-buttons {
        display: none !important;
    }
    
    .countdown-panel:not(.collapsed-panel) .countdown-buttons {
        display: flex !important;
    }
}

.countdown-header h3 i {
    color: var(--color-primary);
}

/* 倒计时按钮容器 */
.countdown-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 闹钟按钮样式 */
.alarm-button {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* 文件夹按钮样式 */
.folder-button {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.alarm-button:hover {
    background: var(--color-secondary);
    transform: scale(1.05) rotate(15deg);
    box-shadow: 0 4px 16px rgba(201, 168, 106, 0.3);
}

.alarm-button:active {
    transform: scale(0.95) rotate(-15deg);
}

.alarm-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
}

.alarm-button:hover .alarm-icon {
    filter: brightness(1.1) saturate(1.2) invert(1);
}

.folder-button:hover {
    background: var(--color-secondary);
    transform: scale(1.05) rotate(15deg);
    box-shadow: 0 4px 16px rgba(201, 168, 106, 0.3);
}

.folder-button:active {
    transform: scale(0.95) rotate(-15deg);
}

.folder-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
}

.folder-button:hover .folder-icon {
    filter: brightness(1.1) saturate(1.2) invert(1);
}

/* 文件夹浮窗样式 */
.folder-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.folder-popup.show {
    display: flex;
    opacity: 1;
}

.folder-popup-content {
    background: var(--color-card-bg);
    border: 2px solid var(--color-border-main);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    max-width: 360px;
    width: 90%;
    max-height: 70vh;
    overflow: hidden;
    position: relative;
    margin: auto;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.folder-popup.show .folder-popup-content {
    transform: scale(1) translateY(0);
}

.folder-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 2px solid var(--color-border-main);
    background: var(--color-bg-light);
    position: relative;
}

.folder-popup-header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.folder-popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-level-text));
}

.folder-popup-header h4 {
    margin: 0;
    color: var(--color-text-main);
    font-size: 1.1rem;
    font-weight: 600;
}

.folder-popup-close {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.folder-popup-close:hover {
    background: var(--color-secondary);
    color: var(--color-bg-main);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(201, 168, 106, 0.3);
}

.folder-save-button {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.folder-save-button:hover {
    background: var(--color-secondary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(201, 168, 106, 0.3);
}

.folder-save-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
}

.folder-save-button:hover .folder-save-icon {
    filter: brightness(1.1) saturate(1.2) invert(1);
}

.folder-popup-body {
    padding: 24px 20px;
    color: var(--color-text-main);
    line-height: 1.6;
    text-align: center;
    background: var(--color-card-bg);
}

.folder-popup-body p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    opacity: 0.8;
}

/* 收藏记录列表样式 */
.collection-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-main) transparent;
}

.collection-list::-webkit-scrollbar {
    width: 6px;
}

.collection-list::-webkit-scrollbar-track {
    background: transparent;
}

.collection-list::-webkit-scrollbar-thumb {
    background: var(--color-border-main);
    border-radius: 3px;
}

.collection-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-secondary);
}

.collection-empty p {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
}

.collection-empty-hint {
    font-size: 0.8rem !important;
    opacity: 0.6 !important;
}

.collection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-main);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.collection-item:hover {
    background: var(--color-card-hover);
    border-color: var(--color-secondary);
}

.collection-item-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.collection-use-button {
    background: transparent;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 2px;
    flex-shrink: 0;
}

.collection-delete-button {
    background: transparent;
    border: 1px solid var(--color-border-main);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 2px;
}

.collection-use-button:hover {
    background: var(--color-secondary);
    transform: scale(1.1);
}

.collection-delete-button:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: scale(1.1);
}

.collection-use-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
    transition: all 0.2s ease;
}

.collection-delete-icon {
    width: 12px;
    height: 12px;
    object-fit: contain;
    filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
    transition: all 0.2s ease;
}

.collection-use-button:hover .collection-use-icon {
    filter: brightness(1.1) saturate(1.2) invert(1);
}

.collection-delete-button:hover .collection-delete-icon {
    filter: brightness(1.1) saturate(1.2) invert(1);
}

.collection-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--color-text-main);
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.collection-name:hover {
    background: var(--color-card-bg);
    border-color: var(--color-border-main);
}

.collection-name.editing {
    background: var(--color-card-bg);
    border-color: var(--color-secondary);
    outline: none;
}

.collection-name-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--color-text-main);
    font-weight: 500;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--color-secondary);
}

/* 确保编辑状态下按钮不变形 */
.collection-item .collection-use-button {
    flex-shrink: 0;
    min-width: 24px;
    min-height: 24px;
}

/* 移动端浮窗优化 */
@media (max-width: 768px) {
    .folder-popup-content {
        width: 300px;
        max-width: 90%;
        max-height: 50vh;
        border-radius: 12px;
    }
    
    .folder-popup-header {
        padding: 14px 16px;
    }
    
    .folder-popup-header h4 {
        font-size: 1rem;
    }
    
    .folder-popup-body {
        padding: 18px 16px;
    }
    
    .folder-popup-close {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .folder-popup-content {
        width: 280px;
        max-width: 95%;
        max-height: 45vh;
        border-radius: 10px;
    }
    
    .folder-popup-header {
        padding: 12px 14px;
    }
    
    .folder-popup-header h4 {
        font-size: 0.95rem;
    }
    
    .folder-popup-body {
        padding: 16px 14px;
    }
    
    .folder-popup-close {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

.countdown-content {
    min-height: 200px;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* 折叠状态 */
.countdown-content.collapsed {
    max-height: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
}

.loading-state {
    text-align: center;
    color: var(--color-text-secondary);
    padding: 40px 20px;
}

.loading-state i {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.loading-state p {
    margin: 0;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    color: var(--color-text-secondary);
    padding: 40px 20px;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--color-text-secondary);
    opacity: 0.6;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* 倒计时项目 */
.countdown-item {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-main);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* 移除倒计时条目的悬停效果 */

.countdown-item.active {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.countdown-item.pending {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.countdown-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    position: relative;
}

.countdown-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.countdown-item-name {
    font-weight: 600;
    color: var(--color-text-main);
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.countdown-item-type {
    background: var(--color-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.countdown-item-type.fisher {
    background: linear-gradient(135deg, #8B6B3D 0%, #C9A86A 100%);
    box-shadow: 0 2px 4px rgba(139, 107, 61, 0.3);
}

.countdown-item-type.gather {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    box-shadow: 0 2px 4px rgba(86, 171, 47, 0.3);
}

.countdown-item-type.golden {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); /* Gold gradient */
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

/* 机遇临门已完成状态 */
.countdown-item.completed {
    opacity: 0.5;
    filter: grayscale(100%);
    cursor: pointer;
}

.countdown-item.completed:hover {
    opacity: 0.7;
}

/* 移除标签悬停效果 */

/* 取消置顶按钮 */
.unpin-btn {
    background: transparent;
    border: 1px solid var(--color-border-main);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    flex-shrink: 0;
    padding: 2px;
}

.unpin-btn img {
    width: 12px;
    height: 12px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.2s ease;
}

.unpin-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    opacity: 1;
    transform: scale(1.1);
}

.unpin-btn:hover img {
    filter: grayscale(0%) brightness(1) invert(1);
}

.unpin-btn:active {
    transform: scale(0.95);
}

/* 移动端隐藏取消置顶按钮 */
@media (max-width: 768px) {
    .unpin-btn {
        display: none;
    }
}

.countdown-item-time {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    text-align: center;
    padding: 4px 8px;
    background: var(--color-card-bg);
    border-radius: 4px;
    border: 1px solid var(--color-border-main);
}

.countdown-item-time.active {
    color: #28a745;
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.countdown-item-time.pending {
    color: #dc3545;
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* 进度条 */
.countdown-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(40,167,69,0.8) 0%, rgba(40,167,69,0.3) 100%);
    transition: width 0.3s ease;
}

.countdown-item.pending .countdown-progress {
    background: linear-gradient(90deg, rgba(220,53,69,0.8) 0%, rgba(220,53,69,0.3) 100%);
}

.tool-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border-main);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px var(--color-card-shadow);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-level-text));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--color-card-shadow);
    border-color: var(--color-secondary);
    background: var(--color-card-hover);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--color-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-border-main);
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    border-color: var(--color-secondary);
    transform: scale(1.05);
}

.tool-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon-img {
    filter: brightness(1.1) saturate(1.2);
}

.tool-content {
    flex: 1;
    min-width: 0;
}

.tool-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 6px;
}

.tool-description {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feature-tag {
    background: var(--color-bg-light);
    color: var(--color-text-secondary);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--color-border-main);
}

.tool-arrow {
    color: var(--color-text-secondary);
    font-size: 18px;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-arrow {
    color: var(--color-secondary);
    transform: translateX(4px);
}



/* 版权信息 */
.footer {
    background: var(--color-bg-dark);
    border-top: 1px solid var(--color-border-main);
    margin-top: 60px;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border-main), transparent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.footer-info p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.footer-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
        height: 60px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        width: 20px;
        height: 20px;
    }

    .header-right {
        gap: 12px;
    }

    .local-time-box {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 70px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    /* 移动端隐藏设置按钮 */
    .settings-button {
        display: none;
    }

    .main-content {
        padding: 20px 16px;
    }
}

/* 中等屏幕尺寸优化 - 减少描述文字保持按钮美观 */
@media (max-width: 1024px) and (min-width: 769px) {
    .tool-description {
        font-size: 0.75rem;
        line-height: 1.2;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .tool-features {
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
    .tool-card {
        padding: 14px;
        min-height: 70px;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
    }
    
    .tool-icon-img {
        width: 28px;
        height: 28px;
    }
    
    .tool-title {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
}

/* 移动端布局调整 */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .countdown-panel {
        position: static;
        max-height: none;
        order: -1; /* 在移动端将倒计时面板放在顶部 */
    }
    
    /* 移动端折叠状态的面板 */
    .countdown-panel.collapsed-panel {
        max-height: 40px;
        min-height: 40px;
        padding: 0 16px;
        display: flex;
        align-items: center;
    }
    
    /* 移动端折叠状态时的header */
    .countdown-panel.collapsed-panel .countdown-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
    }
    
    /* 移动端折叠状态时的内容区域 */
    .countdown-panel.collapsed-panel .countdown-content {
        max-height: 0;
        min-height: 0;
        padding: 0;
        margin: 0;
        opacity: 0;
        overflow: hidden;
    }

    .welcome-title {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 100%;
    }

    .tool-card {
        padding: 24px 20px;
        gap: 16px;
        min-height: 80px;
        touch-action: manipulation;
    }

    .tool-icon {
        width: 64px;
        height: 64px;
    }

    .tool-icon-img {
        width: 40px;
        height: 40px;
    }

    .tool-title {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }

    .tool-description {
        font-size: 0.8rem;
        margin-bottom: 6px;
        line-height: 1.3;
    }

    .tool-features {
        gap: 4px;
    }

    .feature-tag {
        font-size: 0.7rem;
        padding: 2px 5px;
    }

    .usage-section {
        padding: 24px;
    }

    .usage-title {
        font-size: 1.5rem;
    }

    .usage-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .tool-card {
        flex-direction: row;
        text-align: left;
        gap: 16px;
        min-height: 70px;
        padding: 16px;
        touch-action: manipulation;
    }

    .tool-icon {
        width: 56px;
        height: 56px;
        flex-shrink: 0;
    }

    .tool-icon-img {
        width: 32px;
        height: 32px;
    }

    .tool-content {
        flex: 1;
        min-width: 0;
    }

    .tool-title {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .tool-description {
        display: none; /* 隐藏详细描述 */
    }

    .tool-features {
        display: none; /* 隐藏功能标签 */
    }

    .tool-arrow {
        color: var(--color-secondary);
        font-size: 16px;
        flex-shrink: 0;
    }
}

/* 移动端触摸优化 - 使用JavaScript类名控制 */
.mobile-device .tool-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-device .tool-card:active {
    opacity: 0.8;
    transition: opacity 0.1s ease;
}

/* 禁用移动端的悬停效果 */
.mobile-device .tool-card:hover {
    transform: none;
    box-shadow: 0 4px 12px var(--color-card-shadow);
}

.mobile-device .tool-card:hover::before {
    transform: scaleX(0);
}

.mobile-device .tool-card:hover .tool-icon {
    transform: none;
    border-color: var(--color-border-main);
}

.mobile-device .tool-card:hover .tool-icon-img {
    filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
}

.mobile-device .tool-card:hover .tool-arrow {
    transform: none;
    color: var(--color-text-secondary);
}

/* 保留原有的媒体查询作为备用 */
@media (hover: none) and (pointer: coarse) {
    .tool-card {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .tool-card:active {
        opacity: 0.8;
        transition: opacity 0.1s ease;
    }
    
    /* 禁用移动端的悬停效果 */
    .tool-card:hover {
        transform: none;
        box-shadow: 0 4px 12px var(--color-card-shadow);
    }
    
    .tool-card:hover::before {
        transform: scaleX(0);
    }
    
    .tool-card:hover .tool-icon {
        transform: none;
        border-color: var(--color-border-main);
    }
    
    .tool-card:hover .tool-icon-img {
        filter: sepia(1) saturate(2) hue-rotate(0deg) brightness(0.8);
    }
    
    .tool-card:hover .tool-arrow {
        transform: none;
        color: var(--color-text-secondary);
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.6s ease-out;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }

/* 移动端减少动画延迟 - 使用JavaScript类名控制 */
.mobile-device .tool-card {
    animation: fadeInUp 0.3s ease-out;
}

.mobile-device .tool-card:nth-child(1) { animation-delay: 0.02s; }
.mobile-device .tool-card:nth-child(2) { animation-delay: 0.04s; }
.mobile-device .tool-card:nth-child(3) { animation-delay: 0.06s; }
.mobile-device .tool-card:nth-child(4) { animation-delay: 0.08s; }

/* 保留原有的媒体查询作为备用 */
@media (hover: none) and (pointer: coarse) {
    .tool-card {
        animation: fadeInUp 0.3s ease-out;
    }
    
    .tool-card:nth-child(1) { animation-delay: 0.02s; }
    .tool-card:nth-child(2) { animation-delay: 0.04s; }
    .tool-card:nth-child(3) { animation-delay: 0.06s; }
    .tool-card:nth-child(4) { animation-delay: 0.08s; }
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--color-text-secondary);
}

.loading i {
    animation: spin 1s linear infinite;
}