/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
}

/* VN容器 */
.vn-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #2c3e50;
    position: relative;
}

/* 游戏标题区域 */
.vn-header {
    height: 80px;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #3498db;
    z-index: 100;
}

.vn-header h1 {
    font-size: 2rem;
    color: #3498db;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

/* 游戏主区域 */
.vn-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* 场景背景 */
.scene-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.scene {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
    /* 默认场景 */
    background-image: linear-gradient(to bottom, #27ae60, #16a085);
}

/* 不同场景样式 */
.scene.forest {
    background-image: 
        linear-gradient(rgba(39, 174, 96, 0.8), rgba(22, 160, 133, 0.8)),
        radial-gradient(circle at 20% 80%, #3498db 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #f39c12 0%, transparent 50%);
}

.scene.cave {
    background-image: 
        linear-gradient(rgba(127, 140, 141, 0.9), rgba(52, 73, 94, 0.9)),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.scene.river {
    background-image: 
        linear-gradient(rgba(52, 152, 219, 0.8), rgba(41, 128, 185, 0.8)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0px, rgba(255, 255, 255, 0.1) 10px, transparent 10px, transparent 20px);
}

.scene.sunset {
    background-image: 
        linear-gradient(to bottom, #e74c3c, #f39c12, #3498db);
}

.scene.festival {
    background-image: 
        linear-gradient(rgba(243, 156, 18, 0.8), rgba(231, 76, 60, 0.8)),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 0, 0.6) 0%, transparent 40%),
        radial-gradient(circle at 30% 70%, rgba(255, 105, 180, 0.5) 0%, transparent 30%),
        radial-gradient(circle at 70% 30%, rgba(0, 255, 255, 0.5) 0%, transparent 30%);
    animation: festivalGlow 3s ease-in-out infinite alternate;
}

@keyframes festivalGlow {
    0% {
        background-image: 
            linear-gradient(rgba(243, 156, 18, 0.8), rgba(231, 76, 60, 0.8)),
            radial-gradient(circle at 50% 50%, rgba(255, 255, 0, 0.6) 0%, transparent 40%),
            radial-gradient(circle at 30% 70%, rgba(255, 105, 180, 0.5) 0%, transparent 30%),
            radial-gradient(circle at 70% 30%, rgba(0, 255, 255, 0.5) 0%, transparent 30%);
    }
    100% {
        background-image: 
            linear-gradient(rgba(231, 76, 60, 0.8), rgba(243, 156, 18, 0.8)),
            radial-gradient(circle at 50% 50%, rgba(255, 255, 0, 0.8) 0%, transparent 45%),
            radial-gradient(circle at 30% 70%, rgba(255, 105, 180, 0.7) 0%, transparent 35%),
            radial-gradient(circle at 70% 30%, rgba(0, 255, 255, 0.7) 0%, transparent 35%);
    }
}

/* 角色显示 */
.characters-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 50px 0 50px;
}

.character {
    width: 300px;
    height: 80%;
    position: relative;
    transition: all 0.5s ease-in-out;
    opacity: 0;
}

.character.left {
    transform: translateX(-100px);
}

.character.center {
    transform: translateY(50px);
}

.character.right {
    transform: translateX(100px);
}

.character.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* 福瑞角色样式 */
/* 狼兽人 */
.character.wolf {
    background: transparent;
}

.character.wolf::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 200px;
    background: linear-gradient(to bottom, #8B4513, #A0522D);
    border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* 狼耳朵 */
.character.wolf::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 100px;
    background: transparent;
}

.character.wolf::after::before,
.character.wolf::after::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 120px;
    background: linear-gradient(to bottom, #8B4513, #A0522D);
    border-radius: 60% 40% 0 0 / 80% 60% 0 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.character.wolf::after::before {
    left: 0;
    transform: rotate(-20deg);
}

.character.wolf::after::after {
    right: 0;
    transform: rotate(20deg);
}

/* 狐兽人 */
.character.fox {
    background: transparent;
}

.character.fox::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 190px;
    background: linear-gradient(to bottom, #FF8C00, #FF4500);
    border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* 狐狸耳朵 */
.character.fox::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 120px;
    background: transparent;
}

.character.fox::after::before,
.character.fox::after::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 140px;
    background: linear-gradient(to bottom, #FF8C00, #FF4500);
    border-radius: 70% 30% 0 0 / 90% 70% 0 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.character.fox::after::before {
    left: 0;
    transform: rotate(-25deg);
}

.character.fox::after::after {
    right: 0;
    transform: rotate(25deg);
}

/* 猫兽人 */
.character.cat {
    background: transparent;
}

.character.cat::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 180px;
    background: linear-gradient(to bottom, #C0C0C0, #A9A9A9);
    border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* 猫耳朵 */
.character.cat::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    height: 110px;
    background: transparent;
}

.character.cat::after::before,
.character.cat::after::after {
    content: '';
    position: absolute;
    width: 65px;
    height: 130px;
    background: linear-gradient(to bottom, #C0C0C0, #A9A9A9);
    border-radius: 80% 20% 0 0 / 90% 80% 0 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.character.cat::after::before {
    left: 0;
    transform: rotate(-30deg);
}

.character.cat::after::after {
    right: 0;
    transform: rotate(30deg);
}

/* 对话和选项区域 */
.vn-footer {
    height: 250px;
    background-color: rgba(0, 0, 0, 0.8);
    border-top: 2px solid #3498db;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

/* 对话文本框 */
.dialogue-container {
    flex: 1;
    background-color: rgba(52, 152, 219, 0.1);
    border: 1px solid #3498db;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.character-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #3498db;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.dialogue-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ecf0f1;
    flex: 1;
    overflow-y: auto;
}

/* 选项按钮 */
.choices-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-btn {
    padding: 12px 24px;
    font-size: 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.choice-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.choice-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 游戏控制 */
.game-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.control-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    background-color: rgba(52, 152, 219, 0.3);
    color: white;
    border: 1px solid #3498db;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.control-btn:hover {
    background-color: rgba(52, 152, 219, 0.5);
    transform: translateY(-1px);
}

.control-btn:active {
    transform: translateY(0);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.7);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .vn-header h1 {
        font-size: 1.5rem;
    }
    
    .characters-container {
        padding: 0 20px 0 20px;
    }
    
    .character {
        width: 200px;
    }
    
    .vn-footer {
        height: 300px;
    }
    
    .dialogue-text {
        font-size: 1rem;
    }
    
    .choices-container {
        flex-direction: column;
        align-items: center;
    }
    
    .choice-btn {
        width: 80%;
    }
}