/* IC Markets - 极简暗黑风格自定义样式 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* 文章内容样式 - prose类增强 */
.article-content {
    color: #d1d5db;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #00ff88;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 255, 136, 0.2);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    color: #d1d5db;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 0.75rem;
    color: #d1d5db;
}

.article-content ul li::marker {
    color: #00ff88;
}

.article-content ol li::marker {
    color: #00ff88;
    font-weight: 600;
}

.article-content a {
    color: #00ff88;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: #00cc6a;
}

.article-content blockquote {
    border-left: 4px solid #00ff88;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #9ca3af;
    background-color: rgba(0, 255, 136, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.article-content code {
    background-color: #1a1a1a;
    color: #00ff88;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-content pre {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-content table thead {
    background-color: rgba(0, 255, 136, 0.1);
}

.article-content table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.article-content table td {
    padding: 0.75rem;
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: #d1d5db;
}

.article-content table tr:hover {
    background-color: rgba(0, 255, 136, 0.05);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem 0;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.article-content strong {
    color: #ffffff;
    font-weight: 600;
}

.article-content em {
    font-style: italic;
    color: #9ca3af;
}

/* 文本截断 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out;
}

/* 滚动条自定义 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc6a;
}

/* FAQ展开动画 */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-content.active {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

/* 活动弹窗动画 */
#activity-modal {
    animation: fadeIn 0.3s ease-out;
}

#activity-modal > div {
    animation: slideDown 0.4s ease-out;
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 按钮悬停效果增强 */
button,
a.button,
.btn {
    position: relative;
    overflow: hidden;
}

button::before,
a.button::before,
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
a.button:hover::before,
.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 3px solid rgba(0, 255, 136, 0.2);
    border-top-color: #00ff88;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

/* 渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* 打印样式 */
@media print {
    nav,
    footer,
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .article-content {
        color: black;
    }
}

/* 辅助功能 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 焦点可见性 */
*:focus-visible {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .article-content h4 {
        font-size: 1.125rem;
    }
    
    .article-content table {
        font-size: 0.875rem;
    }
    
    .article-content pre {
        font-size: 0.875rem;
    }
}

/* 性能优化 - GPU加速 */
.gpu-accelerate {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 图片懒加载占位 */
img[loading="lazy"] {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

