/* Minecraft主题样式 */

/* ========== Minecraft字体引入 ========== */
@font-face {
    font-family: 'Minecraft';
    src: url('../ttf/minecraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    /* 仅用于英文/数字，避免影响中文（中文走系统默认字体） */
    unicode-range: U+0000-00FF, U+0100-024F, U+2000-206F, U+20A0-20CF;
}

/* 配色方案 */
:root {
    /* Minecraft主色调 */
    --mc-grass-green: #5e8a3a;
    --mc-dirt-brown: #8b5a2b;
    --mc-stone-gray: #7f7f7f;
    --mc-diamond-cyan: #5dade2;
    --mc-gold-yellow: #fcba03;
    --mc-redstone-red: #d63031;
    
    /* 背景色 */
    --bg-dark: #1a1a2e;
    --bg-darker: #0f0f1e;
    --bg-light: #16213e;
    
    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: #c7c7c7;
    --text-gold: #ffd700;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Minecraft', sans-serif;
    overflow: hidden;
    background: var(--bg-darker);
    color: var(--text-primary);
}

/* 像素字体标题 */
.pixel-title {
    font-family: 'Minecraft', sans-serif;
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    line-height: 1.5;
}

/* 数字字体 */
.number-font {
    font-family: 'Minecraft', sans-serif;
}

/* Minecraft按钮 - 使用石头纹理 */
.mc-button {
    position: relative;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    background: url('../textures/blocks/stone.png') center/cover, linear-gradient(180deg, #7f7f7f 0%, #565656 100%);
    border: 3px solid #000;
    border-radius: 0;
    box-shadow:
        inset -3px -3px 0 rgba(0, 0, 0, 0.5),
        inset 3px 3px 0 rgba(255, 255, 255, 0.3),
        0 4px 0 #000;
    cursor: pointer;
    transition: all 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    image-rendering: pixelated;
}

.mc-button:hover {
    background: url('../textures/blocks/stone.png') center/cover, linear-gradient(180deg, #9f9f9f 0%, #767676 100%);
    transform: translateY(1px);
    box-shadow:
        inset -3px -3px 0 rgba(0, 0, 0, 0.5),
        inset 3px 3px 0 rgba(255, 255, 255, 0.3),
        0 3px 0 #000;
}

.mc-button:active {
    transform: translateY(4px);
    box-shadow:
        inset -3px -3px 0 rgba(0, 0, 0, 0.5),
        inset 3px 3px 0 rgba(255, 255, 255, 0.3);
}

.mc-button.secondary {
    background: url('../textures/blocks/grass_side_carried.png') center/cover, linear-gradient(180deg, #5e8a3a 0%, #3d5a26 100%);
}

.mc-button.secondary:hover {
    background: url('../textures/blocks/grass_side_carried.png') center/cover, linear-gradient(180deg, #6fa044 0%, #4d6a30 100%);
}

/* Minecraft输入框 */
.mc-input-box input {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    font-family: 'Minecraft', 'Courier New', monospace;
    color: #00ff00;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #333;
    border-radius: 0;
    box-shadow:
        inset 0 0 10px rgba(0, 255, 0, 0.2),
        0 0 20px rgba(0, 255, 0, 0.1);
    outline: none;
    transition: all 0.3s ease;
}

.mc-input-box input:focus {
    border-color: #00ff00;
    box-shadow: 
        inset 0 0 10px rgba(0, 255, 0, 0.3),
        0 0 30px rgba(0, 255, 0, 0.3);
}

.mc-input-box input::placeholder {
    color: #006600;
}

/* Minecraft方块装饰 */
.mc-block {
    width: 60px;
    height: 60px;
    position: absolute;
    background-size: cover;
    image-rendering: pixelated;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.mc-block.grass {
    background: url('../textures/blocks/grass_side_carried.png') center/cover;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.mc-block.diamond {
    background: url('../textures/blocks/diamond_block.png') center/cover;
    top: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

.mc-block.stone {
    background: url('../textures/blocks/stone.png') center/cover;
    bottom: 15%;
    right: 10%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Minecraft粒子效果 */
.mc-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.mc-particles::before,
.mc-particles::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(94, 138, 58, 0.5);
    animation: particle-fall 8s linear infinite;
}

.mc-particles::before {
    left: 20%;
    animation-delay: 0s;
}

.mc-particles::after {
    left: 80%;
    animation-delay: 4s;
}

@keyframes particle-fall {
    0% {
        top: -10px;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Minecraft加载方块 */
.mc-loading-cube {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #7f7f7f 0%, #565656 100%);
    border: 3px solid #000;
    margin: 0 auto 20px;
    animation: cube-spin 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(127, 127, 127, 0.5);
}

@keyframes cube-spin {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(90deg) scale(1.1);
    }
    50% {
        transform: rotate(180deg) scale(1);
    }
    75% {
        transform: rotate(270deg) scale(1.1);
    }
}

/* 错误提示 - Minecraft风格 */
.error-message {
    padding: 15px 25px;
    background: rgba(214, 48, 49, 0.2);
    border: 3px solid var(--mc-redstone-red);
    color: var(--mc-redstone-red);
    font-weight: 700;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 0 20px rgba(214, 48, 49, 0.3);
}

/* 加载动画容器 */
.loading-spinner {
    text-align: center;
    margin-top: 30px;
}

.loading-spinner p {
    color: var(--text-secondary);
    margin-top: 10px;
}

/* 页面标题通用样式 */
.page-title {
    font-size: clamp(1.5rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    color: var(--text-gold);
}

/* 统计卡片 - 透明悬浮卡片 */
.stat-card-big {
    background: rgba(94, 138, 58, 0.15);
    border: 3px solid rgba(94, 138, 58, 0.5);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stat-card-big:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    background: rgba(94, 138, 58, 0.25);
    border-color: rgba(94, 138, 58, 0.7);
}

.stat-card-big .stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-card-big .stat-value-big {
    font-family: 'Minecraft', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--text-gold);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    margin: 10px 0;
}

.stat-card-big .stat-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 活动卡片 */
.activity-card {
    background: url('../textures/blocks/diamond_block.png') center/cover, linear-gradient(135deg, rgba(252, 186, 3, 0.1) 0%, rgba(252, 186, 3, 0.05) 100%);
    background-blend-mode: overlay;
    border: 3px solid rgba(252, 186, 3, 0.3);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    image-rendering: pixelated;
}

.activity-card[data-delay="0"] { animation-delay: 0s; }
.activity-card[data-delay="100"] { animation-delay: 0.1s; }
.activity-card[data-delay="200"] { animation-delay: 0.2s; }
.activity-card[data-delay="300"] { animation-delay: 0.3s; }

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--mc-diamond-cyan);
}

.activity-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.activity-card .card-value {
    font-family: 'Minecraft', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-gold);
    margin: 10px 0;
}

/* “开始我的旅程”按钮：鼠标悬停（未按下）时变绿色 */
#startJourneyBtn:hover {
    background: url('../textures/blocks/grass_side_carried.png') center/cover, linear-gradient(180deg, #6fa044 0%, #3d5a26 100%);
    box-shadow:
        inset -3px -3px 0 rgba(0, 0, 0, 0.5),
        inset 3px 3px 0 rgba(255, 255, 255, 0.3),
        0 4px 0 #000,
        0 0 22px rgba(0, 255, 0, 0.35);
}

/* 键盘聚焦仍给出清晰的绿色描边 */
#startJourneyBtn:focus-visible {
    outline: 3px solid #00ff00;
    outline-offset: 2px;
}

.activity-card .card-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 烟花效果 */
.fireworks {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.fireworks::before,
.fireworks::after {
    content: '✨';
    position: absolute;
    font-size: 2rem;
    animation: firework 2s ease-out infinite;
}

.fireworks::before {
    left: 30%;
    animation-delay: 0s;
}

.fireworks::after {
    left: 70%;
    animation-delay: 1s;
}

@keyframes firework {
    0% {
        bottom: 0;
        opacity: 1;
        transform: scale(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        bottom: 100%;
        opacity: 0;
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pixel-title {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .mc-button {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .mc-block {
        width: 40px;
        height: 40px;
    }
    
    .stat-card-big .stat-value-big {
        font-size: 2rem;
    }
    
    .activity-card .card-value {
        font-size: 2rem;
    }
}
