@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    background: #8bb5d0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(0,0,0,0.05) 31px, rgba(0,0,0,0.05) 32px),
        repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(0,0,0,0.05) 31px, rgba(0,0,0,0.05) 32px);
    color: #3f3f3f;
    min-height: 100vh;
    font-size: 12px;
    line-height: 1.8;
    image-rendering: pixelated;
}

a {
    color: #2d6db5;
    text-decoration: none;
}

a:hover {
    color: #1a4a80;
    text-decoration: underline;
}

/* 容器 */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    text-align: center;
    padding: 40px 0 24px;
}

.header h1 {
    font-size: 1.2rem;
    color: #3f3f3f;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #5a8a3c, -1px -1px 0 #fff;
    letter-spacing: 1px;
}

.subtitle {
    color: #555;
    font-size: 0.6rem;
}

/* 搜索框 */
.search-box {
    margin: 20px 0 0;
}

.search-box .form-input {
    padding: 12px 16px;
    font-size: 0.7rem;
}

/* 版本表格 */
.version-list {
    margin-top: 16px;
}

.version-table {
    width: 100%;
    border-collapse: collapse;
    background: #c6c6c6;
    border: 4px solid #555;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
}

.version-table th {
    background: #5a8a3c;
    padding: 12px 14px;
    text-align: left;
    font-weight: 400;
    color: #fff;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
    border-bottom: 3px solid #4a7a2c;
}

.version-table td {
    padding: 12px 14px;
    border-bottom: 2px solid #999;
    font-size: 0.7rem;
}

.version-table tbody tr:nth-child(even) {
    background: #b8b8b8;
}

.version-table tbody tr:hover {
    background: #a0d060;
}

.version-name {
    font-weight: 400;
    font-size: 0.75rem;
    color: #2d2d2d;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}

/* 类型标签 */
.type-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.55rem;
    font-weight: 400;
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
    border: 2px solid rgba(0,0,0,0.2);
    box-shadow: inset -2px -2px 0 rgba(0,0,0,0.15), inset 2px 2px 0 rgba(255,255,255,0.15);
}

/* 按钮 - MC风格 */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border: 3px solid #333;
    border-bottom-color: #1a1a1a;
    border-right-color: #1a1a1a;
    border-top-color: #666;
    border-left-color: #666;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background: #8b8b8b;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
    box-shadow: inset -2px -2px 0 #555, inset 2px 2px 0 #aaa;
    transition: none;
}

.btn:hover {
    background: #a0a0a0;
    color: #fff;
    text-decoration: none;
}

.btn:active {
    border-top-color: #1a1a1a;
    border-left-color: #1a1a1a;
    border-bottom-color: #666;
    border-right-color: #666;
    box-shadow: inset 2px 2px 0 #555, inset -2px -2px 0 #aaa;
}

.btn-download {
    background: #5a8a3c;
}

.btn-download:hover {
    background: #6da048;
}

.btn-primary {
    background: #2d6db5;
}

.btn-primary:hover {
    background: #3a80cc;
}

.btn-secondary {
    background: #7b7b7b;
}

.btn-secondary:hover {
    background: #8e8e8e;
}

.btn-danger {
    background: #b33e3e;
}

.btn-danger:hover {
    background: #cc4c4c;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 0.75rem;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.5rem;
}

/* 详情卡片 - MC箱子风格 */
.detail-card {
    background: #c6c6c6;
    border: 4px solid #555;
    border-top-color: #888;
    border-left-color: #888;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
}

.detail-card h3 {
    font-size: 0.8rem;
    color: #3f3f3f;
    margin-bottom: 14px;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.detail-header h2 {
    font-size: 1rem;
    color: #3f3f3f;
    text-shadow: 2px 2px 0 #5a8a3c;
}

.detail-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 2px solid #aaa;
}

.info-label {
    width: 130px;
    flex-shrink: 0;
    color: #555;
    font-size: 0.65rem;
}

.info-value {
    color: #3f3f3f;
    font-size: 0.7rem;
}

.detail-changelog {
    margin-bottom: 20px;
}

.detail-changelog h3 {
    font-size: 0.75rem;
    color: #555;
    margin-bottom: 10px;
}

.changelog-content {
    background: #aaa;
    border: 3px solid #777;
    border-top-color: #999;
    border-left-color: #999;
    padding: 14px;
    line-height: 2;
    font-size: 0.65rem;
    color: #3f3f3f;
}

.detail-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 3px solid #999;
}

/* 表单 */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 0.65rem;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 3px solid #555;
    border-top-color: #333;
    border-left-color: #333;
    border-bottom-color: #888;
    border-right-color: #888;
    background: #ddd;
    color: #3f3f3f;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
}

.form-input:focus {
    outline: none;
    background: #eee;
    border-color: #5a8a3c;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5a8a3c;
}

small {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 0.5rem;
}

/* 提示框 */
.alert {
    padding: 12px 16px;
    border: 3px solid;
    margin-bottom: 14px;
    font-size: 0.65rem;
}

.alert-error {
    background: #e8a0a0;
    color: #5a1a1a;
    border-color: #a04040;
}

.alert-success {
    background: #a0d880;
    color: #1a4a1a;
    border-color: #5a8a3c;
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 50px 20px;
    color: #777;
    font-size: 0.8rem;
}

/* 首页简介 */
.site-intro {
    font-size: 0.65rem;
    line-height: 2.2;
    color: #4a4a4a;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px 0 20px;
    color: #666;
    font-size: 0.5rem;
}

/* ========== 后台布局 ========== */
.admin-layout {
    min-height: 100vh;
}

.admin-nav {
    background: #4a4a4a;
    border-bottom: 4px solid #333;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 20px;
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}

.nav-brand {
    font-weight: 400;
    font-size: 0.75rem;
    color: #5a8a3c;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
    margin-right: auto;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    padding: 6px 12px;
    color: #ccc;
    font-size: 0.55rem;
    transition: none;
    border: 2px solid transparent;
}

.nav-links a:hover {
    background: #666;
    color: #fff;
    text-decoration: none;
}

.nav-links a.active {
    background: #5a8a3c;
    color: #fff;
    border-color: #4a7a2c;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.admin-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.admin-content h2 {
    color: #3f3f3f;
    margin-bottom: 20px;
    font-size: 1rem;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-card {
    background: #c6c6c6;
    border: 4px solid #555;
    border-top-color: #888;
    border-left-color: #888;
    padding: 20px;
    text-align: center;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.12);
}

.stat-number {
    font-size: 1.4rem;
    color: #5a8a3c;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

.stat-label {
    margin-top: 8px;
    color: #666;
    font-size: 0.5rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .version-table {
        font-size: 0.55rem;
    }

    .version-table th,
    .version-table td {
        padding: 8px 6px;
    }

    .admin-nav {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .info-row {
        flex-direction: column;
        gap: 4px;
    }

    .info-label {
        width: auto;
    }

    body {
        font-size: 10px;
    }

    .header h1 {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .btn {
        text-align: center;
    }

    .header h1 {
        font-size: 0.75rem;
    }
}
