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

body {
    background-color: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    font-family: 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    padding-top: 20px;
}

#test-buttons {
    position: fixed;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

#test-buttons button {
    padding: 10px 16px;
    background-color: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    text-align: left;
}

#test-buttons button:hover {
    background-color: #2a2a2a;
}

#game-container {
    display: flex;
    gap: 10px;
    width: 1300px;
    height: 720px;
    padding: 10px;
    background-color: #0a0a0a;
}

@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
    
    #game-container {
        display: flex;
        flex-direction: column;
        width: 100vw;
        height: 100vh;
        padding: 5px;
        gap: 5px;
        box-sizing: border-box;
    }
    
    #pc-status-bar {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 10px;
        gap: 10px;
        order: 1;
    }
    
    #pc-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .avatar-eyes {
        top: -10px;
        left: -10px;
        width: 100px;
        height: 100px;
    }
    
    #lost-label {
        font-size: 10px;
    }
    
    #lost-bar-container {
        width: 100px;
        height: 10px;
    }
    
    #axis-label {
        font-size: 10px;
    }
    
    #status-description {
        width: auto;
        min-height: 40px;
        max-height: 40px;
        height: 40px;
        font-size: 10px;
    }
    
    #status-name {
        font-size: 12px;
    }
    
    #status-explanation {
        font-size: 10px;
    }
    
    #mental-axis {
        width: 60px;
        height: 60px;
    }
    
    #mental-axis svg {
        width: 60px;
        height: 60px;
    }
    
    #main-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        order: 2;
    }
    
    #vision-screen {
        flex: 1;
        min-height: 200px;
    }
    
    #dialogue-box {
        height: 80px;
    }
    
    #dialogue-text {
        font-size: 12px;
    }
    
    #npc-profile-bar {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 10px;
        gap: 10px;
        order: 3;
    }
    
    #npc-profile-header {
        display: none;
    }
    
    #npc-list {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }
    
    .npc-item {
        flex: 1;
        max-width: 80px;
        padding: 8px;
        font-size: 10px;
    }
    
    #test-controls {
        position: fixed;
        bottom: 60px;
        right: 5px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    #test-controls button {
        padding: 8px 12px;
        font-size: 10px;
    }
}

#pc-status-bar {
    width: 180px;
    background-color: #000000;
    border: 1px solid #ffffff;
    display: flex;
    flex-direction: column;
    padding: 15px;
    align-items: center;
    flex-shrink: 0;
}

#pc-avatar {
    width: 140px;
    height: 140px;
    background-color: #000000;
    border: 2px solid #ffffff;
    margin-bottom: 10px;
    position: relative;
}

#avatar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.avatar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

#avatar-back1 {
    opacity: 1;
}

#avatar-back2 {
    opacity: 0;
}

#avatar-back3 {
    opacity: 0;
}

.avatar-head {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.avatar-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

#face-normal {
    display: block;
}

#face-normal-close {
    display: block;
    opacity: 0;
}

.avatar-eyes {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 180px;
    height: 180px;
    object-fit: cover;
    display: none;
    z-index: 10;
}

#pc-status-text {
    display: none;
}

#lost-label {
    font-size: 12px;
    color: #ffffff;
    margin-bottom: 5px;
}

#lost-bar-container {
    width: 150px;
    height: 15px;
    background-color: #000000;
    border: 1px solid #ffffff;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    animation: shake 0.1s infinite;
    animation-play-state: paused;
}

@keyframes shake {
    0% { transform: translate(0, 0); }
    25% { transform: translate(calc(-1 * var(--shake-amplitude, 1px)), calc(-0.5 * var(--shake-amplitude, 1px))); }
    50% { transform: translate(var(--shake-amplitude, 1px), 0); }
    75% { transform: translate(calc(-0.5 * var(--shake-amplitude, 1px)), var(--shake-amplitude, 1px)); }
    100% { transform: translate(0, 0); }
}

#lost-bar {
    height: 100%;
    background-color: #ffffff;
    width: 0%;
    transition: width 0.3s;
}

#axis-label {
    font-size: 12px;
    color: #ffffff;
    margin-bottom: 5px;
}

#status-description {
    width: 150px;
    text-align: center;
    margin-bottom: 10px;
    min-height: 80px;
    max-height: 80px;
    height: 80px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    top: 0;
}

#mental-axis {
    width: 140px;
    height: 140px;
    margin: 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#status-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

#status-explanation {
    font-size: 11px;
    line-height: 1.5;
    color: #a0a0a0;
}

#mental-values {
    display: none;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#vision-screen {
    flex: 1;
    background-color: #000000;
    border: 1px solid #ffffff;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

#vision-screen:hover {
    background-color: #1a1a1a;
}

#click-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 16px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#dialogue-box {
    height: 130px;
    background-color: #000000;
    border: 1px solid #ffffff;
    padding: 15px;
}

#dialogue-text {
    font-size: 16px;
    color: #ffffff;
    line-height: 1.6;
    min-height: 60px;
}

#dialogue-choices {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.choice-btn {
    padding: 8px 16px;
    background-color: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.choice-btn:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

#npc-profile-bar {
    width: 180px;
    background-color: #000000;
    border: 1px solid #ffffff;
    display: flex;
    flex-direction: column;
    padding: 15px;
    flex-shrink: 0;
}

#npc-profile-header {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ffffff;
}

#npc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.npc-item {
    padding: 12px;
    background-color: #000000;
    border: 1px solid #ffffff;
    text-align: center;
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s;
}

.npc-item:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}