/* ==========================================
 * 组件样式 - 按钮、卡片、表格等
 * ========================================== */

/* 头部区域 */
.hero-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px;
}

.hero-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.hero-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
}

.save-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    color: var(--color-text-light);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.save-button:hover {
    text-decoration: underline;
    background: var(--color-bg-hover);
}

.save-button svg {
    flex-shrink: 0;
}

/* 警告横幅 */
.warning-banner {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.warning-icon {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    background: rgba(233, 69, 96, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.warning-text {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
}

.warning-text strong {
    color: var(--color-primary);
}

/* 区块标题 */
.section-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-text-light);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.section-title-row .section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sub-title {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    margin-top: -8px;
}

/* 下载卡片 */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.download-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color var(--transition-fast);
}

.download-card:hover {
    border-color: var(--color-border-hover);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info h3 {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 4px;
}

.card-version {
    font-size: 0.8rem;
    color: var(--color-primary-light);
}

.card-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(233, 69, 96, 0.2);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-left: 8px;
}

.card-badge.recommend {
    background: rgba(46, 204, 113, 0.2);
    color: var(--color-success);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 18px;
}

/* 下载按钮组 */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-download {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-text-light);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: opacity var(--transition-fast);
}

.btn-download:hover {
    opacity: 0.9;
    text-decoration: underline;
    color: var(--color-text-light);
}

.btn-download.secondary {
    background: var(--color-bg-hover);
    border: 1px solid var(--color-border-hover);
}

.btn-download.secondary:hover {
    background: var(--color-border-hover);
}

.btn-download.disabled {
    background: var(--color-bg-hover);
    color: var(--color-text-dark);
    cursor: not-allowed;
    border: none;
}

.btn-download.disabled:hover {
    opacity: 1;
}

/* 网站链接卡片 */
.website-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 40px;
}

.website-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.website-info h3 {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.website-info p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.website-info .status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-primary-light);
    font-weight: normal;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--color-primary-light);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.btn-visit {
    padding: 10px 24px;
    background: var(--color-bg-hover);
    color: var(--color-text-light);
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.btn-visit:hover {
    color: var(--color-text-light);
    background: var(--color-primary);
}

/* 教程文档 */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.docs-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.docs-card h3 {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.docs-card p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.docs-links {
    list-style: none;
    padding: 0;
}

.docs-links li {
    padding: 8px 0;
    border-top: 1px solid #1f1f1f;
}

.docs-links li:first-child {
    border-top: none;
    padding-top: 0;
}

.docs-links a {
    color: var(--color-primary);
    font-size: 0.9rem;
}

.docs-links a:hover {
    text-decoration: underline;
    color: var(--color-primary-light);
}

.docs-more {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.docs-more:hover {
    text-decoration: underline;
    color: var(--color-text-light);
}

/* 模组表格 */
.mod-table-wrapper {
    overflow-x: auto;
    margin-bottom: 40px;
}

.mod-table {
    width: 100%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.mod-table table {
    width: 100%;
    border-collapse: collapse;
}

.mod-table th {
    background: #151515;
    padding: 14px 16px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.mod-table td {
    padding: 12px 16px;
    border-top: 1px solid #1f1f1f;
    font-size: 0.9rem;
    color: var(--color-text);
}

.mod-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.mod-name {
    color: var(--color-text-light);
    font-weight: 500;
}

.mod-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(233, 69, 96, 0.15);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.mod-tag.fabric {
    background: rgba(230, 180, 60, 0.15);
    color: #e6b43c;
}

.mod-tag.forge {
    background: rgba(60, 120, 230, 0.15);
    color: #3c78e6;
}

.mod-download {
    color: var(--color-primary);
    font-size: 0.85rem;
}

.mod-download:hover {
    text-decoration: underline;
    color: var(--color-primary-light);
}

/* FAQ */
.faq-section {
    margin-bottom: 40px;
}

.faq-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--color-text-light);
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: var(--color-bg-hover);
}

.faq-question::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--color-text-dark);
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.faq-item.active .faq-answer {
    padding: 0 20px 18px;
    max-height: 200px;
}

/* 关于 */
.about-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 40px;
}

.about-section h2 {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.about-section p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

.about-section strong {
    color: var(--color-primary);
}

/* 二维码悬浮 */
.qr-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.qr-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 1;
}

.qr-popup img {
    width: 180px;
    height: 180px;
    display: block;
    image-rendering: pixelated;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.qr-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: var(--color-primary);
}

.qr-wrapper:hover .qr-popup {
    display: block;
}

/* 提示框 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--color-bg-hover);
    color: var(--color-text-light);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-normal);
    border: 1px solid var(--color-border-hover);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    border-color: var(--color-success);
    background: rgba(46, 204, 113, 0.1);
}
