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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #16213e;
    padding: 20px;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #0f3460;
}

.logo {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #0f3460;
    margin-bottom: 20px;
}

.logo h1 {
    color: #e94560;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.logo .subtitle {
    color: #888;
    font-size: 0.9rem;
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-links li {
    margin-bottom: 5px;
}

.nav-links a {
    display: block;
    padding: 12px 15px;
    color: #aaa;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: #0f3460;
    color: #fff;
}

.nav-links a.active {
    background: #e94560;
    color: #fff;
}

.sidebar-footer {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    padding-top: 15px;
    border-top: 1px solid #0f3460;
}

.content {
    margin-left: 260px;
    padding: 40px;
    flex: 1;
    max-width: 900px;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

h1 {
    color: #e94560;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

h2 {
    color: #fff;
    margin: 30px 0 15px;
    font-size: 1.5rem;
    border-bottom: 2px solid #0f3460;
    padding-bottom: 8px;
}

h3 {
    color: #e94560;
    margin-bottom: 10px;
}

p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #ccc;
}

ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #ccc;
}


.intro-box {
    background: linear-gradient(135deg, #0f3460, #16213e);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #e94560;
    margin-bottom: 30px;
}

.intro-box p {
    font-size: 1.1rem;
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #0f3460;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    color: #e94560;
    font-weight: bold;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}


.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    list-style: none;
    margin-left: 0;
}

.feature-list li {
    background: #16213e;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid #e94560;
}

.lore-box {
    background: #16213e;
    padding: 25px;
    border-radius: 12px;
    font-style: italic;
    border: 1px solid #0f3460;
}

.mystery-text {
    color: #888;
    font-style: italic;
}

.wiki-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: #16213e;
    border-radius: 8px;
    overflow: hidden;
}

.wiki-table th, .wiki-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}

.wiki-table th {
    background: #0f3460;
    color: #e94560;
}

.wiki-table tr:last-child td {
    border-bottom: none;
}

.ability-card {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid #0f3460;
}

.effect-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.effect {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.effect.positive {
    background: rgba(100, 255, 100, 0.1);
    border: 1px solid #4a4;
}

.effect.neutral {
    background: rgba(100, 150, 255, 0.1);
    border: 1px solid #66a;
}

.effect h4 {
    color: #fff;
    margin-bottom: 8px;
}

.effect p {
    font-size: 0.9rem;
    margin: 0;
}

.enemy-card {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid #0f3460;
}

.enemy-card.hero-card {
    border-color: #e94560;
    background: linear-gradient(135deg, #16213e, #1a1a2e);
}

.enemy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.enemy-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.enemy-hp {
    background: #e94560;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.enemy-desc {
    margin-bottom: 15px;
}

.enemy-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.enemy-stats span {
    background: #0f3460;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    color: #aaa;
}

.boss-intro {
    font-size: 1.1rem;
    color: #e94560;
}

.boss-stats-box {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e94560;
}

.attack-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.attack {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #0f3460;
}

.attack h3 {
    margin-bottom: 10px;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.item-card {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #0f3460;
}

.item-card h3 {
    margin-bottom: 8px;
}

.item-card p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.drop-rate {
    font-size: 0.8rem;
    color: #888;
    background: #0f3460;
    padding: 4px 10px;
    border-radius: 10px;
}

.item-card.potion.heal { border-left: 3px solid #4a4; }
.item-card.potion.strength { border-left: 3px solid #a44; }
.item-card.potion.speed { border-left: 3px solid #44a; }
.item-card.food { border-left: 3px solid #a84; }

.upgrade-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upgrade-card {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #0f3460;
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.upgrade-header h3 {
    margin: 0;
}

.price {
    background: #e94560;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.upgrade-levels {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.level {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0f3460;
    border: 2px solid #333;
}

.level.filled {
    background: #e94560;
    border-color: #e94560;
}

.max-text {
    color: #888;
    font-size: 0.85rem;
    margin-left: 10px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.control {
    background: #16213e;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.key {
    background: #0f3460;
    padding: 8px 15px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid #333;
    min-width: 50px;
    text-align: center;
}

.action {
    color: #ccc;
}

.tips-list {
    list-style: none;
    margin-left: 0;
}

.tips-list li {
    background: #16213e;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #e94560;
}

.tips-list li strong {
    color: #e94560;
}

@media (max-width: 900px) {
    .sidebar {
        width: 200px;
    }
    .content {
        margin-left: 200px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .effect-grid, .item-grid, .attack-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .content {
        margin-left: 0;
    }
    .controls-grid, .feature-list {
        grid-template-columns: 1fr;
    }
}
