/* Tailwind CSS Overrides and Custom Styles */

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

/* Markdown 内容样式 */
.markdown-body {
    color: rgb(203, 213, 225);
    background: transparent;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    color: rgb(241, 245, 249);
    border-bottom: none;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.markdown-body p {
    line-height: 1.8;
    margin-bottom: 1em;
}

.markdown-body ul,
.markdown-body ol {
    margin-left: 2em;
    margin-bottom: 1em;
}

.markdown-body li {
    margin-bottom: 0.3em;
}

.markdown-body code {
    background-color: rgba(30, 41, 59, 0.8);
    color: rgb(134, 239, 172);
    padding: 0.2em 0.4em;
    border-radius: 0.3em;
    font-family: 'Monaco', 'Courier New', monospace;
}

.markdown-body pre {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5em;
    padding: 1em;
    overflow-x: auto;
    margin-bottom: 1em;
}

.markdown-body pre code {
    background-color: transparent;
    color: rgb(203, 213, 225);
    padding: 0;
}

.markdown-body blockquote {
    border-left: 4px solid rgb(99, 102, 241);
    padding-left: 1em;
    margin-left: 0;
    margin-bottom: 1em;
    color: rgb(148, 163, 184);
}

.markdown-body a {
    color: rgb(99, 102, 241);
    text-decoration: none;
}

.markdown-body a:hover {
    color: rgb(139, 92, 246);
    text-decoration: underline;
}

.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

.markdown-body table th,
.markdown-body table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75em;
    text-align: left;
}

.markdown-body table th {
    background-color: rgba(30, 41, 59, 0.5);
    font-weight: bold;
}

.markdown-body table tr:nth-child(even) {
    background-color: rgba(30, 41, 59, 0.3);
}

.markdown-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2em 0;
}

/* FAQ 按钮图标样式 */
button i {
    display: inline-block;
    transition: transform 0.3s ease;
}

button i.rotate-180 {
    transform: rotate(180deg);
}

/* 按钮过渡效果 */
button {
    transition: all 0.3s ease;
}

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

/* 链接过渡 */
a {
    transition: color 0.3s ease;
}

/* 防止水平滚动 */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* 详情元素样式 */
details {
    transition: all 0.3s ease;
}

details[open] summary {
    margin-bottom: 1rem;
}

summary {
    transition: color 0.3s ease;
}

summary:hover {
    color: rgb(99, 102, 241);
}

summary i {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* 加载动画 */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 文本截断 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .text-7xl {
        font-size: 2.5rem;
    }

    .text-6xl {
        font-size: 2rem;
    }

    .gap-8 {
        gap: 1rem;
    }
}