* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-color: #8181816e #00000000;
    scrollbar-width: thin;
}

body {
    font-family: 'Courier', monospace;
    background: #000;
    color: #fff;
    overflow: hidden;
}

/* Default */
input {
    padding: 4px;
}
button {
    padding: 4px 10px;
    cursor: pointer;
}
/* /Default */

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.screen.active {
    display: block;
}

.menu-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url(../assets/ui/bg.gif);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.4;
}

.menu-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 14px;
    backdrop-filter: blur(2px);
}

.game-title {
    font-size: 3.4em;
    color: #8e0000e0;
    text-shadow: 0 0 10px #e94560, 0 0 20px #e94560;
    margin-bottom: 0.6em;
    animation: glow 2s
    ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #e94560; }
    to { text-shadow: 0 0 20px #e94560, 0 0 30px #e94560; }
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.menu-btn {
    padding: 12px 50px;
    font-size: 1.2em;
    background: url(../assets/ui/btn-bg.png);
    background-size: 100% 38px;
    background-repeat: no-repeat;
    background-position: center;
    border: 0;
    color: white;
    cursor: pointer;
    transition: all 0.3s
    ease;
    font-family: 'Courier New', monospace;
}

.menu-btn:hover {
    background: url(../assets/ui/btn-bg-hover-2.png);
    background-size: 100% 38px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Игровой экран */
#game-screen {
    background: #000;
}

.scene-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease;
}

.characters-container {
    position: absolute;
    width: 100%;
    height: 70%;
    bottom: 30%;
}

.character {
    position: absolute;
    bottom: 0;
    transition: all 0.5s ease;
    background-repeat: no-repeat;
    width: 50%;
    height: 66%;
    max-height: 80%;
}

.dialogue-box {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid #e94560;
    padding: 1em;
    min-height: 30%;
}

.character-name {
    color: #e94560;
    font-size: 1.2em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.dialogue-text {
    font-size: 1.1em;
    line-height: 1.4;
    min-height: 3em;
}

.continue-indicator {
    position: absolute;
    right: 1em;
    bottom: 1em;
    animation: bounce 1s infinite;
    color: #e94560;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.choices-container {
    position: absolute;
    bottom: 30%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    padding: 1em;
}

.choice-btn {
    padding: 1em 2em;
    background: rgba(233, 69, 96, 0.3);
    border: 1px solid #e94560;
    color: white;
    cursor: pointer;
    width: 80%;
    max-width: 500px;
    text-align: center;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    background: rgba(233, 69, 96, 0.6);
}

.game-menu {
    position: absolute;
    top: 1em;
    right: 1em;
    display: none;
    flex-direction: column;
    gap: 0.5em;
    background: rgba(0, 0, 0, 0.9);
    padding: 1em;
    border: 1px solid #e94560;
}

/* Настройки */
.settings-group {
    /*margin: 1em 0;*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 400px; /* Увеличили ширину */
    padding: 0.5em;
    background: rgba(233, 69, 96, 0.1);
    border-radius: 5px;
}

.settings-group label {
    margin-right: 1em;
    min-width: 150px;
}

.settings-group input[type="range"] {
    flex: 1;
}

.settings-group span {
    min-width: 50px;
    text-align: right;
}

/* Стили для улучшенного редактора */
.editor-header {
    background: #000;
    padding: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e94560;
}

.save-indicator {
    position: absolute;
    padding: 0.5em 1em;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    left: 50%;
}

.save-indicator.saved {
    background: #2d5a2d;
    color: #90ee90;
}

.save-indicator.unsaved {
    background: #8b4513;
    color: #ffa500;
    animation: pulse 2s infinite;
}

.editor-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1em 1.5em;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    max-width: 300px;
    transition: opacity 0.3s ease;
}

.editor-notification.success {
    background: #2d5a2d;
    border-left: 4px solid #90ee90;
}

.editor-notification.error {
    background: #8b0000;
    border-left: 4px solid #ff6b6b;
}

.editor-notification.info {
    background: #1a3d5f;
    border-left: 4px solid #4a90e2;
}

.scenes-stats {
    background: rgba(233, 69, 96, 0.2);
    padding: 0.5em 1em;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.scene-item {
    padding: 1em;
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid #e94560;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scene-item:hover {
    background: rgba(233, 69, 96, 0.3);
    transform: translateX(5px);
}

.scene-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scene-details {
    font-size: 0.8em;
    opacity: 0.7;
}

.form-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5em;
    margin: 1em 0;
    border-radius: 8px;
    border-left: 4px solid #e94560;
}

.form-section h4 {
    color: #e94560;
    margin-bottom: 1em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.form-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1em;
    margin: 0.5em 0;
    border-radius: 5px;
    border: 1px solid rgba(233, 69, 96, 0.3);
}

.form-item hr {
    margin-top: 1rem;
}

.form-row {
    display: flex;
    gap: 1em;
    align-items: center;
}

.form-row .form-group {
    flex: 1;
    margin: 0;
}

.btn-primary {
    background: linear-gradient(45deg, #e94560, #ff6b81);
    color: white;
    padding: 0.8em 1.5em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-secondary {
    background: #1a3d5f;
    color: white;
    padding: 0.8em 1.5em;
    border: 1px solid #4a90e2;
    border-radius: 5px;
    cursor: pointer;
}

.btn-danger {
    background: #8b0000;
    color: white;
    padding: 0.8em 1.5em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-danger.small {
    padding: 0.3em 0.6em;
    font-size: 0.8em;
}

.btn-info {
    background: #2d5a2d;
    color: white;
    padding: 0.8em 1.5em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.add-btn {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    padding: 0.5em 1em;
    border: 1px dashed #e94560;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5em;
}

.add-btn:hover {
    background: rgba(233, 69, 96, 0.4);
}

.choices-list {
    margin-top: 0.5em;
}

.choice-item {
    background: rgba(233, 69, 96, 0.1);
    padding: 0.8em;
    margin: 0.3em 0;
    border-radius: 3px;
    border-left: 3px solid #e94560;
}

.form-actions {
    display: flex;
    gap: 1em;
    justify-content: center;
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid rgba(233, 69, 96, 0.3);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Редактор */
#scene-editor {
    background: #000;
    color: white;
}

.editor-container {
    display: flex;
    height: calc(100% - 60px);
}

.scenes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 360px;
    background: #000;
    border-right: 2px solid #e94560;
    padding: 1em;
    scrollbar-color: #8181816e #00000000;
    scrollbar-width: thin;
    overflow-y: auto;
}

#scenes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scene-editor {
    flex: 1;
    padding: 1em;
    scrollbar-color: #8181816e #00000000;
    scrollbar-width: thin;
    overflow-y: auto;
}

.scene-item {
    padding: 0.5em;
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid #e94560;
    cursor: pointer;
}

.scene-item:hover {
    background: rgba(233, 69, 96, 0.4);
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1em;
    gap: 0.5em;
}

.form-group label {
    font-weight: bold;
    color: #e94560;
}

.form-group input, .form-group textarea, .form-group select {
    padding: 0.5em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #e94560;
    color: white;
    font-family: 'Courier New', monospace;
}

.dialogue-item {
    border: 1px solid #e94560;
    padding: 1em;
    margin: 0.5em 0;
    background: rgba(233, 69, 96, 0.1);
}

.save-slots {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin: 1em 0;
}

.save-slot {
    padding: 1em;
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid #e94560;
    cursor: pointer;
    text-align: left;
}

.save-slot:hover {
    background: rgba(233, 69, 96, 0.4);
}

.save-info {
    display: flex;
    justify-content: space-between;
}

.main-info {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    bottom: 0;
    padding: 8px;
    opacity: 0.2;
    z-index: 999999999;
}
.copy {
    font-size: 12px;
}
.fullscreen {
    display: block;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

@media (max-width: 460px) {
    .game-title {
        font-size: 2.2em;
        margin-bottom: 1em;
    }
    .menu-btn {
        display: flex;
        font-size: 1em;
        align-items: center;
        justify-content: center;
    }

    #settings-menu h2 {
        margin-bottom: 1rem;
    }
    .settings-group {
        margin: 0;
        width: 100%;
        padding: 1em;
    }
    .settings-group label {
        margin-right: 0;
        min-width: unset;
    }
    .settings-group input[type="range"] {
        flex: 1;
        margin: 0;
    }
    #settings-menu .menu-content {
        padding: 0 1rem;
    }
    .settings-group span {
        min-width: unset;
        text-align: right;
    }

    .choice-btn {
        padding: 0.4em 1em;
    }
    .about-content p {
        padding: 0 12px;
    }
}