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

body {
    background: #1a1a2e;
    font-family: 'Courier New', monospace;
    color: #eee;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
}

#game-container {
    border: 4px solid #4a4a6a;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.3);
}

#ui-panel {
    width: 220px;
    background: linear-gradient(180deg, #2a2a4a 0%, #1a1a3a 100%);
    border: 3px solid #4a4a6a;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ui-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #3a3a5a;
}

.ui-section h3 {
    color: #00d4ff;
    font-size: 16px;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.ui-section h4 {
    color: #ffaa00;
    font-size: 14px;
    margin-bottom: 8px;
}

.era-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
}

#boss-status {
    color: #ff4444;
    font-weight: bold;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.hp-bar {
    flex: 1;
    height: 18px;
    background: #333;
    border-radius: 9px;
    overflow: hidden;
    border: 2px solid #555;
}

#hp-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff4444, #ff6666);
    transition: width 0.3s;
    border-radius: 7px;
}

.evolution-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.evo-part {
    font-size: 12px;
    padding: 5px 8px;
    background: rgba(0, 100, 100, 0.3);
    border-radius: 4px;
    border-left: 3px solid #00d4ff;
}

.controls {
    font-size: 12px;
}

.control-item {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

kbd {
    background: #3a3a5a;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #5a5a7a;
    font-size: 11px;
    color: #00ffcc;
}

/* 菜单样式 */
.hidden {
    display: none !important;
}

#evolution-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, #2a2a5a 0%, #1a1a4a 100%);
    border: 4px solid #00d4ff;
    border-radius: 15px;
    padding: 25px;
    z-index: 1000;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
}

.menu-header {
    text-align: center;
    margin-bottom: 20px;
}

.menu-header h2 {
    color: #00ffcc;
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
}

.menu-header p {
    color: #aaa;
    font-size: 14px;
}

.evolution-options {
    display: flex;
    gap: 15px;
    justify-content: space-around;
    margin-bottom: 20px;
}

.evo-category {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #3a3a5a;
}

.evo-category h3 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #ffaa00;
}

.evo-choice {
    background: #2a2a4a;
    border: 2px solid #4a4a6a;
    border-radius: 8px;
    padding: 10px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s;
}

.evo-choice:hover {
    border-color: #00d4ff;
    background: #3a3a5a;
}

.evo-choice.selected {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.evo-choice .name {
    font-weight: bold;
    color: #00ffcc;
    font-size: 13px;
}

.evo-choice .desc {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.evo-choice .cost {
    font-size: 11px;
    color: #ffaa00;
    margin-top: 4px;
}

.menu-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.menu-footer button {
    padding: 12px 30px;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

#confirm-evolution {
    background: linear-gradient(180deg, #00cc66, #009944);
    color: white;
}

#confirm-evolution:hover {
    background: linear-gradient(180deg, #00ff77, #00cc55);
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.5);
}

#cancel-evolution {
    background: #555;
    color: #ccc;
}

#cancel-evolution:hover {
    background: #666;
}

/* BOSS警告 */
#boss-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
    animation: bossFlash 0.5s infinite;
}

@keyframes bossFlash {
    0%, 100% { background: rgba(255, 0, 0, 0.3); }
    50% { background: rgba(255, 0, 0, 0.5); }
}

.boss-content {
    text-align: center;
    animation: bossShake 0.1s infinite;
}

@keyframes bossShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.boss-content h2 {
    color: #ff0000;
    font-size: 48px;
    text-shadow: 0 0 30px #ff0000;
}

/* 时代过渡 */
#era-transition {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.transition-content {
    text-align: center;
    animation: fadeIn 1s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.transition-content h2 {
    color: #00ffcc;
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

.transition-content p {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 30px;
}

#start-new-era {
    padding: 15px 40px;
    font-size: 18px;
    background: linear-gradient(180deg, #00cc66, #009944);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

#start-new-era:hover {
    background: linear-gradient(180deg, #00ff77, #00cc55);
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.5);
}

/* 游戏结束 */
#game-over {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.gameover-content {
    text-align: center;
}

.gameover-content h2 {
    color: #ff4444;
    font-size: 48px;
    margin-bottom: 15px;
}

.gameover-content p {
    font-size: 16px;
    color: #888;
    margin-bottom: 25px;
}

#retry-game {
    padding: 12px 35px;
    font-size: 16px;
    background: #555;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

#retry-game:hover {
    background: #666;
}

/* 开始界面 */
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #0a0a2a 0%, #1a1a4a 50%, #0a2a4a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.start-content {
    text-align: center;
    animation: floatIn 1s;
}

@keyframes floatIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.start-content h1 {
    font-size: 48px;
    color: #00ffcc;
    text-shadow: 0 0 30px rgba(0, 255, 204, 0.5);
    margin-bottom: 10px;
}

.start-content > p {
    font-size: 20px;
    color: #888;
    margin-bottom: 30px;
}

.story-intro {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    max-width: 500px;
}

.story-intro p {
    font-size: 14px;
    color: #aaa;
    margin: 10px 0;
    line-height: 1.6;
}

#start-game {
    padding: 18px 50px;
    font-size: 20px;
    background: linear-gradient(180deg, #00cc66, #009944);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    animation: pulse 2s infinite;
}

#start-game:hover {
    background: linear-gradient(180deg, #00ff77, #00cc55);
    box-shadow: 0 0 30px rgba(0, 255, 100, 0.5);
    transform: scale(1.05);
}
