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

body {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    /* 暗色像素人字拼花地板 - 真正的人字形 - 超大版 */
    background-color: #1a1a2e;
    background-image:
        /* 人字形 - 第一行向右 */
        linear-gradient(45deg, #2a2a4e 150px, transparent 150px),
        linear-gradient(-45deg, #252547 150px, transparent 150px),
        /* 人字形 - 第二行向左（错位） */
        linear-gradient(45deg, #252547 150px, transparent 150px),
        linear-gradient(-45deg, #2a2a4e 150px, transparent 150px),
        /* 木纹间隙 */
        linear-gradient(90deg,
            rgba(0, 0, 0, 0.15) 10px,
            transparent 10px
        ),
        linear-gradient(0deg,
            rgba(0, 0, 0, 0.1) 10px,
            transparent 10px
        );
    background-position:
        0 0, 0 0,
        150px 150px, 150px 150px,
        0 0, 0 0;
    background-size:
        300px 300px, 300px 300px,
        300px 300px, 300px 300px,
        150px 150px, 150px 150px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    overflow: hidden;
    position: relative;
}

/* 镂空像素文字 */
body::before {
    content: "Ich's Birthday";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    font-family: 'Press Start 2P', monospace;
    color: transparent;
    /* 镂空效果 - 使用文字描边创建轮廓 */
    -webkit-text-stroke: 3px rgba(30, 30, 60, 0.3);
    text-stroke: 3px rgba(30, 30, 60, 0.3);
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
    letter-spacing: 10px;
}

.container {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow:
        4px 4px 0 #ff6b6b,
        -2px -2px 0 #4ecdc4;
    letter-spacing: 4px;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#pixelCanvas {
    border: 8px solid #ffd700;
    border-radius: 4px;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0 auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    max-width: 95vw;
    max-height: 90vh;
    touch-action: none; /* 防止触摸时的默认滚动行为 */
}

#pixelCanvas:hover {
    box-shadow:
        0 0 50px rgba(255, 215, 0, 0.6),
        0 0 80px rgba(255, 215, 0, 0.3),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
}

/* 移动设备横屏优化 */
@media (max-width: 1024px) and (orientation: landscape) {
    #pixelCanvas {
        max-height: 85vh;
        border-width: 6px;
    }

    body::before {
        font-size: 8vw;
        -webkit-text-stroke: 2px rgba(30, 30, 60, 0.3);
        text-stroke: 2px rgba(30, 30, 60, 0.3);
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    body::before {
        font-size: 6vw;
        letter-spacing: 5px;
    }
}

.controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 12px;
    padding: 12px 20px;
    background: linear-gradient(180deg, #4ecdc4 0%, #44a08d 100%);
    border: 4px solid #fff;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 2px 2px 0 #000;
    box-shadow:
        4px 4px 0 #000,
        inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}

button:hover {
    transform: translate(-2px, -2px);
    box-shadow:
        6px 6px 0 #000,
        inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translate(2px, 2px);
    box-shadow:
        2px 2px 0 #000,
        inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}

.hint {
    margin-top: 15px;
    font-size: 10px;
    color: #aaa;
    letter-spacing: 1px;
}

/* 像素字体导入 */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
