/*
 * MC论坛 主题 - Minecraft 风格
 * 仿照 mc 官网样式，符合 Typecho 主题规范
 *
 * Theme Name: MC论坛
 * Description: Minecraft 风格 Typecho 主题，仿照官网样式
 * Author: MC Forum
 * Version: 2.1
 */

/* --- 全局 --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #222; }
::-webkit-scrollbar-thumb { background: #483527; border: 2px solid #000; }

html { height: 100%; overflow-x: hidden; background: #000; }

body {
    overflow-x: hidden;
    color: #ffffff;
    font-family: "Minecraft", "Segoe UI", "Microsoft YaHei", sans-serif;
    margin: 0;
    padding-top: 56px;
    padding-bottom: 140px;
    position: relative;
    min-height: 100%;
    box-sizing: border-box;
}

a { color: #333; text-decoration: none; }
a:hover { color: #555; }

/* --- 导航栏（黑底白字，iOS 6 兼容） --- */
.navbar-mc {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 4px solid #000;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 56px;
    line-height: 56px;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    min-width: 0;
}

.navbar-brand {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    color: #fff;
    text-decoration: none;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.navbar-brand:hover { color: #ffff55; }

.mc-logo-img {
    height: 32px;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
    -webkit-image-rendering: pixelated;
    image-rendering: pixelated;
    -webkit-filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
}

.navbar-title {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* 移动端菜单按钮（美化 + iOS 6 兼容） */
.nav-toggle {
    display: none;
    -webkit-appearance: none;
    appearance: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    margin-left: auto;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:active {
    background: rgba(255,255,255,0.15);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    -webkit-transition: opacity 0.2s, -webkit-transform 0.2s;
    transition: opacity 0.2s, transform 0.2s;
}

.nav-toggle span:nth-child(1) { margin-bottom: 5px; }
.nav-toggle span:nth-child(2) { margin-bottom: 5px; }
.nav-toggle span:nth-child(3) { }

.nav-toggle.active span:nth-child(1) {
    margin-bottom: -7px;
    -webkit-transform: translateY(7px) rotate(45deg);
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    margin-bottom: 0;
}

.nav-toggle.active span:nth-child(3) {
    -webkit-transform: translateY(-7px) rotate(-45deg);
    transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.nav-menu li { margin: 0; }

.nav-menu a {
    display: block;
    padding: 0 16px;
    color: #fff;
    font-weight: bold;
}

.nav-menu a:hover,
.nav-menu .current a { color: #ffff55; }

/* --- Hero 区域 (仿 mc index，hero1 背景) --- */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 280px;
    overflow: hidden;
    text-align: center;
    padding: 80px 15px 80px;
    margin-bottom: 30px;
    box-sizing: border-box;
    border: 4px solid #000;
    box-shadow: inset 4px 4px 0 #fff,
        inset -4px -4px 0 #555,
        0 8px 15px rgba(0,0,0,0.4);
}

.hero-bg-anim {
    position: absolute;
    top: -5%;
    left: 0;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
    z-index: 0;
    transform: translate3d(-5%, 0, 0);
    backface-visibility: hidden;
    animation: heroPan 32s ease-in-out infinite;
}

@keyframes heroPan {
    0%   { transform: translate3d(-5%, 0, 0); }
    25%  { transform: translate3d(0%, 0, 0); }
    75%  { transform: translate3d(-10%, 0, 0); }
    100% { transform: translate3d(-5%, 0, 0); }
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    padding: 40px 20px;
    border: 4px solid #000;
    max-width: 900px;
    margin: 0 auto;
    outline: 4px solid rgba(255, 255, 255, 0.15);
    outline-offset: -8px;
}

.hero-title {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    text-shadow: 4px 4px 0 #3f3f3f;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.hero-subtitle {
    color: #ffff55;
    font-size: 16px;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 25px;
    display: block;
}

.btn-group { text-align: center; margin-top: 15px; }

.btn-group .mc-btn-brown {
    margin: 4px 8px;
}

/* 装饰性标签与图标 */
.mc-label-blue { color: #00aaaa; font-weight: bold; text-shadow: 0.5px 0.5px 0 #fff; }
.mc-label-green { color: #008000; font-weight: bold; text-shadow: 0.5px 0.5px 0 #fff; }
.mc-label-yellow { color: #bbbb00; font-weight: bold; text-shadow: 0.5px 0.5px 0 #fff; }

.feature-icon { font-size: 36px; margin-bottom: 8px; text-shadow: 2px 2px 0 #000; }
.icon-blue { color: #55ffff; }
.icon-green { color: #55ff55; }
.icon-yellow { color: #ffff55; }

/* --- MC 棕色按钮 --- */
.mc-btn-brown,
.submit {
    display: inline-block;
    background-color: #483527;
    padding: 12px 28px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 16px;
    border: 3px solid #000;
    box-shadow: inset 3px 3px 0 #70523c, inset -3px -3px 0 #2a1e16;
    margin: 8px;
    text-shadow: 2px 2px 0 #000;
    cursor: pointer;
    box-sizing: border-box;
    vertical-align: middle;
}

.mc-btn-brown .mdui-icon {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

.mc-btn-brown:hover,
.submit:hover {
    background-color: #5d4432;
    color: #fff !important;
}

/* --- MC 灰色卡片 --- */
.mc-card,
.post,
.widget {
    background-color: #c6c6c6;
    border: 4px solid #000;
    box-shadow: inset 4px 4px 0 #fff,
        inset -4px -4px 0 #555,
        0 8px 15px rgba(0,0,0,0.4);
    color: #333;
    padding: 25px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.mc-card h3 .mdui-icon,
.widget-title .mdui-icon {
    color: #000;
    font-size: 24px;
    vertical-align: bottom;
    margin-right: 6px;
}

.mc-card h3,
.post-title,
.widget-title {
    border-bottom: 3px solid #555;
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: bold;
    color: #000;
    font-size: 22px;
}

.post-title a { color: #000 !important; }
.post-title a:hover { color: #ffff00 !important; }

/* 小组件 */
.info-item {
    background: rgba(0,0,0,0.05);
    padding: 10px;
    border-left: 4px solid #483527;
    margin-bottom: 10px;
    word-wrap: break-word;
}

code { background: #444; color: #ffff55; padding: 3px 8px; font-family: monospace; }

.mc-hr { border: 0; border-top: 2px solid #999; border-bottom: 2px solid #fff; margin: 20px 0; }

/* --- 主内容区 --- */
#body { padding: 30px 0; }

#main .post { margin-bottom: 25px; }

.post-meta {
    margin: 10px 0 15px;
    padding: 0;
    color: #555;
    font-size: 0.9em;
}

.post-meta a { color: #333; }
.post-meta a:hover { color: #555; }

.post-meta li {
    display: inline-block;
    margin: 0 12px 0 0;
}

.post-content,
.comment-content {
    line-height: 1.8;
    word-wrap: break-word;
    color: #333;
}

.post-content a,
.comment-content a { color: #333; }
.post-content a:hover,
.comment-content a:hover { color: #555; }

.post-content pre,
.post-content code,
.comment-content code {
    background: #444;
    color: #ffff55;
    padding: 4px 8px;
    font-family: monospace;
}

.post-content pre { padding: 12px; overflow: auto; }

/* ========== 文章内容默认样式（MC 风格） ========== */

/* 段落 */
.post-content p {
    margin: 0 0 1em 0;
}
.post-content p:last-child { margin-bottom: 0; }

/* 标题层级 */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 1.2em 0 0.6em 0;
    font-weight: bold;
    color: #000;
    line-height: 1.4;
}
.post-content h1:first-child,
.post-content h2:first-child,
.post-content h3:first-child,
.post-content h4:first-child { margin-top: 0; }

.post-content h1 { font-size: 1.6em; border-bottom: 3px solid #555; padding-bottom: 8px; }
.post-content h2 { font-size: 1.4em; border-bottom: 2px solid #666; padding-bottom: 6px; }
.post-content h3 { font-size: 1.25em; border-left: 4px solid #483527; padding-left: 12px; }
.post-content h4 { font-size: 1.1em; }
.post-content h5 { font-size: 1em; color: #444; }
.post-content h6 { font-size: 0.95em; color: #555; }

/* 图片 */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 3px solid #000;
    box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555;
    margin: 1em 0;
}
.post-content figure { margin: 1em 0; }
.post-content figure img { margin: 0; }
.post-content figcaption {
    font-size: 0.9em;
    color: #555;
    text-align: center;
    margin-top: 6px;
}

/* 列表 */
.post-content ul,
.post-content ol {
    margin: 0.8em 0;
    padding-left: 1.8em;
}
.post-content li { margin-bottom: 0.4em; }
.post-content ul { list-style-type: square; }
.post-content ol { list-style-type: decimal; }

/* 引用块 */
.post-content blockquote {
    margin: 1em 0;
    padding: 12px 18px;
    background: rgba(0,0,0,0.06);
    border-left: 4px solid #483527;
    color: #444;
    font-style: italic;
}

/* 水平线 */
.post-content hr {
    border: 0;
    border-top: 2px solid #999;
    border-bottom: 2px solid #fff;
    margin: 1.5em 0;
}

/* 表格 */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    border: 3px solid #000;
}
.post-content th,
.post-content td {
    border: 2px solid #333;
    padding: 10px 14px;
    text-align: left;
}
.post-content th {
    background: #8b8b8b;
    color: #000;
    font-weight: bold;
}
.post-content tr:nth-child(even) { background: rgba(0,0,0,0.04); }

/* 加粗、斜体 */
.post-content strong,
.post-content b { font-weight: bold; color: #000; }
.post-content em,
.post-content i { font-style: italic; }

/* 删除线 */
.post-content del { text-decoration: line-through; color: #666; }

/* 阅读更多链接 */
.post-content .more a { color: #005500; font-weight: bold; }
.post-content .more a:hover { text-decoration: underline; color: #008800; }

/* 首页摘要 + 阅读全文按钮 */
.post-content .more { margin-top: 12px; margin-bottom: 0; }
.post-content .read-more-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
}

/* --- 上一篇 / 下一篇 --- */
.post-near {
    margin-top: 25px;
    padding: 0 !important;
    overflow: hidden;
}

.post-near-inner {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0;
}

.post-near-item {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    padding: 18px 22px;
    border: 3px solid #000;
    border-top: none;
    box-sizing: border-box;
}

.post-near-item:first-child { border-left: none; }
.post-near-prev { background: #b8b8b8; }
.post-near-next { background: #c6c6c6; text-align: right; }

.post-near-label {
    display: block;
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
}

.post-near-item a {
    font-weight: bold;
    color: #333;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-near-item a:hover { color: #bbbb00; }

.post-near-item .none,
.post-near-item:empty::after {
    color: #888;
    font-style: normal;
}

.post-near-prev .none { display: block; }
.post-near-next .none { display: block; text-align: right; }

/* --- 侧边栏 --- */
#secondary .widget { margin-bottom: 25px; }

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    padding: 10px 0;
    border-bottom: 2px dashed #999;
}

.widget-list li:last-child { border-bottom: none; }

.widget-list a {
    color: #333;
    font-weight: bold;
}

.widget-list a:hover { color: #555; }

.mc-list a {
    display: block;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    border-bottom: 2px dashed #999;
    font-weight: bold;
}

.mc-list a:last-child { border-bottom: none; }
.mc-list a:hover { background: rgba(0,0,0,0.05); }
.mc-list a .mdui-icon { color: #555; font-size: 20px; vertical-align: middle; margin-right: 8px; }

/* --- 分页 --- */
.page-navigator {
    list-style: none;
    margin: 25px 0;
    padding: 0;
    text-align: center;
}

.page-navigator li { display: inline-block; margin: 0 4px; }

.page-navigator a {
    display: inline-block;
    padding: 8px 16px;
    background: #483527;
    color: #fff !important;
    border: 2px solid #000;
    font-weight: bold;
}

.page-navigator a:hover {
    background: #5d4432;
    color: #fff !important;
}

.page-navigator .current a {
    background: #555;
    cursor: default;
}

/* --- 评论（无序号、不分层，一行一行平铺显示） --- */
#comments h3 { color: #000; }

.comment-list,
.comment-list ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
}

.comment-list li {
    padding: 15px;
    margin-top: 12px;
    margin-left: 0 !important;
    background-color: #c6c6c6;
    border: 4px solid #000;
    box-sizing: border-box;
}

/* 不分层：回复评论与主评论同级平铺，一行一行显示 */
.comment-list .comment-children,
.comment-list ol,
.comment-list li ol,
.comment-list li ul {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.comment-list .comment-body,
.comment-list li {
    margin-left: 0 !important;
}

.comment-list .comment-level-odd { background: #c6c6c6; }
.comment-list .comment-level-even { background: #b8b8b8; }
.comment-author cite { font-weight: bold; font-style: normal; }

/* 评论内容卡片：仅黑色边框，无阴影 */
.comment-list .comment-content {
    background: #e0e0e0;
    border: 4px solid #000;
    box-shadow: none;
    padding: 12px 15px;
    margin-top: 10px;
    box-sizing: border-box;
}

/* 评论表单：仿照 mc 注册输入框样式（附魔台/铁砧风格） */
#comment-form .mc-input-group {
    margin-bottom: 20px;
}

#comment-form .mc-input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #000;
    font-size: 16px;
}

#comment-form .mc-input {
    width: 100%;
    padding: 12px 15px;
    background-color: #fff;
    border: 3px solid #000;
    box-shadow: inset 3px 3px 0px #888888;
    font-size: 16px;
    font-family: inherit;
    color: #000;
    box-sizing: border-box;
    -webkit-appearance: none;
    border-radius: 0;
}

#comment-form .mc-input:focus {
    outline: none;
    border-color: #fff043;
    background-color: #faffff;
}

#comment-form .mc-textarea {
    min-height: 160px;
    resize: vertical;
}

#comment-form .required:after { content: " *"; color: #c00; }

#comment-form .comment-login-info {
    margin-bottom: 20px;
    color: #333;
}

/* 回复 / 取消回复 按钮美化 */
.comment-reply a,
.cancel-comment-reply a {
    display: inline-block;
    padding: 6px 16px;
    background: #483527;
    color: #fff !important;
    border: 2px solid #000;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 0 #000;
    box-shadow: inset 2px 2px 0 #70523c, inset -2px -2px 0 #2a1e16;
    margin-top: 8px;
}

.comment-reply a:hover,
.cancel-comment-reply a:hover {
    background: #5d4432;
    color: #fff !important;
}

.comment-reply-to .mc-reply-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(72, 53, 39, 0.3);
    border: 2px solid #483527;
    font-size: 14px;
    color: #333;
    margin: 8px 0 4px 0;
}

.respond .cancel-comment-reply {
    margin-bottom: 10px;
}

.respond .cancel-comment-reply a {
    display: inline-block;
}

/* --- Footer (底部不露背景) --- */
#footer {
    background: #000 !important;
    border-top: 4px solid #000;
    color: #999;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 120px;
    padding: 25px 20px 40px;
    padding-bottom: max(25px, env(safe-area-inset-bottom));
    box-sizing: border-box;
}

#footer p { margin: 4px 0; }

#footer a,
#footer small a { color: #ffff55 !important; }
#footer a:hover { color: #ffff00 !important; }

/* --- 归档标题 --- */
.archive-title {
    color: #ffff55;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 20px;
}

/* --- 404 --- */
.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page h1 { color: #ffff55; }

/* ==================== 响应式 ==================== */
@media (min-width: 769px) {
    .hero-section { padding: 120px 20px; }
    .hero-title { font-size: 56px; text-shadow: 5px 5px 0 #3f3f3f; }
    .hero-subtitle { font-size: 24px; }
    .feature-icon { font-size: 40px; }
}

@media (max-width: 768px) {
    /* 手机端：导航默认隐藏，用汉堡菜单展开（iOS 6 兼容） */
    .navbar-mc {
        overflow: hidden;
    }

    .nav-toggle {
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-flex-shrink: 0;
        flex-shrink: 0;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.98);
        border-bottom: 4px solid #000;
        -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.4);
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
        z-index: 999;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        display: block;
        color: #fff !important;
        -webkit-tap-highlight-color: rgba(255,255,255,0.1);
    }
    .nav-menu a:hover,
    .nav-menu .current a { color: #ffff55 !important; }
    .nav-menu a:active { background: rgba(255,255,255,0.05); }

    .navbar-title {
        font-size: 15px;
        max-width: 140px;
    }

    .hero-content {
        padding: 25px 15px;
    }

    .hero-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .btn-group .mc-btn-brown {
        display: block;
        width: 100%;
        margin: 8px 0;
        text-align: center;
    }

    .mdui-col-md-8,
    .mdui-col-md-4 {
        padding-left: 12px;
        padding-right: 12px;
    }
}
