@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');

/* Сброс стандартных стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Основной контейнер */
body {
    font-family: 'MedievalSharp', 'Arial', 'Noto Color Emoji', sans-serif;
    background: linear-gradient(180deg, #3C2A1D, #5A3E2B);
    color: #E8D5A3;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
}

#background-layer {
    display: none;
}

#main-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
}

#game-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: url('https://ake11a.ru/images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #E8D5A3;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

#game-content::before {
    display: none;
}

/* Скрываем баннер */
.banner {
    display: none !important;
}

/* Контейнер для листьев */
#leaf-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Стили для падающих листьев */
.falling-leaf {
    position: absolute;
    width: 20px;
    height: 20px;
    animation: leafFall 5s linear infinite;
}

.falling-leaf path {
    fill: #D4A017;
    opacity: 0.8;
}

/* Разные позиции и задержки для листьев */
.falling-leaf:nth-child(1) { left: 10%; animation-delay: 0s; }
.falling-leaf:nth-child(2) { left: 30%; animation-delay: 1s; }
.falling-leaf:nth-child(3) { left: 50%; animation-delay: 2s; }
.falling-leaf:nth-child(4) { left: 70%; animation-delay: 3s; }
.falling-leaf:nth-child(5) { left: 90%; animation-delay: 4s; }

/* Анимация падения листа */
@keyframes leafFall {
    0% {
        transform: translateY(-20vh) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(40vh) translateX(30px) rotate(200deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) translateX(-30px) rotate(400deg);
        opacity: 0;
    }
}

/* Окно приветствия */
#welcome-message {
    position: fixed;
    top: 2%;
    left: 50%;
    transform: translate(-50%, 0);
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 20px;
    padding: 20px;
    width: 95%;
    max-width: 95%;
    text-align: center;
    display: block;
    z-index: 500;
    box-shadow: 0 4px 20px rgba(139, 90, 43, 0.6), 0 0 30px rgba(212, 160, 23, 0.3);
    backdrop-filter: blur(5px);
    animation: welcomePopIn 0.5s ease-out forwards;
    overflow: hidden;
}

.welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.welcome-header h2 {
    color: transparent;
    font-size: 22px;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 10px rgba(212, 160, 23, 0.8), 0 0 20px rgba(139, 90, 43, 0.5);
    margin: 0;
}

.welcome-header .settings-icon {
    font-size: 20px;
    cursor: pointer;
    color: #FFFFFF;
    transition: transform 0.2s, color 0.2s, filter 0.2s;
    filter: drop-shadow(0 0 5px #D4A017);
    outline: none;
    position: absolute;
    top: 0;
    right: 0;
}

.welcome-header .settings-icon:hover {
    color: #D4A017;
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px #D4A017);
}

.welcome-header .settings-icon:active {
    transform: scale(1.1);
    color: #8B5A2B;
    filter: drop-shadow(0 0 10px #8B5A2B);
}

#welcome-message.hidden {
    display: none;
}

#welcome-message:hover {
    transform: translate(-50%, 0);
    box-shadow: 0 6px 25px rgba(139, 90, 43, 0.8), 0 0 40px rgba(212, 160, 23, 0.5);
}

#welcome-message h2 {
    color: transparent;
    font-size: 22px;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 10px rgba(212, 160, 23, 0.8), 0 0 20px rgba(139, 90, 43, 0.5);
}

#welcome-message p {
    font-size: 13px;
    line-height: 1.3;
    color: #E8D5A3;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    margin: 2px 0;
}

#welcome-message p span {
    color: #D4A017;
    font-weight: bold;
}

/* Уведомления */
#notifications {
    position: fixed;
    top: 10px;
    width: 100%;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.notification {
    background: #2E1E0F;
    border: 2px solid #D4A017;
    border-radius: 8px;
    padding: 8px 18px;
    margin: 4px 0;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    animation: slideDown 0.5s ease-in-out, fadeOut 0.5s ease-in-out 2s forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    width: auto; /* Уведомление подстраивается под содержимое */
    max-width: 80%; /* Ограничиваем максимальную ширину */
    display: inline-block; /* Чтобы ширина не растягивалась */
}

