/* 原始游戏模拟器样式 */
body {
    margin: 0;
    padding: 0;
    background: #1b1919;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.4em;
    color: #8a8a8a;
    overflow-x: auto; /* 允许水平滚动 */
}

a {
    color: #8a8a8a;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

/* 包装器样式 */
#templatemo_wrapper_outer {
    width: 100%;
    background: #272525;
    min-height: 100vh;
}

#templatemo_wrapper_inner {
    width: 1400px;
    margin: 0 auto;
    background: #1b1919;
    transition: width 0.3s ease; /* 平滑过渡 */
}

/* 横幅样式 */
#templatemo_banner {
    width: 980px;
    height: 100px;
    background: url(../images/templatemo_banner.jpg) no-repeat;
}

/* 菜单样式 */
#templatemo_menu {
    width: 980px;
    height: 40px;
    background: #272525;
}

#templatemo_menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#templatemo_menu ul li {
    float: left;
    margin: 0;
    padding: 0;
}

#templatemo_menu ul li a {
    display: block;
    padding: 12px 20px;
    color: #8a8a8a;
    text-decoration: none;
    border-right: 1px solid #1b1919;
}

#templatemo_menu ul li a:hover,
#templatemo_menu ul li a.current {
    color: #ffffff;
    background: #1b1919;
}

/* 内容包装器 */
#templatemo_content_wrapper {
    width: 100%;
    padding: 20px 0;
    overflow: hidden;
}

/* 侧边栏样式 */
.templatemo_side_bar {
    float: left;
    width: 260px;
    padding: 0 20px;
    transition: width 0.3s ease; /* 平滑过渡 */
    box-sizing: border-box;
}

.margin_right_10 {
    margin-right: 10px;
}

.header_01 {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin: 20px 0 10px 0;
    padding: 5px 0;
    border-bottom: 1px solid #333333;
}

.templatemo_side_bar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.templatemo_side_bar ul li {
    margin: 0;
    padding: 5px 0;
    border-bottom: 1px solid #333333;
}

.templatemo_side_bar ul li a {
    color: #8a8a8a;
    text-decoration: none;
}

.templatemo_side_bar ul li a:hover {
    color: #ffffff;
}

/* 游戏区域样式 */
.templatemo_play {
    float: left;
    width: 720px;
    padding: 0 25px;
    text-align: center;
    transition: width 0.3s ease; /* 平滑过渡 */
    box-sizing: border-box;
}

/* 模拟器样式 */
#emulator {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

/* 游戏画面大小控制 */
.nes-screen {
    width: 512px !important;
    height: 480px !important;
    margin: 20px 0;
    transition: all 0.3s ease;
    image-rendering: pixelated;
    -moz-crisp-edges: crisp-edges;
    -webkit-crisp-edges: crisp-edges;
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nes-screen.normal {
    width: 256px !important;
    height: 240px !important;
}

.nes-screen.large {
    width: 512px !important;
    height: 480px !important;
}

.nes-screen.xlarge {
    width: 768px !important;
    height: 720px !important;
}

/* 隐藏JSNESUI的原始放大缩小按钮 */
.nes-controls input[value="放大"],
.nes-controls input[value="缩小"],
.nes-controls input[value="Zoom"],
.nes-controls input[value="Unzoom"] {
    display: none !important;
}

/* 确保暂停和声音控制按钮可见 */
.nes-controls input[value="暂停&继续"],
.nes-controls input[value="重新开始"],
.nes-controls input[value="打开&关闭声音"],
.nes-controls input[value="Pause"],
.nes-controls input[value="Reset"],
.nes-controls input[value="Sound"] {
    display: inline-block !important;
}

.nes-controls {
    margin: 20px 0;
    text-align: center;
}

.nes-controls input[type="button"] {
    padding: 10px 18px;
    margin: 0 8px;
    background: rgba(100, 181, 246, 0.1);
    border: 1px solid rgba(100, 181, 246, 0.3);
    color: #64b5f6;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
}

.nes-controls input[type="button"]:hover {
    background: rgba(100, 181, 246, 0.2);
    border-color: rgba(100, 181, 246, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.nes-controls input[type="button"]:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nes-status {
    margin: 10px 0;
    color: #8a8a8a;
    font-style: italic;
}

.nes-roms {
    margin: 20px 0;
}

.nes-roms select {
    padding: 8px;
    background: #272525;
    border: 1px solid #333333;
    color: #8a8a8a;
    border-radius: 3px;
    width: 300px;
}

.nes-roms select:focus {
    outline: none;
    border-color: #555555;
}

/* 画面设置区域样式 */
.zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.zoom-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #b0bec5;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
    text-align: center;
}

.zoom-btn:hover {
    background: rgba(100, 181, 246, 0.2);
    border-color: rgba(100, 181, 246, 0.4);
    color: #ffffff;
}

.zoom-btn.active {
    background: rgba(100, 181, 246, 0.3);
    border-color: #64b5f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(100, 181, 246, 0.3);
}

/* 响应式设计 */
@media (max-width: 1000px) {
    #templatemo_wrapper_inner {
        width: 100%;
    }
    
    .templatemo_side_bar {
        float: none;
        width: auto;
        margin-bottom: 20px;
    }
    
    .templatemo_play {
        float: none;
        width: auto;
    }
    
    .templatemo_game_list {
        float: none;
        width: auto;
        margin-top: 20px;
    }
}

/* 确保三栏布局在不同尺寸下都能正确显示 */
@media (max-width: 1400px) {
    .templatemo_game_list {
        width: 440px;
    }
}

@media (max-width: 1200px) {
    .templatemo_game_list {
        width: 400px;
    }
}

@media (max-width: 1000px) {
    .templatemo_game_list {
        width: auto;
    }
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1b1919;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 6px;
    border: 2px solid #1b1919;
}

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

::-webkit-scrollbar-corner {
    background: #1b1919;
}

/* 确保内容在容器内正确显示 */
#templatemo_content_wrapper {
    box-sizing: border-box;
}

