/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.5s ease, color 0.3s ease;
}

:root {
    --primary-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --secondary-bg: rgba(255, 255, 255, 0.85);
    --card-bg: white;
    --text-color: #333;
    --heading-color: #2c3e50;
    --accent-gradient: linear-gradient(90deg, #3498db, #9b59b6);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --footer-bg: #f8f9fa;
    --footer-text: #7f8c8d;
    --icon-color: #3498db;
}

.dark-mode {
    --primary-bg: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    --secondary-bg: rgba(30, 30, 40, 0.85);
    --card-bg: #2d3748;
    --text-color: #e2e8f0;
    --heading-color: #f7fafc;
    --accent-gradient: linear-gradient(90deg, #667eea, #764ba2);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --footer-bg: #1a202c;
    --footer-text: #a0aec0;
    --icon-color: #63b3ed;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--primary-bg);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.8s ease;
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 100;
    background: var(--secondary-bg);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideInRight 0.5s ease 0.6s forwards;
    opacity: 0;
}

.theme-toggle:hover {
    transform: rotate(30deg) scale(1.1);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.theme-toggle i {
    font-size: 1.5rem;
    color: var(--icon-color);
}

/* 主容器样式 */
.main-container {
    max-width: 800px;
    width: 100%;
    background: var(--secondary-bg);
    border-radius: 20px;
    box-shadow: 0 15px 35px var(--shadow-color);
    padding: 40px;
    backdrop-filter: blur(10px);
    animation: containerAppear 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
    transform: scale(0.9);
}

/* 标题样式 */
h1 {
    text-align: center;
    font-size: 3rem;
    color: var(--heading-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    animation: titleGlow 3s infinite alternate;
}

h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
    animation: lineWidth 3s infinite alternate;
}

/* 工具列表样式 */
ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

li {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(20px);
    animation: listItemAppear 0.5s ease forwards;
}

li:nth-child(1) { animation-delay: 0.1s; }
li:nth-child(2) { animation-delay: 0.2s; }
li:nth-child(3) { animation-delay: 0.3s; }
li:nth-child(4) { animation-delay: 0.4s; }
li:nth-child(5) { animation-delay: 0.5s; }
li:nth-child(6) { animation-delay: 0.6s; }

li:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px var(--shadow-hover);
}

a {
    display: flex;
    align-items: center;
    padding: 25px 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

a i {
    margin-right: 15px;
    font-size: 1.5rem;
    color: var(--icon-color);
    transition: transform 0.3s ease;
}

a:hover i {
    transform: scale(1.2) rotate(10deg);
}

a:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.7s;
}

a:hover:before {
    left: 100%;
}

a:hover {
    color: var(--icon-color);
    background: rgba(0, 0, 0, 0.03);
}

.dark-mode a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* 更新日期样式 */
p {
    text-align: center;
    color: var(--footer-text);
    font-size: 0.95rem;
    padding: 15px;
    background: var(--footer-bg);
    border-radius: 10px;
    margin-top: 20px;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.8s forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        padding: 25px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    ul {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .main-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    a {
        padding: 20px 15px;
        font-size: 1.1rem;
    }
}

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

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

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

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

@keyframes titleGlow {
    0% {
        text-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
    }
    100% {
        text-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
    }
}

.dark-mode h1 {
    animation: darkTitleGlow 3s infinite alternate;
}

@keyframes darkTitleGlow {
    0% {
        text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    }
    100% {
        text-shadow: 0 0 25px rgba(118, 75, 162, 0.7);
    }
}

@keyframes lineWidth {
    0% {
        width: 80px;
    }
    100% {
        width: 120px;
    }
}

@keyframes listItemAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 图标动画 */
@keyframes iconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: iconPulse 2s infinite;
}