.green { border-color: #D4A017; color: #D4A017; }
.red { border-color: #FF8C00; color: #FF8C00; }
.gold { border-color: #E8D5A3; color: #E8D5A3; }
.purple { border-color: #D4A017; color: #D4A017; }

/* Иконки футера */
#footer-icons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 3000;
    width: 100%;
    box-sizing: border-box;
}

.icon {
    font-size: 22px;
    cursor: pointer;
    color: #FFFFFF;
    transition: transform 0.2s, color 0.2s, filter 0.2s;
    filter: drop-shadow(0 0 5px #D4A017);
    outline: none;
}

.icon:focus {
    filter: drop-shadow(0 0 8px #D4A017);
    transform: scale(1.1);
}

.icon:hover {
    color: #D4A017;
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px #D4A017);
}

.icon:active {
    transform: scale(1.1);
    color: #8B5A2B;
    filter: drop-shadow(0 0 10px #8B5A2B);
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 20px;
    padding: 10px 20px 20px 20px;
    width: 90%;
    max-height: 90vh;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 90, 43, 0.6), 0 0 30px rgba(212, 160, 23, 0.3);
    backdrop-filter: blur(5px);
    animation: popIn 0.3s ease-out forwards;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.modal:hover {
    box-shadow: 0 6px 25px rgba(139, 90, 43, 0.8), 0 0 40px rgba(212, 160, 23, 0.5);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    animation: fadeIn 0.3s ease-out forwards;
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 5px;
    padding: 0;
    margin: 0;
}

.modal-close {
    cursor: pointer;
    font-size: 20px;
    transition: color 0.2s, filter 0.2s, transform 0.2s, background 0.2s;
    text-shadow: 0 0 5px rgba(139, 90, 43, 0.7);
    border-radius: 50%;
    padding: 2px 5px;
    line-height: 1;
    margin: 0;
}

.modal-close:hover {
    color: #FFFFFF;
    filter: drop-shadow(0 0 6px #D4A017);
    transform: scale(1.1);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-content {
    padding: 2px 0;
    overflow-x: hidden;
}

.modal-content.vip-modal {
    padding: 15px;
    background: rgba(46, 30, 15, 0.7);
    border-radius: 15px;
    max-height: 70vh; /* Ограничиваем высоту содержимого */
    overflow-y: auto; /* Включаем вертикальную прокрутку */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Поддержка нативной прокрутки на iOS */
    touch-action: pan-y; /* Разрешаем прокрутку по оси Y */
    scrollbar-width: thin; /* Тонкий скроллбар для Firefox */
    scrollbar-color: #D4A017 #2E1E0F; /* Цвет скроллбара для Firefox */
}

/* Скроллбар для WebKit-браузеров (Chrome, Safari) */
.modal-content.vip-modal::-webkit-scrollbar {
    width: 4px;
}

.modal-content.vip-modal::-webkit-scrollbar-thumb {
    background: #D4A017;
    border-radius: 2px;
}

.modal-content.vip-modal::-webkit-scrollbar-track {
    background: #2E1E0F;
}

.modal-content.vip-modal h2 {
    text-align: center;
    margin-bottom: 15px;
    color: transparent;
    font-size: 20px;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 8px rgba(212, 160, 23, 0.6);
}

.modal-content.vip-modal h3 {
    margin: 15px 0 10px;
    color: transparent;
    font-size: 16px;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 8px rgba(212, 160, 23, 0.6);
}

.modal-content.vip-modal h3:not(:first-child) {
    position: relative;
    padding-top: 15px;
}

.modal-content.vip-modal h3:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #D4A017, transparent);
}

.modal-content.vip-modal p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Скроллбары для модальных окон */
.modal-content .skill-section {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.available-skills-section {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px;
    scrollbar-width: thin;
    scrollbar-color: #D4A017 #2E1E0F;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* Кнопки в модальных окнах */
.modal-content button {
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    max-width: 90%;
    width: 100%;
    word-break: break-word;
    text-align: center;
}

.modal-content button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

/* Табы */
.tab-buttons, .sub-tab-buttons {
    display: flex;
    justify-content: space-around;
    margin-bottom: 3px;
}

.tab-buttons button, .sub-tab-buttons button {
    flex: 1;
    margin: 0 2px;
    padding: 4px;
    font-size: 10px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 2px 6px rgba(139, 90, 43, 0.4);
}

.tab-buttons button.active, .sub-tab-buttons button.active {
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.6);
}

.tab-buttons button:hover, .sub-tab-buttons button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.6);
}

/* Скиллы */
.skill-item {
    display: flex;
    align-items: center;
    background: linear-gradient(45deg, #2E1E0F, #3C2A1D);
    border: 2px solid #D4A017;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: inset 0 0 8px rgba(139, 90, 43, 0.3);
}

.skill-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #3C2A1D, #2E1E0F);
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.5);
}

.skill-item .skill-icon {
    font-size: 18px;
    margin-right: 8px;
}

.skill-item .skill-info {
    flex: 1;
}

.skill-item .skill-name {
    font-size: 13px;
    color: transparent;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 5px rgba(212, 160, 23, 0.4);
}

.skill-item .skill-description {
    font-size: 11px;
    color: #E8D5A3;
    margin-top: 2px;
}

.skill-item .skill-actions {
    display: flex;
    gap: 5px;
}

.skill-item button {
    padding: 4px 8px;
    font-size: 10px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
}

.skill-item button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

/* Информация о бое */
#combat-info {
    position: fixed;
    top: 25px;
    left: 5%;
    right: 5%;
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 1000;
    min-height: 80px;
}

#combat-info div {
    flex: 1;
    text-align: center;
}

#combat-info .player-info {
    color: #D4A017;
}

#combat-info .enemy-info {
    color: #FF8C00;
}

#combat-info p {
    margin: 0;
    line-height: 1.3;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    white-space: normal; /* Разрешаем перенос текста */
    word-wrap: break-word; /* Перенос слов */
}

#combat-info .hp-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 5px;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

#combat-info .hp-bar .hp-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #D4A017, #E8D5A3);
    box-shadow: 0 0 8px #D4A017;
    transition: width 0.3s ease;
}

#combat-info .enemy-info .hp-bar .hp-fill {
    background: linear-gradient(90deg, #FF8C00, #FFD700);
    box-shadow: 0 0 8px #FF8C00;
}

/* Лог боя */
#combat-log {
    position: fixed;
    top: 116px;
    left: 5%;
    right: 5%;
    height: 200px;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 10px;
    padding: 10px;
    margin-top: 15px;
    z-index: 1000;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

#combat-log:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.5);
}

#combat-log .log-message {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    margin: 5px 0;
    padding: 5px;
    border-radius: 5px;
    background: transparent;
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
    animation: slideInLog 0.5s ease-out forwards;
}

#combat-log .green { color: #D4A017; }
#combat-log .red { color: #FF8C00; }
#combat-log .gold { color: #E8D5A3; }
#combat-log .purple { color: #D4A017; }