.templatemo_side_bar,
.templatemo_play {
    box-sizing: border-box;
}

/* 游戏画面容器优化 */
#emulator {
    box-sizing: border-box;
    max-width: 100%;
}

/* 确保放大按钮在侧边栏中正确显示 */
.zoom-controls {
    box-sizing: border-box;
}

.zoom-btn {
    box-sizing: border-box;
    word-wrap: break-word;
}

/* 游戏列表区域样式 */
.templatemo_game_list {
    float: left;
    width: 480px;
    padding: 0 20px;
    transition: width 0.3s ease;
    box-sizing: border-box;
}

/* 游戏分类样式 */
.game-categories {
    max-height: 650px;
    overflow-y: auto;
    padding-right: 10px;
}

.game-category {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
}

.game-category h3 {
    color: #64b5f6;
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-item {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #b0bec5;
    cursor: pointer;
    font-size: 11px;
    line-height: 1.3;
    transition: all 0.3s ease;
    word-wrap: break-word;
}

.game-item:hover {
    background: rgba(100, 181, 246, 0.2);
    border-color: rgba(100, 181, 246, 0.4);
    color: #ffffff;
    transform: translateX(5px);
}

.game-item.active {
    background: rgba(100, 181, 246, 0.3);
    border-color: #64b5f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(100, 181, 246, 0.3);
}

/* 游戏列表滚动条样式 */
.game-categories::-webkit-scrollbar {
    width: 8px;
}

.game-categories::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.game-categories::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.game-categories::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 清理器 */
.cleaner {
    clear: both;
    width: 100%;
    height: 0;
    font-size: 0;
    line-height: 0;
}

/* 页脚样式 */
#templatemo_footer {
    width: 980px;
    padding: 20px;
    text-align: center;
    background: #272525;
    border-top: 1px solid #333333;
}

.margin_bottom_10 {
    height: 10px;
    clear: both;
}

/* 美化样式 */
.templatemo_side_bar,
.templatemo_play,
.templatemo_game_list {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    margin: 0 5px;
}

.templatemo_side_bar {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.templatemo_play {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.templatemo_game_list {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 游戏画面容器美化 */
#emulator {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

/* 标题样式优化 */
.header_01 {
    background: linear-gradient(135deg, #64b5f6, #1976d2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(100, 181, 246, 0.3);
}

/* 按钮悬停效果增强 */
.zoom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.4);
}

/* 游戏项悬停效果增强 */
.game-item:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 自定义选择器样式 */
::selection {
    background: rgba(100, 181, 246, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(100, 181, 246, 0.3);
    color: #ffffff;
}

