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

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* 防止横向滚动 */
    overflow-y: auto; /* 允许纵向滚动 */
}

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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #0891b2;
}

/* 文字选择颜色 */
::selection {
    background-color: rgba(6, 182, 212, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background-color: rgba(6, 182, 212, 0.3);
    color: #ffffff;
}

/* 页面进入动画 */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-delay {
    animation: fade-in 0.8s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fade-in 0.8s ease-out 0.6s both;
}

/* 卡片滑入动画 */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slide-up 0.8s ease-out 0.15s both;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(6, 182, 212, 0.2);
    border-top-color: #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 按钮悬停效果 */
button {
    cursor: pointer;
    outline: none;
    border: none;
}

button:active {
    transform: scale(0.98) !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    .loading-spinner {
        width: 32px;
        height: 32px;
    }
}

/* 防止文字溢出 */
p, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 链接样式 */
a {
    color: #06b6d4;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0891b2;
}

/* 禁用选择（可选） */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* 背景模糊效果优化 */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 确保动画流畅 */
* {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 手动选项展开动画 */
.manual-options-hidden {
    max-height: 0;
    overflow: hidden;
    transition: all 0.8s ease-out;
}

.manual-options-show {
    max-height: 2000px;
    opacity: 1 !important;
    transition: all 0.8s ease-out;
}

/* 复制按钮成功状态 */
.copy-success {
    color: #10b981 !important;
}

.copy-success span::after {
    content: ' ✓';
}

/* 代码字体优化 */
code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}

/* 按钮组hover效果 */
.bg-white\/5:hover {
    background-color: rgba(255, 255, 255, 0.08);
}