/* Действия в бою */
#combat-actions {
    position: fixed;
    top: 335px;
    left: 5%;
    right: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 1000;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.combat-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 300px;
}

#combat-actions button {
    flex: 1;
    padding: 10px 20px;
    font-size: 14px;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 8px;
    color: #E8D5A3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    transition: transform 0.2s, background 0.3s, box-shadow 0.2s;
    animation: pulse 1.5s infinite ease-in-out;
}

#combat-actions button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.8);
}

#combat-actions button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(139, 90, 43, 0.5);
}

/* Анимация пульсации */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(139, 90, 43, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    }
}

/* Блок VIP */
.vip-functions {
    position: fixed;
    top: 400px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 10px;
    padding: 10px;
    width: 80%;
    max-width: 300px;
    min-height: 120px;
    text-align: left;
    z-index: 1000;
}

.vip-functions:hover {
    transform: translateX(-50%);
    box-shadow: none;
}

.vip-functions h3 {
    margin: 0;
    font-size: 14px;
    color: #D4A017;
    text-shadow: 0 0 3px rgba(139, 90, 43, 0.5);
}

.vip-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    padding: 0 8px;
    width: 100%;
}

.vip-checkboxes label {
    font-size: 10px;
    gap: 4px;
    width: 100%;
}

.vip-checkboxes label:hover {
    color: #D4A017;
}

.vip-checkboxes input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

.vip-checkboxes input[type="checkbox"]:hover {
    border-color: #E8D5A3;
    box-shadow: 0 0 6px rgba(232, 213, 163, 0.5);
}

.vip-checkboxes input[type="checkbox"]:checked {
    background: #D4A017;
    border-color: #8B5A2B;
}

.vip-checkboxes input[type="checkbox"]:checked::after {
    content: "✔";
    display: block;
    text-align: center;
    color: #2E1E0F;
    font-size: 10px;
    line-height: 16px;
}

.vip-checkboxes label,
.vip-checkboxes input {
    padding: 0;
    margin: 0;
}

/* Скроллбары для контента */
#shop-content, #inventory, #equipped-skills {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: #D4A017 #2E1E0F;
}

#shop-content::-webkit-scrollbar,
#inventory::-webkit-scrollbar,
#equipped-skills::-webkit-scrollbar {
    width: 4px;
}

#shop-content::-webkit-scrollbar-thumb,
#inventory::-webkit-scrollbar-thumb,
#equipped-skills::-webkit-scrollbar-thumb {
    background: #D4A017;
    border-radius: 2px;
}

#shop-content::-webkit-scrollbar-track,
#inventory::-webkit-scrollbar-track,
#equipped-skills::-webkit-scrollbar-track {
    background: #2E1E0F;
}

/* Элементы магазина и инвентаря */
.shop-item, .inventory-item {
    display: flex;
    flex-direction: column;
    background: linear-gradient(45deg, #2E1E0F, #3C2A1D);
    border: 2px solid #D4A017;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: inset 0 0 8px rgba(139, 90, 43, 0.3);
}

.shop-item:hover, .inventory-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #3C2A1D, #2E1E0F);
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.5);
}

.shop-item .item-header, .inventory-item .item-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 5px;
}

.shop-item .item-icon, .inventory-item .item-icon {
    font-size: 18px;
    margin-right: 8px;
}

.shop-item .item-name, .inventory-item .item-name {
    flex: 1;
    font-size: 15px;
    white-space: normal;
    word-wrap: break-word;
    padding: 2px 4px;
    background: rgba(139, 90, 43, 0.2);
    border-radius: 4px;
    color: transparent;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 5px rgba(212, 160, 23, 0.4);
}

.shop-item .item-stats, .inventory-item .item-description {
    font-size: 11px;
    color: #E8D5A3;
    margin-bottom: 5px;
    padding: 2px 4px;
    background: rgba(139, 90, 43, 0.1);
    border-radius: 4px;
}

.shop-item .item-price {
    font-size: 11px;
    color: #D4A017;
    margin-bottom: 5px;
}

.shop-item button, .inventory-item button {
    padding: 5px 10px;
    font-size: 11px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    max-width: 100%;
    word-break: break-word;
}

.shop-item button:hover, .inventory-item button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

.inventory-item .item-actions {
    display: flex;
    gap: 5px;
}

