/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}
.wheel-timer {
    margin-top: 20px;
    font-size: 1.2rem;
    color: gold;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    border: 1px solid #555;
}

.wheel-container {
    position: relative;
}

#spin-wheel-btn.hidden {
    display: none;
}
.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.screen .background {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.5);
    z-index: -1;
}

.screen .content {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Главное меню */
#main-menu h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    color: #fff;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.menu-options button {
    padding: 15px;
    font-size: 1.2rem;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.menu-options button:hover {
    background-color: #444;
    transform: translateY(-2px);
}

.menu-options button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.currency-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-top: 20px;
}

.currency-display #game-currency {
    display: flex;
    align-items: center;
    gap: 5px;
}

.currency-display #buy-currency-btn {
    background-color: #444;
    border: none;
    color: gold;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.currency-display #buy-currency-btn:hover {
    background-color: #555;
    transform: scale(1.1);
}

/* Экран сохранений/загрузки */
.save-slots {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.save-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
}

.slot-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slot-number {
    font-weight: bold;
    font-size: 1.1rem;
}

.slot-date {
    font-size: 0.9rem;
    color: #aaa;
}

.slot-chapter {
    font-size: 0.9rem;
    color: #ccc;
}

.slot-action-btn {
    padding: 8px 15px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slot-action-btn:hover {
    background-color: #444;
}

.back-btn {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-btn:hover {
    background-color: #444;
}

/* Экран глав */
.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.chapter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chapter:hover {
    background-color: #333;
}

.chapter.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Экран настроек */
.settings-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.setting {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting label {
    font-size: 1rem;
    color: #ccc;
}

.setting input[type="range"] {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    background: #333;
    border-radius: 5px;
    outline: none;
}

.setting input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.setting input[type="checkbox"] {
    margin-right: 10px;
}

/* Экран достижений */
.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
}

.achievement i {
    font-size: 2rem;
    color: #555;
}

.achievement.unlocked i {
    color: gold;
}

.achievement-info h3 {
    color: #fff;
    margin-bottom: 5px;
}

.achievement-info p {
    color: #aaa;
    font-size: 0.9rem;
}

.achievement.locked .achievement-desc {
    font-style: italic;
}

/* Колесо фортуны */
.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.wheel {
    width: 300px;
    height: 300px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #333;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    transform: rotate(0deg);
}

.wheel-item {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.wheel-item:nth-child(1) {
    background-color: #444;
    transform: rotate(0deg) skewY(45deg);
}

.wheel-item:nth-child(2) {
    background-color: #555;
    transform: rotate(45deg) skewY(45deg);
}

.wheel-item:nth-child(3) {
    background-color: #666;
    transform: rotate(90deg) skewY(45deg);
}

.wheel-item:nth-child(4) {
    background-color: #777;
    transform: rotate(135deg) skewY(45deg);
}

.wheel-item:nth-child(5) {
    background-color: #888;
    transform: rotate(180deg) skewY(45deg);
}

.wheel-item:nth-child(6) {
    background-color: #999;
    transform: rotate(225deg) skewY(45deg);
}

.wheel-item:nth-child(7) {
    background-color: #aaa;
    transform: rotate(270deg) skewY(45deg);
}

.wheel-item:nth-child(8) {
    background-color: #bbb;
    transform: rotate(315deg) skewY(45deg);
}

#spin-wheel-btn {
    padding: 12px 30px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

#spin-wheel-btn:hover {
    background-color: #444;
}

.wheel-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.wheel-result h3 {
    font-size: 1.3rem;
    color: gold;
}

.wheel-result #wheel-prize {
    font-weight: bold;
}

/* Игровой экран */
.game-ui {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.health-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.health-bar i {
    color: #ff3333;
    font-size: 1.5rem;
}

.bar-container {
    width: 150px;
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 100%;
    background-color: #ff3333;
    transition: width 0.3s ease;
}

#health-text {
    font-size: 0.9rem;
    color: #ccc;
}

.currency-display #game-currency-ingame {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.1rem;
    color: gold;
}

.inventory-quests {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.inventory-quests button {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.inventory-quests button:hover {
    background-color: #444;
}

.text-display {
    flex-grow: 1;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    overflow-y: auto;
}

.character-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.character-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #555;
    object-fit: cover;
}

.character-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.text-content {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #eee;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.choice-btn {
    padding: 12px 20px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
}

.choice-btn:hover {
    background-color: #444;
}

.choice-btn.premium {
    border-left: 5px solid gold;
    position: relative;
}

.choice-btn.premium::after {
    content: '\f521';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    color: gold;
}

.game-controls {
    display: flex;
    justify-content: space-between;
}

.game-controls button {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-controls button:hover {
    background-color: #444;
}

/* Инвентарь */
.inventory-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.inventory-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.inventory-item:hover {
    background-color: #333;
}

.inventory-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.inventory-item .item-name {
    font-size: 0.9rem;
    text-align: center;
    color: #fff;
}

.inventory-item .item-count {
    font-size: 0.8rem;
    color: #aaa;
}

/* Задания */
.quests-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.quest {
    padding: 15px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
}

.quest h3 {
    color: #fff;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quest p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.quest-progress {
    width: 100%;
    height: 5px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.quest-progress-fill {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

.quest-status {
    font-size: 0.8rem;
    color: #ccc;
    text-align: right;
}

/* Магазин */
.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.shop-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
}

.shop-item h3 {
    color: gold;
    font-size: 1.2rem;
}

.shop-item p {
    color: #aaa;
    font-size: 0.9rem;
}

.buy-btn {
    padding: 8px 15px;
    background-color: #333;
    color: gold;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.buy-btn:hover {
    background-color: #444;
}

#watch-ad-btn {
    padding: 8px 15px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#watch-ad-btn:hover {
    background-color: #45a049;
}

/* Адаптивность */
@media (max-width: 768px) {
    #main-menu h1 {
        font-size: 2rem;
    }
    
    .menu-options button {
        padding: 12px;
        font-size: 1rem;
    }
    
    .wheel {
        width: 250px;
        height: 250px;
    }
    
    .text-display {
        padding: 15px;
    }
    
    .character-avatar {
        width: 50px;
        height: 50px;
    }
    
    .character-name {
        font-size: 1rem;
    }
    
    .text-content {
        font-size: 1rem;
    }
    
    .choice-btn {
        padding: 10px 15px;
    }
    
    .game-controls button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .inventory-items {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .shop-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #main-menu h1 {
        font-size: 1.8rem;
    }
    
    .menu-options button {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .wheel {
        width: 200px;
        height: 200px;
    }
    
    .stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-controls button {
        width: 100%;
        justify-content: center;
    }
}