/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 导航栏样式 */
nav {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

nav.scrolled {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 10px 0;
}

/* 英雄区域样式 */
header {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

header > div {
    position: relative;
    z-index: 2;
}

/* 按钮样式 */
button, .btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

/* 卡片阴影效果 */
.card-shadow {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

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

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* 滚动动画触发器 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式导航菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: #000;
    z-index: 100;
    transition: right 0.3s ease;
    padding: 80px 20px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    color: #fff;
    padding: 15px 0;
    font-size: 18px;
    border-bottom: 1px solid #333;
}

/* 页面过渡效果 */
.page-transition {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.page-transition.loaded {
    opacity: 1;
}

/* 图片悬停效果 */
.img-hover {
    overflow: hidden;
    position: relative;
}

.img-hover img {
    transition: transform 0.5s ease;
}

.img-hover:hover img {
    transform: scale(1.1);
}

/* 文本选择样式 */
::selection {
    background-color: #000;
    color: #fff;
}

::-moz-selection {
    background-color: #000;
    color: #fff;
}

/* 输入框样式 */
input, textarea {
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* 加载动画 */
.loading {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #000;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 分隔线 */
.divider {
    width: 50px;
    height: 3px;
    background-color: #000;
    margin: 20px auto;
}

/* 引用样式 */
blockquote {
    border-left: 4px solid #000;
    padding-left: 20px;
    font-style: italic;
    color: #666;
    margin: 20px 0;
}

/* 网格布局增强 */
.grid-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 20px;
    grid-auto-flow: dense;
}

/* 深色模式兼容 */
@media (prefers-color-scheme: dark) {
    html, body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .bg-gray-100 {
        background-color: #1e1e1e;
    }
    
    .bg-white {
        background-color: #2d2d2d;
    }
    
    .text-gray-700 {
        color: #d0d0d0;
    }
    
    .text-gray-600 {
        color: #b0b0b0;
    }
    
    .text-gray-900 {
        color: #ffffff;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}