/* Кнопка сброса прогресса */
button[onclick="resetProgress()"] {
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    color: #E8D5A3;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

button[onclick="resetProgress()"]:hover {
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    transform: scale(1.05);
}

/* Блок VIP */
.vip-level {
    background: linear-gradient(45deg, #2E1E0F, #3C2A1D);
    border: 2px solid #D4A017;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: inset 0 0 8px rgba(139, 90, 43, 0.3);
    overflow: hidden;
    word-break: break-word;
}

.vip-level.current {
    background: linear-gradient(45deg, #3C2A1D, #4A3723);
    border: 2px solid #FFD700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.vip-level.locked {
    background: linear-gradient(45deg, #1C140A, #2E1E0F);
    border: 2px solid #8B5A2B;
    opacity: 0.7;
}

.vip-level:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.5);
}

.vip-level div {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.vip-level span {
    font-size: 16px;
}

.vip-level p {
    font-size: 10px;
    color: #E8D5A3;
    margin: 1px 0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    word-break: break-word;
}

.vip-level.locked p {
    color: #A9A9A9;
}

.vip-level .level-title {
    font-size: 12px;
    color: #D4A017;
    margin: 0;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 5px rgba(212, 160, 23, 0.4);
}

.vip-levels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    box-sizing: border-box;
}

.vip-levels::-webkit-scrollbar {
    width: 4px;
}

.vip-levels::-webkit-scrollbar-thumb {
    background: #D4A017;
    border-radius: 2px;
}

.vip-levels::-webkit-scrollbar-track {
    background: #2E1E0F;
}

/* Кнопка "Повысить VIP-уровень" */
.modal-content button.upgrade-vip {
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(45deg, #D4A017, #FFD700);
    border: none;
    border-radius: 6px;
    color: #2E1E0F;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    margin-top: 10px;
    max-width: 90%;
    width: 100%;
    word-break: break-word;
    text-align: center;
}

.modal-content button.upgrade-vip:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #FFD700, #D4A017);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

.modal-content button.upgrade-vip:active {
    transform: scale(0.95);
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.modal-content button.upgrade-vip:disabled {
    background: #3C2A1D;
    color: #A9A9A9;
    box-shadow: none;
    cursor: not-allowed;
}

/* Контейнер кнопок внизу модалки */
.modal-content div {
    overflow-x: hidden;
}

.modal-content div[style*="text-align: center; margin-bottom: 10px;"] {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

/* Анимации */
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes welcomePopIn {
    from { transform: translate(-50%, 0) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

@keyframes popIn {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes popOut {
    from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    to { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

@keyframes slideInLog {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Стили для кнопок "Экипированные скиллы" и "Доступные скиллы" */
.skill-tab-button {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 10px;
    font-size: 14px;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: 2px solid #D4A017;
    border-radius: 8px;
    color: #E8D5A3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    transition: transform 0.2s, background 0.3s, box-shadow 0.2s;
    cursor: pointer;
}

.skill-tab-button:hover {
    transform: scale(1.02);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.8);
}

.skill-tab-button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(139, 90, 43, 0.5);
}

.skills-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

.settings-icon {
    font-size: 26px;
    cursor: pointer;
    color: #FFFFFF;
    transition: transform 0.2s, color 0.2s, filter 0.2s;
    filter: drop-shadow(0 0 5px #D4A017);
    outline: none;
}

.settings-icon:hover {
    color: #D4A017;
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px #D4A017);
}

.settings-icon:active {
    transform: scale(1.1);
    color: #8B5A2B;
    filter: drop-shadow(0 0 10px #8B5A2B);
}

/* Стили для прогресс-бара */
#player-stats {
    position: fixed;
    top: 310px;
    left: 5%;
    right: 5%;
    text-align: center;
    color: #D4A017;
    text-shadow: 0 0 5px rgba(139, 90, 43, 0.5);
    z-index: 1000;
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 10px;
    padding: 5px;
}

.exp-bar {
    width: 100%;
    height: 12px;
    background: #3C2A1D;
    border: 2px solid #D4A017;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4A017, #E8D5A3);
    box-shadow: 0 0 8px #D4A017;
    border-radius: 5px;
    transition: width 0.3s ease-in-out;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Анимация пульсации */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    }
}

/* Смещаем кнопки и функции VIP вниз */
#combat-actions, .vip-functions {
    margin-top: 20px;
}

/* Экран загрузки */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 30, 15, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loading-screen.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: #E8D5A3;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.loading-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
}

.loading-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 5px #D4A017);
}

.loading-content p {
    font-size: 18px;
    margin: 0;
    animation: pulse-text 1.5s infinite ease-in-out;
}

/* Анимация пульсации для текста */
@keyframes pulse-text {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Чат */
#chat-container {
    position: fixed;
    top: 37%;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 95%;
    z-index: 500;
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(139, 90, 43, 0.6), 0 0 30px rgba(212, 160, 23, 0.3);
    backdrop-filter: blur(5px);
}

#chat-messages {
    height: 170px;
    max-height: 170px;
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
    padding: 5px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

#chat-messages:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.5);
}

.chat-message {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    margin: 5px 0;
    padding: 5px;
    border-radius: 5px;
    background: transparent;
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
    animation: slideInLog 0.5s ease-out forwards;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#chat-input {
    flex: 1;
    padding: 5px;
    font-size: 12px;
    background: rgba(46, 30, 15, 0.7);
    border: 1px solid #D4A017;
    border-radius: 5px;
    color: #E8D5A3;
    outline: none;
}

#chat-input::placeholder {
    color: #A9A9A9;
}

#chat-input:focus {
    border-color: #FFD700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

#chat-send-button {
    padding: 5px 10px;
    font-size: 12px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 5px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
}

#chat-send-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

/* Экран рыбалки */
#fishing-game-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/fishing-background.jpg') no-repeat center center;
    background-size: cover;
    padding: 20px;
    z-index: 1000;
}

/* Затемнение фона для читаемости */
#fishing-game-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

#fishing-game-screen .fishing-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

#fishing-game-screen h2 {
    color: transparent;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 2px #2E1E0F;
    text-shadow: 0 0 10px rgba(212, 160, 23, 0.8), 3px 3px 6px rgba(0, 0, 0, 1);
    font-size: 28px;
    margin: 0;
}

#fishing-game-screen .fishing-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #E8D5A3;
    font-size: 18px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 50%;
    padding: 5px 10px;
    line-height: 1;
    transition: transform 0.2s, background 0.3s, box-shadow 0.2s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    z-index: 1500;
}

#fishing-game-screen .fishing-close:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

#fishing-game-screen .fishing-close:active {
    transform: scale(0.95);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
}

