/* style.css */
body {
    margin: 0; padding: 0;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

#main-menu, #game, #gender-menu {
    max-width: 760px;
    margin: 15px auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, border-color 0.3s;
}

h1 {
    text-align: center;
    margin: 10px 0 15px;
    font-size: 1.8em;
    transition: color 0.3s, text-shadow 0.3s;
}

#status-bar {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 15px; padding: 8px;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.stat { white-space: nowrap; }

#description {
    margin: 15px 0; padding: 12px;
    border-radius: 6px; min-height: 70px;
    font-size: 1em;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.choice, .btn {
    display: block; margin: 8px 0; padding: 14px;
    border: none; border-radius: 8px;
    cursor: pointer; text-align: center;
    width: 100%; font-family: 'Courier New', monospace;
    font-size: 1.1em; transition: all 0.2s;
    min-height: 48px;
}

.btn {
    width: 200px; margin: 12px auto;
    font-size: 1.1em;
}

.map-btn, .journal-btn {
    width: 70px !important;
    padding: 6px !important;
    font-size: 0.85em !important;
}

#lore {
    font-style: italic; margin-top: 15px; line-height: 1.6; text-align: center;
    font-size: 0.95em;
}

/* Кнопки управления — по умолчанию вверху */
#audio-toggle, #theme-toggle {
    position: fixed; top: 10px; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 20px; z-index: 100;
    border-radius: 50%; transition: all 0.3s;
}

#theme-toggle { right: 60px; }
#audio-toggle { right: 10px; }

/* На мобильных — переносим вниз */
@media (max-width: 600px) {
    #audio-toggle, #theme-toggle {
        top: auto;
        bottom: 10px;
        right: 10px;
    }
    #theme-toggle {
        right: 60px;
    }
}

#map-modal, #journal-modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 200;
    justify-content: center; align-items: center;
    flex-direction: column; font-family: monospace;
}

#map-content, #journal-content {
    padding: 20px; border-radius: 10px;
    text-align: left; max-width: 95%; max-height: 90vh;
    overflow-y: auto;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.map-location {
    display: inline-block; width: 80px; height: 30px;
    margin: 4px; line-height: 30px; border-radius: 4px;
    text-align: center; font-size: 0.8em;
    transition: background-color 0.3s, color 0.3s;
}

.quest { margin-bottom: 12px; padding-bottom: 8px; }
.quest-title { font-weight: bold; font-size: 1.05em; }
.journal-entry {
    margin-bottom: 10px; padding-left: 12px;
    font-size: 0.95em;
}

/* Мобильные улучшения */
@media (max-width: 600px) {
    #main-menu, #game, #gender-menu {
        margin: 10px;
        padding: 15px;
    }
    h1 { font-size: 1.6em; }
    .btn { width: 180px; padding: 12px; font-size: 1em; }
    #status-bar { flex-direction: column; align-items: flex-start; }
    .stat, #inventory { width: 100%; }
}