body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'SimSun', '宋体', serif;
    color: white;
}

#bg-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1000;
    background-size: cover;
}

#game-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.5); 
}

#info-panel {
    display: flex;
    justify-content: space-around;
    width: 80%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #4a4a4a;
}

.info-item {
    font-size: 1.2em;
}

#typing-area {
    width: 80%;
    height: 60%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid #4a4a4a;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    font-size: 2em;
    line-height: 1.8;
    overflow-y: auto;
    position: relative;
}

#text-display {
    position: relative;
    white-space: pre-wrap;
    word-break: break-all;
    z-index: 5;
}

#text-display .correct { color: #a5d6a7; }
#text-display .incorrect { color: #ef9a9a; text-decoration: underline; }
#text-display .cursor::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 1.5em;
    background: #ffcc00;
    animation: blink 1s infinite;
}

/* 拼音显示样式 (V2) */
#pinyin-display {
    position: absolute; /* 相对于父容器 typing-area 定位 */
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffcc00;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7em; /* 比正文小一点 */
    border: 1px solid #666;
    z-index: 10;
    display: none; /* 默认隐藏 */
    white-space: nowrap;
    pointer-events: none; /* 确保它不会捕获鼠标事件 */
}

#creatures-display {
    width: 80%;
    margin-bottom: 15px; /* 与下方信息面板的间距 */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* 生灵之间的间距 */
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 2px solid #4a4a4a;
    box-sizing: border-box;
}

.creature {
    width: 45px; 
    height: 45px;
    background-size: contain;
    background-repeat: no-repeat;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.5s ease;
    /* 移除绝对定位 */
}

.creature.saved {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

#controls {
    margin-top: 20px;
}

button, .button {
    padding: 10px 20px;
    font-size: 1.2em;
    background-color: #4a4a4a;
    color: white;
    border: 2px solid #f0e68c;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 10px;
    text-decoration: none;
}

button:hover, .button:hover {
    background-color: #6a6a6a;
}

button:disabled {
    background-color: #333;
    cursor: not-allowed;
    border-color: #555;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #1e1e1e;
    padding: 40px;
    border: 5px solid #f0e68c;
    border-radius: 10px;
    text-align: center;
    width: 50%;
    max-width: 600px;
}

.modal-content img {
    max-width: 200px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.5em;
    margin: 15px 0;
}

.modal-content input {
    width: 80%;
    padding: 10px;
    margin-top: 20px;
    font-size: 1em;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
} 