#fishing-notifications {
    position: absolute;
    top: 60px;
    width: 100%;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#fishing-game-screen .fishing-progress-bar {
    position: relative;
    width: 300px;
    height: 30px;
    margin-bottom: 20px;
}

#fishing-game-screen .fishing-progress-bar svg rect[fill="#2E1E0F"] {
    fill: #2E1E0F;
    stroke: #D4A017;
    stroke-width: 2;
    rx: 5;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
}

#fishing-game-screen .fishing-progress-bar svg #success-zone {
    fill: rgba(0, 255, 0, 0.3);
    rx: 5;
}

#fishing-game-screen .fishing-progress-bar svg #fishing-slider {
    fill: #FFD700;
    rx: 3;
    box-shadow: 0 0 5px rgba(212, 160, 23, 0.5);
}

#fishing-game-screen #splash-animation {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
}

#fishing-game-screen #fishing-result {
    color: #FFFFFF;
    text-shadow: 0 0 10px #D4A017, 2px 2px 5px rgba(0, 0, 0, 1), -2px -2px 5px rgba(0, 0, 0, 1);
    font-size: 20px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

#fishing-game-screen #fishing-result.green { color: #FFD700; }
#fishing-game-screen #fishing-result.red { color: #FF4500; }

#fishing-game-screen .catch-button {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    color: #E8D5A3;
    font-size: 16px;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    transition: transform 0.2s, background 0.3s, box-shadow 0.2s;
    animation: pulse 1.5s infinite ease-in-out, glow 2s infinite ease-in-out;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.2;
}

/* Элемент для вращения вокруг кнопки */
#fishing-game-screen .catch-button::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed #FFD700;
    border-radius: 50%;
    animation: spin 3s linear infinite;
}

#fishing-game-screen .catch-button:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

#fishing-game-screen .catch-button:active {
    transform: scale(0.95);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(139, 90, 43, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 160, 23, 1);
    }
    100% {
        box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#server-boss-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://ake11a.ru/images/server-boss-background.jpg') no-repeat center center fixed;
    background-size: cover;
    z-index: 1000;
    color: #FFD700;
    font-family: 'MedievalSharp', cursive;
}

.server-boss-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
    background: transparent !important; /* Убираем фон */
    border-bottom: none !important; /* Убираем границу */
}

/* Убираем возможный текст из псевдоэлементов */
.server-boss-header::before,
.server-boss-header::after {
    content: none !important;
}

.server-boss-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #FFD700;
    cursor: pointer;
}

.server-boss-close:hover {
    color: #FF4500;
}

#server-boss-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100% - 60px); /* Учитываем высоту заголовка */
}

.attack-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, #FFD700, #DAA520);
    color: #FFF;
    font-size: 20px;
    border: 2px solid #D4A017;
    cursor: pointer;
    display: flex;
    flex-direction: column; /* Вертикальное расположение */
    align-items: center;
    justify-content: center;
    margin-top: 280px;
    animation: pulse 1.5s infinite;
    padding: 0; /* Убираем внутренние отступы */
}

.attack-icon {
    font-size: 24px; /* Размер эмодзи */
    line-height: 1; /* Убираем лишние отступы */
}

.attack-text {
    font-size: 16px; /* Размер текста */
    line-height: 1;
    margin-top: 5px; /* Отступ между эмодзи и текстом */
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#server-boss-screen #combat-info {
    top: 50px; /* Опускаем ниже только в окне боссов */
}

#server-boss-combat-log {
    position: fixed;
    top: 140px; /* Опускаем ниже, чтобы следовать за combat-info */
    left: 5%;
    right: 5%;
    height: 200px;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 10px;
    padding: 10px;
    margin-top: 15px;
    z-index: 1000;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

#server-boss-combat-log:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.5);
}

#server-boss-combat-log .log-message {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    margin: 5px 0;
    padding: 5px;
    border-radius: 5px;
    background: transparent;
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
    animation: slideInLog 0.5s ease-out forwards;
}

#server-boss-combat-log .green { color: #D4A017; }
#server-boss-combat-log .red { color: #FF8C00; }
#server-boss-combat-log .gold { color: #E8D5A3; }
#server-boss-combat-log .purple { color: #D4A017; }

#sb-info-wrapper {
    position: fixed;
    top: 340px;
    left: 5%;
    right: 5%;
    max-height: 100px; /* ограничим */
    overflow-y: auto;   /* скролл если переполнено */
    background: rgba(46, 30, 15, 0.5);
    border: 2px solid #D4A017;
    border-radius: 10px;
    padding: 10px;
    z-index: 1000;
    text-align: left;
    font-size: 13px;
    color: #FFD700;
}

#sb-global-damage {
    font-size: 14px;
    color: #fff;
    margin-bottom: 8px;
}

#sb-leaderboard h4 {
    margin: 0 0 5px;
    color: gold;
    font-size: 14px;
}

#sb-leaderboard-list {
    list-style: none;
    padding-left: 15px;
    margin: 0;
}

#sb-leaderboard-list li {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 2px;
}

/* Футер экрана рыбалки */
.fishing-footer {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    z-index: 3000;
    width: 100%;
    box-sizing: border-box;
}

.fishing-footer .footer-button {
    padding: 10px 20px;
    font-size: 16px;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 8px;
    color: #E8D5A3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    transition: transform 0.2s, background 0.3s, box-shadow 0.2s;
    cursor: pointer;
}

.fishing-footer .footer-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.8);
}

.fishing-footer .footer-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(139, 90, 43, 0.5);
}

