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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
    height: 100vh;
}

/* 游戏主容器 */
#game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f8f9fa;
}

/* 游戏标题栏 */
#game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e1e5e9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

#game-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* 游戏统计信息 */
#game-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.stat-icon {
    font-size: 16px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 30px;
    text-align: center;
}

/* 游戏时间 */
#game-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#current-time {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

#current-day {
    font-size: 12px;
    color: #666;
}

/* 游戏主界面 */
#game-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 游戏画布容器 */
#game-canvas-container {
    position: relative;
    flex: 1;
    background: #e8f4f8;
    overflow: hidden;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #87CEEB 0%, #98FB98 100%);
    cursor: crosshair;
}

/* 小地图（弹窗式） */
#mini-map {
    position: fixed;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    width: 400px;
    height: 300px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    border: 3px solid #4A90E2;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 1000;
    display: none; /* 默认隐藏 */
}

#mini-map.show {
    display: block;
}

#mini-map-content {
    width: 100%;
    height: calc(100% - 40px);
    background: #f0f8ff;
    position: relative;
}

#mini-map-header {
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    color: white;
    font-weight: bold;
}

#mini-map-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#mini-map-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#mini-map-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: transform 0.2s;
}

#mini-map-toggle:hover {
    transform: scale(1.05);
}

#player-position {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(255, 71, 87, 0.5);
    transform: translate(-50%, -50%);
}

/* 交互提示 */
#interaction-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    z-index: 50;
}

#interaction-hint.hidden {
    display: none;
}

/* 侧边信息面板 */
#info-panel {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid #e1e5e9;
    padding: 20px;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

#info-panel h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

#info-panel p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* NPC列表 */
#npc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.npc-item {
    padding: 8px 12px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    border-left: 3px solid #4A90E2;
    cursor: pointer;
    transition: all 0.2s ease;
}

.npc-item:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: translateX(2px);
}

/* 任务列表 */
#task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    padding: 8px 12px;
    background: rgba(245, 166, 35, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    border-left: 3px solid #F5A623;
    position: relative;
}

.task-item::before {
    content: "📋";
    margin-right: 8px;
}

/* 底部控制栏 */
#game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e1e5e9;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

#control-hints {
    display: flex;
    gap: 20px;
}

#control-hints span {
    font-size: 12px;
    color: #666;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

#action-buttons {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

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

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.large {
    width: 80%;
    height: 80%;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e5e9;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: 60vh;
}

/* 背包网格 */
#inventory-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 10px;
}

.inventory-slot {
    width: 60px;
    height: 60px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inventory-slot:hover {
    border-color: #4A90E2;
    background: rgba(74, 144, 226, 0.1);
}

.inventory-slot.filled {
    border-style: solid;
    border-color: #4A90E2;
    background: white;
}

/* 校园地图 */
#school-map {
    width: 100%;
    height: 100%;
    background: #f0f8ff;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* 对话界面特殊样式 */
#dialog-character {
    display: flex;
    align-items: center;
    gap: 10px;
}

#dialog-avatar {
    width: 40px;
    height: 40px;
    background: #4A90E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

#dialog-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

#dialog-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #4A90E2;
}

#dialog-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialog-choice {
    padding: 12px 16px;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dialog-choice:hover {
    border-color: #4A90E2;
    background: rgba(74, 144, 226, 0.05);
    transform: translateX(5px);
}

/* 设置界面 */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e1e5e9;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.setting-item input[type="range"] {
    width: 150px;
}

.setting-item select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    #info-panel {
        width: 250px;
    }
    
    #game-stats {
        gap: 15px;
    }
    
    .stat-item {
        padding: 4px 8px;
    }
}

@media (max-width: 768px) {
    #game-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    #game-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #game-main {
        flex-direction: column;
    }
    
    #info-panel {
        width: 100%;
        height: 200px;
        order: 2;
    }
    
    #game-canvas-container {
        order: 1;
        height: 60vh;
    }
    
    #mini-map {
        width: 90%;
        height: 250px;
        top: 50%;
        right: 50%;
    }
    
    #mini-map-toggle {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 全屏网页容器样式 */
#fullscreen-web-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}

#fullscreen-web-container:not(.hidden) {
    opacity: 1;
    transform: scale(1);
}

#fullscreen-web-container.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.web-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.web-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

#fullscreen-iframe {
    flex: 1;
    width: 100%;
    height: calc(100vh - 80px);
    border: none;
    background: white;
    overflow: auto;
    display: block;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 快捷菜单按钮样式 */
.quick-menu-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.quick-menu-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.quick-menu-btn:active {
    transform: translateY(-1px);
} 