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

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

::-webkit-scrollbar-track {
    background: #1E293B;
}

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

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

/* 基础样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #1E293B;
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏滚动效果 */
#mainNav.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 按钮样式增强 */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

/* 卡片动画 */
.card-hover {
    position: relative;
    overflow: hidden;
}

.card-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 185, 0, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.card-hover:hover::after {
    opacity: 1;
}

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

/* 禁用文本选择 */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 复制按钮样式 */
.copy-btn {
    background: linear-gradient(90deg, rgba(255,196,0,0.2) 0%, rgba(255,214,0,0.2) 100%);
    border: 1px solid rgba(255,196,0,0.5);
    color: #ffd600;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-btn:hover {
    background: linear-gradient(90deg, rgba(255,196,0,0.3) 0%, rgba(255,214,0,0.3) 100%);
    border-color: rgba(255,196,0,0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255,196,0,0.2);
}

.copy-btn:active {
    transform: translateY(0);
}

/* 邀请码样式 */
.invite-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #ffc400, #ffd600);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(255,196,0,0.1);
    border: 1px solid rgba(255,196,0,0.3);
}

/* 复制成功通知样式 */
.copy-notification {
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(255,196,0,0.4);
}

/* 复制成功按钮动画效果 */
.copy-btn.copy-success {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    border-color: #4caf50;
    color: white;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

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

/* 数字递增动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 图表样式 */
.chart-container {
    position: relative;
    margin: auto;
    height: 200px;
    width: 100%;
}

/* 模态框动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -55%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

#registerModal.show .absolute:nth-child(2) {
    animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalOverlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#registerModal.show .absolute:nth-child(1) {
    animation: modalOverlayFadeIn 0.3s ease-out forwards;
}

/* 输入框焦点效果 */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 185, 0, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .md\:flex-row {
        flex-direction: column;
    }
    
    .md\:w-1\/2 {
        width: 100%;
    }
    
    /* 修复移动端图片轮播显示问题 */
    .carousel-container {
        height: 300px !important;
    }
    
    .carousel-slide img {
        object-fit: contain !important;
    }
}

/* 悬停效果优化 */
@media (hover: hover) {
    a:hover,
    button:hover {
        transform: translateY(-1px);
    }
}

/* 加载更多动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* 市场数据表格样式优化 */
table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    text-align: left;
    padding: 12px;
}

/* 通知气泡样式 */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #FFB900;
    color: #1E293B;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out forwards;
}

/* 自定义通知样式 - 用于语言切换等功能 */
.custom-notification {
    font-weight: 500;
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 语言选择器样式 */
#languageDropdown {
    min-width: 120px;
}

.language-option, .language-option-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.language-option:hover, .language-option-mobile:hover {
    background-color: rgba(255, 185, 0, 0.1);
}

.language-option img, .language-option-mobile img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

/* 移动端语言选择区域 */
.mobile-language-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* 图片容器自适应样式 */
.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 高亮文本样式 */
.highlight-text {
    background: linear-gradient(90deg, #FFB900, #FFD100);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* 渐变文本效果 */
.gradient-text {
    background: linear-gradient(90deg, #FFB900, #FFD100);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* 交易所Logo样式 */
.exchange-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.card-hover:hover .exchange-logo {
    transform: scale(1.1);
}

.carousel-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 背景渐变动画 */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-gradient-animate {
    background: linear-gradient(-45deg, #1E293B, #0F172A, #1E293B, #0F172A);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* 文本渐变效果 */
.text-gradient {
    background: linear-gradient(to right, #FFB900, #FFD100);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 阴影效果增强 */
.shadow-enhanced {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 卡片边框发光效果 */
.card-glow:hover {
    box-shadow: 0 0 25px rgba(255, 185, 0, 0.3);
}