.fishing-footer .fisherman-shop-button {
    background: linear-gradient(45deg, #2E1E0F, #4A3723);
}

.fishing-footer .fisherman-shop-button:hover {
    background: linear-gradient(45deg, #4A3723, #2E1E0F);
}

.fishing-footer .exit-fishing-button {
    background: linear-gradient(45deg, #FF4500, #8B5A2B);
}

.fishing-footer .exit-fishing-button:hover {
    background: linear-gradient(45deg, #8B5A2B, #FF4500);
}

/* Экран магазина рыбака */
#fisherman-shop-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(46, 30, 15, 0.9);
    border: 3px solid #D4A017;
    border-radius: 20px;
    padding: 20px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 90, 43, 0.6), 0 0 30px rgba(212, 160, 23, 0.3);
    backdrop-filter: blur(5px);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: #D4A017 #2E1E0F;
}

#fisherman-shop-screen::-webkit-scrollbar {
    width: 4px;
}

#fisherman-shop-screen::-webkit-scrollbar-thumb {
    background: #D4A017;
    border-radius: 2px;
}

#fisherman-shop-screen::-webkit-scrollbar-track {
    background: #2E1E0F;
}

#fisherman-shop-screen:hover {
    box-shadow: 0 6px 25px rgba(139, 90, 43, 0.8), 0 0 40px rgba(212, 160, 23, 0.5);
}

#fisherman-shop-screen h2 {
    text-align: center;
    color: transparent;
    font-size: 24px;
    background: linear-gradient(45deg, #D4A017, #E8D5A3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 10px rgba(212, 160, 23, 0.8);
    margin-bottom: 15px;
}

#fisherman-shop-screen p {
    text-align: center;
    font-size: 14px;
    color: #E8D5A3;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    margin-bottom: 20px;
}

/* Контейнер одной рыбы */
.fish-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(46, 30, 15, 0.5);
    border: 1px solid #D4A017;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
    transition: background 0.3s;
}

.fish-item:hover {
    background: rgba(46, 30, 15, 0.8);
}

/* Название рыбы с эмодзи */
.fish-name {
    flex: 1;
    font-size: 14px;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
}

/* Цвета редкости */
.fish-name.common    { color: #B0BEC5; } /* Светло-серый */
.fish-name.uncommon  { color: #66BB6A; } /* Мягкий зелёный */
.fish-name.rare      { color: #42A5F5; } /* Спокойный синий */
.fish-name.epic      { color: #AB47BC; } /* Приятный фиолетовый */
.fish-name.legendary { color: #FFCA28; } /* Тёплый жёлтый */
.fish-name.mythical  { color: #FFEE58; } /* Светло-золотой */

/* Кнопки обмена */
.exchange-buttons {
    display: flex;
    gap: 6px;
}

.exchange-buttons button {
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    color: #E8D5A3;
    transition: background 0.2s, transform 0.2s;
}

.exchange-buttons button:hover {
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    transform: scale(1.05);
}

/* Кнопка "Закрыть" */
#fisherman-shop-screen button[onclick="closeFishermanShop()"] {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    font-size: 14px;
    background: linear-gradient(45deg, #FF4500, #8B5A2B);
    border: none;
    border-radius: 8px;
    color: #E8D5A3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.5);
    transition: transform 0.2s, background 0.3s, box-shadow 0.2s;
    cursor: pointer;
}

#fisherman-shop-screen button[onclick="closeFishermanShop()"]:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #8B5A2B, #FF4500);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.8);
}

#fisherman-shop-screen button[onclick="closeFishermanShop()"]:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(139, 90, 43, 0.5);
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2E1E0F;
    border: 2px solid #D4A017;
    border-radius: 10px;
    padding: 15px;
    width: 90%;
    max-width: 400px;
    z-index: 1000;
    color: #E8D5A3;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    text-align: right;
}

.modal-close {
    cursor: pointer;
    color: #FFD700;
    font-size: 20px;
}

.modal-content {
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* Донат-магазин */
.donat-shop {
    background: #2E1E0F;
    border: 2px solid #D4A017;
    border-radius: 10px;
    padding: 15px;
    color: #E8D5A3;
}

.donat-shop h2 {
    color: #FFD700;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 3px #000;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.tab {
    background: #3C2F1A;
    border: 1px solid #D4A017;
    color: #E8D5A3;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.tab.active {
    background: #D4A017;
    color: #2E1E0F;
    font-weight: bold;
}

.tab:hover {
    background: #5A4A2C;
}

.tab-content {
    min-height: 300px;
    max-height: 60vh;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    padding-right: 5px;
    box-sizing: border-box;
}

/* Стили для выпадающего списка префиксов */
.prefix-select {
    width: 100%;
    padding: 6px; /* Уменьшаем отступы */
    margin: 3px 0; /* Уменьшаем отступы */
    background: rgba(46, 30, 15, 0.7);
    border: 1px solid #D4A017;
    border-radius: 5px;
    color: #E8D5A3;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    font-size: 12px; /* Уменьшаем шрифт */
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-height: 35px; /* Ограничиваем высоту */
}

.prefix-select:hover {
    border-color: #FFD700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.prefix-select:focus {
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.prefix-select option {
    background: #2E1E0F;
    color: #E8D5A3;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
}

/* Контейнер для купленных префиксов */
.owned-prefixes-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; /* Уменьшаем расстояние между элементами */
    margin-top: 5px; /* Уменьшаем верхний отступ */
}

/* Кнопка "Экипировать" */
.equip-prefix-button {
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    width: 100%;
    max-width: 150px;
    text-align: center;
}

.equip-prefix-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

.equip-prefix-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 6px rgba(212, 160, 23, 0.5);
}

/* Кнопка "Купить префикс" */
.buy-prefix-button {
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    width: 100%;
    max-width: 150px;
    margin: 5px 0;
    text-align: center;
}

.buy-prefix-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

.buy-prefix-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 6px rgba(212, 160, 23, 0.5);
}

/* Стили для полей ввода клана */
#clan-name,
#clan-prefix,
#clan-desc {
    width: 100%;
    background: rgba(46, 30, 15, 0.7);
    border: 1px solid #D4A017;
    border-radius: 5px;
    color: #E8D5A3;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    padding: 8px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#clan-name::placeholder,
#clan-prefix::placeholder,
#clan-desc::placeholder {
    color: #A9A9A9;
    text-shadow: none;
}

#clan-name:hover,
#clan-prefix:hover,
#clan-desc:hover {
    border-color: #FFD700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

#clan-name:focus,
#clan-prefix:focus,
#clan-desc:focus {
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

#clan-desc {
    resize: none;
    height: 80px;
}

/* Стили для выбора цвета */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.color-picker-container label {
    color: #E8D5A3;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
}

#clan-prefix-color {
    width: 40px;
    height: 40px;
    border: 1px solid #D4A017;
    border-radius: 5px;
    background: rgba(46, 30, 15, 0.7);
    padding: 0;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

#clan-prefix-color:hover {
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

#clan-prefix-color::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

#clan-prefix-color::-moz-color-swatch {
    border: none;
    border-radius: 3px;
}

/* Элементы клана */
.clan-item {
    display: flex;
    flex-direction: column; /* Вертикальное расположение */
    background: linear-gradient(45deg, #2E1E0F, #3C2A1D);
    border: 2px solid #D4A017;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: inset 0 0 8px rgba(139, 90, 43, 0.3);
}

.clan-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #3C2A1D, #2E1E0F);
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.5);
}

.clan-info {
    flex: 1;
    margin-bottom: 8px; /* Отступ перед кнопками */
}

.clan-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.clan-prefix {
    font-weight: bold;
    margin-right: 5px;
}

.clan-name {
    font-size: 14px;
    color: #E8D5A3;
    font-weight: bold;
}

.clan-info p {
    font-size: 12px;
    color: #E8D5A3;
    margin: 2px 0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
}

.clan-description {
    font-size: 12px;
    color: #E8D5A3;
    margin: 2px 0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    word-wrap: break-word; /* Перенос текста */
}

.clan-members {
    font-size: 12px;
    color: #E8D5A3;
    margin: 2px 0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
}

.clan-actions {
    display: flex;
    gap: 5px;
    justify-content: center; /* Центрируем кнопки */
}

/* Кнопка "Создать клан" */
.create-clan-button {
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    width: 100%;
    max-width: 150px;
    margin: 5px 0;
    text-align: center;
}

.create-clan-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

.create-clan-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 6px rgba(212, 160, 23, 0.5);
}

/* Кнопка "Вступить в клан" */
.join-clan-button {
    padding: 4px 8px;
    font-size: 11px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
}

.join-clan-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

.join-clan-button:active,
.join-clan-button.touch-active {
    transform: scale(0.95);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 6px rgba(212, 160, 23, 0.5);
}

/* Кнопка "Покинуть клан" */
.leave-clan-button {
    padding: 4px 8px;
    font-size: 11px;
    background: linear-gradient(45deg, #FF4500, #8B5A2B);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(255, 69, 0, 0.5);
}

.leave-clan-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #8B5A2B, #FF4500);
    box-shadow: 0 0 12px rgba(255, 69, 0, 0.8);
}

.leave-clan-button:active,
.leave-clan-button.touch-active {
    transform: scale(0.95);
    background: linear-gradient(45deg, #8B5A2B, #FF4500);
    box-shadow: 0 0 6px rgba(255, 69, 0, 0.5);
}

/* Чат с префиксами */
.chat-message span {
    margin-right: 3px;
    font-weight: bold;
}

.chat-message span[style*="color"] {
    text-shadow: 0 0 2px #000;
}

/* Родительский элемент для модального окна */
#main-screen {
    overflow: visible !important;
    position: relative;
    width: 100%;
    height: 100vh;
}

/* Общие стили для модального окна */
.modal {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    height: auto;
    max-height: 90vh;
    background: rgba(46, 30, 15, 0.9);
    border: 2px solid #D4A017;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(212, 160, 23, 0.5);
    z-index: 1000;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-header {
    position: relative;
    width: 100%;
    padding: 10px 30px 10px 10px; /* Увеличиваем правый отступ для крестика */
    background: rgba(46, 30, 15, 0.9);
    z-index: 1001;
    text-align: left;
    box-sizing: border-box;
    min-height: 40px; /* Даём больше места */
}

.modal-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    font-size: 18px !important; /* Возвращаем исходный размер */
    color: #E8D5A3 !important;
    cursor: pointer !important;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9) !important;
    transition: color 0.2s !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.modal-close:hover {
    color: #FFD700 !important;
}

.modal-content {
    width: 100%;
    max-height: calc(90vh - 40px);
    overflow: hidden !important;
    padding: 0;
    box-sizing: border-box;
    color: #E8D5A3;
}

/* Новый класс для прокручиваемого содержимого */
.scrollable-content {
    width: 100%;
    max-height: calc(90vh - 40px);
    overflow-y: scroll !important; /* Принудительно показываем скроллбар */
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    padding: 10px 20px;
    box-sizing: border-box;
}

/* Стили для скроллбара */
.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: rgba(46, 30, 15, 0.5);
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: #D4A017;
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

/* === Позволяем скроллить весь донат-модал на мобильнике === */
.modal#donat_shop {
  touch-action: pan-y !important;
}

/* === А собственно прокрутка содержимого модалки === */
.modal#donat_shop .modal-content {
  max-height: 85vh !important;             /* чтобы контент не вылезал за экран */
  overflow-y: auto !important;             /* включаем вертикальную прокрутку */
  -webkit-overflow-scrolling: touch;        /* плавный скролл на iOS */
  touch-action: pan-y;                     /* обрабатываем вертикальные свайпы */
}

/* === И для внутреннего таб-контейнера (Кланы, Префиксы и т.п.) === */
.modal#donat_shop .tab-content {
  max-height: calc(85vh - 50px) !important; /* учет высоты заголовка/табы */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Донат-модал: полностью прокручиваемый свайпом */
#donat_shop.modal {
  overflow: visible !important;
  touch-action: pan-y !important;
}

#donat_shop .modal-content {
  overflow: visible !important;
  /* чтобы .scrollable-content не резала граница родителя */
}

#donat_shop .scrollable-content,
#donat_shop .tab-content {
  max-height: 85vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
}

/* Пусть кнопки внутри не снижают зону свайпа */
#donat_shop .scrollable-content *,
#donat_shop .tab-content * {
  pointer-events: auto !important;
}

/* Уточняем стили для .tab-content в донат-магазине */
#donat_shop .tab-content {
    max-height: calc(85vh - 50px);
    overflow: hidden !important; /* Убираем прокрутку на уровне .tab-content */
}

/* Под-табы для вкладки "Кланы" */
.clan-tab-content {
    max-height: calc(80vh - 100px); /* Учитываем высоту табов и под-табов */
    overflow: hidden !important; /* Убираем прокрутку на этом уровне */
    padding-right: 8px;
    box-sizing: border-box;
}

/* Прокручиваемый контейнер для списка кланов */
#clan-list {
    max-height: calc(80vh - 120px); /* Учитываем заголовки и под-табы */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    scrollbar-width: thin;
    scrollbar-color: #D4A017 #2E1E0F;
}

#clan-list::-webkit-scrollbar {
    width: 6px;
}

#clan-list::-webkit-scrollbar-track {
    background: rgba(46, 30, 15, 0.5);
    border-radius: 4px;
}

#clan-list::-webkit-scrollbar-thumb {
    background: #D4A017;
    border-radius: 4px;
}

#clan-list::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

/* Убедимся, что .scrollable-content не мешает */
.scrollable-content {
    overflow: hidden !important; /* Прокрутка будет только в #clan-list */
}

/* Контейнер для кнопок в VIP-меню */
.vip-actions {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

/* Кнопка "Повысить уровень" */
.upgrade-vip-button {
    background: linear-gradient(45deg, #FFD700, #D4A017);
    color: #2E1E0F;
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    text-align: center;
}

.upgrade-vip-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #FFD700);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

/* Кнопка "Донат-магазин" */
.donat-shop-button {
    background: linear-gradient(45deg, #FFD700, #D4A017);
    color: #2E1E0F;
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    text-align: center;
}

.donat-shop-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #FFD700);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

/* Центрированный текст */
.centered-text {
    text-align: center;
    color: #FF8C00; /* Для "Недостаточно алмазов" */
    margin: 10px 0;
}

.centered-text[style*="color: #FFD700"] {
    color: #FFD700; /* Для "Вы достигли максимального уровня" и ссылки */
}

/* Центрирование в "Префиксах" */
.prefix-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.prefix-select {
    width: 90%;
    max-width: 300px; /* Ограничиваем ширину */
    padding: 6px;
    margin: 3px 0;
    background: rgba(46, 30, 15, 0.7);
    border: 1px solid #D4A017;
    border-radius: 5px;
    color: #E8D5A3;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    font-size: 12px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-height: 35px;
}

.buy-prefix-button, .equip-prefix-button {
    width: 90%;
    max-width: 300px; /* Ограничиваем ширину */
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    text-align: center;
}

.buy-prefix-button:hover, .equip-prefix-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

.owned-prefixes-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

/* Центрирование в "Кланах" */
.clan-create-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#clan-name, #clan-prefix, #clan-desc {
    width: 90%;
    max-width: 300px; /* Ограничиваем ширину */
    padding: 6px;
    background: rgba(46, 30, 15, 0.7);
    border: 1px solid #D4A017;
    border-radius: 5px;
    color: #E8D5A3;
    font-family: 'MedievalSharp', 'Arial', sans-serif;
    font-size: 12px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    outline: none;
}

#clan-desc {
    height: 60px;
    resize: none;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.color-picker-container label {
    color: #E8D5A3;
    font-size: 12px;
}

.create-clan-button {
    width: 90%;
    max-width: 300px; /* Ограничиваем ширину */
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(45deg, #8B5A2B, #D4A017);
    border: none;
    border-radius: 6px;
    color: #E8D5A3;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
    text-align: center;
}

.create-clan-button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #D4A017, #8B5A2B);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.8);
}

.tab-btn {
    padding: 8px 16px;
    background: linear-gradient(to bottom, #D4A017, #A36D00);
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    font-size: 14px;
}

.tab-btn.active {
    background: linear-gradient(to bottom, #FFD700, #C49100);
    color: #000;
    transform: scale(1.05);
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tabs .tab {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background-color: #2E1E0F;
    color: #FFD700;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}
.tabs .tab.active {
    background-color: #FFD700;
    color: #2E1E0F;
}
