﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --card-small-width: 80px;
    --card-large-width: 280px;
    --card-gap: 0px;
    --sidebar-width: 280px;
    --avatar-brightness: 0.5;
    --avatar-saturation: 0;
}

.hamburger {
    display: none;
}

body {
    font-family: 'Montserrat', sans-serif !important;
    background: #1a1a2e;
    color: #fff;
    height: 100vh;
    overflow: auto;
}

.app {
    display: flex;
    height: 100%;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background: #16213e;
    border-right: 1px solid #0f3460;
    padding: 15px 12px;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    z-index: 10;
}

.game-logo {
    text-align: center;
    margin-bottom: 5px;
}
.game-logo h1 {
    font-size: 1.1rem;
    color: #ffd700;
    line-height: 1.2;
}
.logo-placeholder {
    width: 100%;
    height: 60px;
    margin-top: 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: none !important;
    border: none !important;
}

.logo-planet {
    width: 60px;
    height: auto;
    flex-shrink: 0;
margin-left: 30px;
}

.logo-ship {
    width: 210px;
    height: auto;
    flex-shrink: 0;
margin-left: -50px;   
}

.profile-section {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 5px;
    text-align: center;
}
.avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}
.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffd700;
    filter: brightness(var(--avatar-brightness)) saturate(var(--avatar-saturation));
    transition: filter 0.3s ease;
}
.avatar-progress-bar {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    transition: width 0.3s ease;
}
.stats {
    font-size: 0.75rem;
    color: #ccc;
}
.stats p {
    margin: 2px 0;
}
#changeAvatarBtn, #logoutBtn {
    background: #0f3460;
    color: white;
    border: 1px solid #ffd700;
    border-radius: 15px;
    padding: 5px 10px;
    font-size: 0.7rem;
    cursor: pointer;
    width: 100%;
    margin-top: 5px;
}
#changeAvatarBtn:hover, #logoutBtn:hover {
    background: #1a4b8c;
}

.auth-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}
.auth-section input {
    background: #0f3460;
    border: 1px solid #4a8fe0;
    border-radius: 20px;
    padding: 8px;
    color: white;
}
.auth-section button {
    background: #0f3460;
    border: 1px solid #ffd700;
    border-radius: 20px;
    padding: 6px;
    cursor: pointer;
    font-size: 0.8rem;
  color: white !important; 
}
.auth-section button:hover {
    background: #1a4b8c;
}
.google-btn {
    background: #4285f4 !important;
    color: white;
    border: none !important;
}

.lang-switcher {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 5px 0;
}
.lang-btn {
    background: #0f3460;
    color: white;
    border: 1px solid #4a8fe0;
    border-radius: 15px;
    padding: 4px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 35px;
}
.lang-btn.active {
    background: #ffd700;
    color: #1a1a2e;
    border-color: #ffd700;
    font-weight: bold;
}
.lang-btn:hover {
    background: #1a4b8c;
}

.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(10, 25, 47, 0.5);
    padding: 10px;
    border-radius: 8px;
    margin: 5px 0;
}
.setting-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: #a8d8ff;
    justify-content: space-between;
}
.setting-item input[type=range] {
    width: 100px;
    height: 4px;
    background: #0f3460;
    border-radius: 2px;
    -webkit-appearance: none;
}
.setting-item input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
}
.setting-item span {
    min-width: 35px;
    text-align: right;
    color: #ffd700;
}

.card-limit-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 10px 0;
}
.limit-btn {
    background: #0f3460;
    color: white;
    border: 1px solid #4a8fe0;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}
.limit-btn.active {
    background: #ffd700;
    color: #1a1a2e;
    border-color: #ffd700;
    font-weight: bold;
}
.limit-btn:hover {
    background: #1a4b8c;
}
.limit-btn.active:hover {
    background: #ffed4a;
}

.type-filter-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 10px 0;
}
.type-btn {
    background: #0f3460;
    color: white;
    border: 1px solid #4a8fe0;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}
.type-btn.active {
    background: #ffd700;
    color: #1a1a2e;
    border-color: #ffd700;
    font-weight: bold;
}
.type-btn:hover {
    background: #1a4b8c;
}
.type-btn.active:hover {
    background: #ffed4a;
}

.deck-controls {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 5px;
}
.deck-controls button {
    background: #0f3460;
    color: white;
    border: none;
    padding: 6px 0;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #4a8fe0;
    flex: 1 1 0;
    min-width: 60px;
}
.deck-controls button:hover {
    background: #1a4b8c;
    transform: scale(1.02);
}
.deck-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #2a3f5a;
    border-color: #666;
}

.library-section {
    margin-top: 10px;
    border-top: 1px solid #0f3460;
    padding-top: 10px;
}
.library-section h3 {
    font-size: 0.9rem;
    color: #ffd700;
    margin-bottom: 8px;
}
.deck-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 8px;
}
.deck-card {
    display: flex;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}
.deck-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ffd700;
}
.deck-card.selected {
    background: rgba(255,215,0,0.15);
    border-color: #ffd700;
}
.deck-cover {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: #0f3460;
}
.deck-info {
    flex: 1;
}
.deck-info h4 {
    margin: 0;
    font-size: 0.8rem;
    color: #ffd700;
}
.deck-info p {
    margin: 2px 0;
    font-size: 0.65rem;
    color: #ccc;
}
.deck-languages {
    display: flex;
    gap: 3px;
    margin: 2px 0;
}
.lang-icon {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}
#loadDeckBtn {
    background: #0f3460;
    color: white;
    border: 1px solid #ffd700;
    border-radius: 15px;
    padding: 5px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    width: 100%;
}
#loadDeckBtn:hover {
    background: #1a4b8c;
}

.store-section {
    margin: 10px 0;
}
.store-btn {
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    border-radius: 20px;
    padding: 8px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}
.store-btn:hover {
    background: #ffed4a;
}

/* Модальные окна (прозрачный фон) */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    pointer-events: none;
}
.modal .modal-content {
    pointer-events: auto;
    background: #16213e;
    padding: 20px;
    border: 2px solid #ffd700;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    color: #fff;
}
.modal-centered {
    margin: auto;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: #ffd700;
}
.store-close-btn {
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    margin-top: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ===== ЦЕНТРИРОВАНИЕ КАРТ ===== */
.deck-grid {
    display: grid;
    gap: var(--card-gap);
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    max-width: 100%;
}
.work-area {
    display: grid;
    grid-template-columns: repeat(8, var(--card-small-width));
    gap: var(--card-gap);
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    max-width: 100%;
    min-height: calc(var(--card-small-width) * 1.5);
    background: rgba(0,0,0,0.2);
    border-radius: 5px;
    padding: 5px 0;
}
.work-area.large-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    background: transparent;
    padding: 0;
    width: 100%;
}
.work-area.large-mode .card {
    width: var(--card-large-width);
    max-width: none;
    margin: 0;
    box-shadow: none;
    position: static;
    transform: none;
    background: transparent;
}
.main-content {
    width: 100%;
    overflow-x: auto;
}

/* ===== ОБТЕКАНИЕ ТЕКСТА ===== */
.card.large.full-mode {
    background: #F5F5DC !important;
    border: 2px solid #4A2C2C !important;
    color: #4A2C2C !important;
    padding: 10px !important;
    overflow: auto !important;
    display: block !important;
}
.card.large.full-mode .mini-card {
    width: 80px !important;
    height: 120px !important;
    margin: 0 15px 15px 0 !important;
    float: left !important;
    border: 1px solid #4A2C2C !important;
    border-radius: 4px !important;
    background: #fff !important;
}
.card.large.full-mode .full-text-content {
    background: transparent !important;
    color: #4A2C2C !important;
    line-height: 1.4 !important;
    font-size: 0.9rem !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    display: block !important;
    clear: none !important;
}

.mini-card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 3px;
    padding: 3px;
    aspect-ratio: 2/3;
    width: 60px;
    font-size: 0.5rem;
    display: flex;
    flex-direction: column;
}
.mini-card .image {
    font-size: 0.9em;
}
.mini-card .short-text {
    display: none;
}

.card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
    display: flex;
    flex-direction: column;
    aspect-ratio: 2/3;
    width: 100%;
    font-size: 0.7rem;
    position: relative;
}
.card.large {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--card-large-width);
    max-width: 90vw;
    height: auto;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    padding: 8px;
    font-size: 0.8rem;
    aspect-ratio: 2/3;
    display: flex;
    flex-direction: column;
}

/* Большая перевернутая карта */
.card.large.back {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Скрываем всё внутри большой перевернутой карты */
.card.large.back * {
    display: none !important;
}

.card.back {
    background: #2c3e50;
    background-image: repeating-linear-gradient(45deg, #34495e 0px, #34495e 6px, #2c3e50 6px, #2c3e50 12px);
    border-color: #7f8c8d;
}
.card.back .name,
.card.back .image,
.card.back .short-text {
    display: none;
}

/* Рейтинг */
.ranking-list-container {
    max-height: 60vh;
    overflow-y: auto;
}
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid #0f3460;
}
.ranking-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ffd700;
}
.ranking-name {
    flex: 1;
    font-size: 0.9rem;
}
.ranking-score {
    font-weight: bold;
    color: #ffd700;
    font-size: 0.9rem;
}
.ranking-place {
    font-weight: bold;
    width: 40px;
    text-align: center;
    color: #ffd700;
    display: inline-block;
    margin-right: 8px;
}
/* Остальные стили (админка, профиль, друзья и т.д.) без изменений */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
}
.admin-table th, .admin-table td {
    border: 1px solid #ffd700;
    padding: 8px;
    text-align: left;
}
.admin-table th {
    background: #0f3460;
    color: #ffd700;
}
.admin-ban-btn {
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    border-radius: 15px;
    padding: 4px 10px;
    cursor: pointer;
}
.admin-ban-btn:hover {
    background: #ffaa00;
}

.rules-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
    background: #1a1a2e;
    border-radius: 8px;
    color: #eee;
    line-height: 1.5;
}
.rules-content pre {
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0;
}

.test-avatar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
}
.test-avatar-header select {
    background: #1a1a2e;
    color: white;
    border: 1px solid #ffd700;
    border-radius: 20px;
    padding: 5px 10px;
}
.test-avatar-buttons {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.test-level-btn {
    background: #0f3460;
    border: 1px solid #ffd700;
    border-radius: 30px;
    padding: 8px 0;
    cursor: pointer;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    transition: 0.2s;
    text-align: center;
}
.test-level-btn:hover {
    background: #ffd700;
    color: #1a1a2e;
}
.test-avatar-note {
    font-size: 0.7rem;
    color: #aaa;
    text-align: center;
}

.avatar-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}
.avatar-option {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s;
}
.avatar-option:hover {
    transform: scale(1.1);
    border-color: #ffd700;
}

.profile-area {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 900px;
    height: 80%;
    max-height: 80vh;
    background: #16213e;
    border: 2px solid #fcf6ba;
    border-radius: 15px;
    padding: 20px;
    z-index: 2000;
    overflow-y: auto;
    color: #fff;
}
.profile-area h2 {
    text-align: center;
    margin-bottom: 15px;
}
.profile-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.tab-btn {
    background: #0f3460;
    color: white;
    border: 1px solid #4a8fe0;
    border-radius: 20px;
    padding: 5px 15px;
    cursor: pointer;
}
.tab-btn.active {
    background: #ffd700;
    color: #1a1a2e;
    border-color: #ffd700;
}
.close-btn {
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
}
.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.history-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px;
}
.history-date {
    font-size: 0.8rem;
    color: #ccc;
}
.history-deck {
    font-weight: bold;
}
.history-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
    font-size: 0.8rem;
}

.friends-panel {
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
}
.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #0f3460;
}
.friend-name {
    flex: 1;
}
.chat-btn, .remove-friend, .add-friend-btn {
    background: #0f3460;
    border: 1px solid #ffd700;
    border-radius: 15px;
    padding: 4px 8px;
    cursor: pointer;
    margin-left: 5px;
    color: white;
}
#chatPanel {
    margin-top: 15px;
    border-top: 1px solid #ffd700;
    padding-top: 10px;
}
#chatMessages {
    height: 200px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.message {
    margin: 5px 0;
    padding: 5px;
    border-radius: 5px;
    clear: both;
    max-width: 80%;
    background: #2c3e50;
    float: left;
    clear: both;
    text-align: left;
}
#chatInput {
    width: calc(100% - 110px);
    padding: 8px;
    border-radius: 20px;
    border: none;
    background: #0f3460;
    color: white;
}
#sendMessageBtn {
    width: 100px;
    padding: 8px;
    border-radius: 20px;
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    cursor: pointer;
}
#backToFriendsList {
    background: #0f3460;
    border: 1px solid #ffd700;
    border-radius: 20px;
    padding: 5px 10px;
    cursor: pointer;
    color: white;
}

.apps-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
}
.app-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 6px;
}
.app-item a {
    color: #ffd700;
    text-decoration: none;
    flex: 1;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-item a:hover {
    text-decoration: underline;
}
.delete-app-btn {
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.7rem;
}
.delete-app-btn:hover {
    background: #a00;
}


/* 1. Желтые кнопки → синие (как остальные кнопки) */
button:is(.store-btn, .product-buy, .limit-btn.active, .type-btn.active, .lang-btn.active),
.limit-btn.active,
.type-btn.active,
.lang-btn.active,
#loadDeckBtn,
.store-btn,
.product-buy,
#changeAvatarBtn,
#logoutBtn,
.close-btn:not(.store-close-btn),
button[style*="background: #ffd700"],
button[style*="background:#ffd700"] {
    background: #0f3460 !important;
    color: white !important;
    border: 1px solid #4a8fe0 !important;
}

.store-close-btn {
    background: #ffd700 !important;
    color: #1a1a2e !important;
    border: none !important;
}

/* Окно для списка колод — высота на 1 колоду + вертикальный скролл */
.deck-cards,
.library-section .deck-cards {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 130px !important;
    gap: 4px !important;
}

/* Уменьшаем высоту карточки колоды */
.deck-card,
.library-section .deck-card {
    padding: 6px 8px !important;
    min-height: auto !important;
}

/* Скрываем ФИО */
.deck-card .deck-info p:first-of-type {
    display: none !important;
}

/* Число карт и язык в одну строку */
.deck-card .deck-info p:last-of-type {
    display: block !important;
    margin: 4px 0 0 0 !important;
    font-size: 0.65rem !important;
}

/* Убираем перенос строки у языка и ставим рядом */
.deck-languages {
    display: inline !important;
    margin-left: 5px !important;
    font-size: 0.65rem !important;
}

/* Убираем возможные блочные свойства у контейнера языка */
.deck-card .deck-languages,
.deck-card [class*="languages"] {
    display: inline !important;
    float: none !important;
    clear: none !important;
}

/* ===== ДОБАВИТЬ ЭТО В КОНЕЦ ===== */
/* Окно для списка колод — полоса прокрутки внутри */
.deck-cards,
.library-section .deck-cards {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 130px !important;
    gap: 4px !important;
    border-radius: 12px !important;
    border: 1px solid #4a8fe0 !important;
    padding: 6px !important;
    background: rgba(15, 52, 96, 0.3) !important;
    
    /* Убираем выступ полосы */
    scrollbar-width: thin !important;
    scrollbar-gutter: auto !important;
}

/* Для Webkit браузеров (Chrome, Edge) — полоса поверх контента */
.deck-cards::-webkit-scrollbar,
.library-section .deck-cards::-webkit-scrollbar {
    width: 5px !important;
    background: transparent !important;
}

.deck-cards::-webkit-scrollbar-track,
.library-section .deck-cards::-webkit-scrollbar-track {
    background: transparent !important;
    margin: 4px 0 !important;
}

.deck-cards::-webkit-scrollbar-thumb,
.library-section .deck-cards::-webkit-scrollbar-thumb {
    background: #4a8fe0 !important;
    border-radius: 4px !important;
}

.deck-cards::-webkit-scrollbar-thumb:hover,
.library-section .deck-cards::-webkit-scrollbar-thumb:hover {
    background: #ffd700 !important;
}

/* Для Firefox */
.deck-cards,
.library-section .deck-cards {
    scrollbar-color: #4a8fe0 transparent !important;
}

.logo-placeholder {
    background: none !important;
    border: none !important;
}

* {
    font-family: 'Montserrat', sans-serif !important;
}

.gold-ui-text {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none !important;
    background: none !important;
    appearance: none;
    -webkit-appearance: none;
    color: #fcf6ba !important;
    display: inline-block !important;
    padding: 5px 10px;
}

/* Применяем светлый золотой цвет ко всем кнопкам настроек и управления */
.setting-item label,
.card-limit-buttons .limit-btn,
.type-filter-buttons .type-btn,
.deck-controls button,
#flipAllBtn, #shuffleBtn, #resetBtn, #toggleLargeModeBtn {
    color: #fcf6ba !important;
    display: inline-block !important;
    font-weight: 600 !important;
}

/* Для активных кнопок лимитов */
.limit-btn.active {
    color: #fcf6ba !important;
    font-weight: bold !important;
}

/* Для текста label */
.setting-item label {
    font-weight: 600;
}

/* Значения слайдеров (цифры) */
.setting-item span {
    color: #fcf6ba !important;
}

/* Активные кнопки лимитов и типов */
button.limit-btn.active,
.limit-btn.active,
button#typeAll.type-btn.active,
#typeAll.type-btn.active {
    color: #fcf6ba !important;
    font-weight: bold !important;
}

.store-btn {
    position: relative !important;
    z-index: 5 !important;
}

.store-btn span {
    pointer-events: none !important;
}

/* Исправление для модалок, чтобы они были поверх всего */
.modal {
    z-index: 10000 !important;
}

/* Чтобы окно описания товара было поверх магазина */
#productModal {
    z-index: 100000 !important;
}

#storeArea {
    z-index: 99999 !important;
}

/* Золотой текст во всех модальных окнах */
.modal .modal-content,
.modal .modal-content *,
#productModal *,
#friendsModal *,
#avatarModal *,
#appsModal *,
#globalRankingModal *,
#rulesModal *,
#adminModal *,
#testAvatarModal *,
#storeArea * {
    color: #fcf6ba !important;
    text-shadow: none !important;
}

/* Возвращаем нормальный фон модальных окон */
.modal .modal-content {
    background: #16213e !important;
    border: 2px solid #fcf6ba !important;
}

/* Кнопки в модальных окнах остаются синими */
.modal button,
.modal .modal-content button {
    background: #0f3460 !important;
    color: white !important;
    border: 1px solid #4a8fe0 !important;
    text-shadow: none !important;
}

/* Интерпретация карт не меняется (только в режиме показа текста) */
.card.large.full-mode,
.card.large.full-mode *,
.card.large.full-mode .full-text-content,
.card.large.full-mode p,
.card.large.full-mode span {
    background: #F5F5DC !important;
    color: #4A2C2C !important;
}

/* Вертикальное расположение кнопок управления */
.deck-controls {
    gap: 8px;
}

.deck-controls button {
    width: 100%;
    text-align: center;
}

/* ===== ЕДИНЫЙ ЦВЕТ ДЛЯ РЕЙТИНГА В КАЮТЕ ПИЛОТА ===== */
.ranking-score,
.ranking-place,
.gold-text-apply {
    color: #fcf6ba !important;
}

/* Рамка аватара в рейтинге */
.ranking-avatar {
    border: 1px solid #fcf6ba !important;
}

/* Цифры места и раскладов в каюте */
#profileTab .ranking-place,
#profileTab .ranking-score,
#rankingTab .ranking-place,
#rankingTab .ranking-score {
    color: #fcf6ba !important;
}

.ranking-place {
    color: #fcf6ba !important;
}

.ranking-avatar {
    border: 1px solid #ffd700;  /* ← жёлтая рамка */
}


/* Админ-панель - табы */
.admin-tab-btn {
    background: #0f3460;
    color: white;
    border: 1px solid #4a8fe0;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
}
.admin-tab-btn.active {
    background: #ffd700;
    color: #1a1a2e;
    border-color: #ffd700;
}
.admin-deck-select {
    background: #1a1a2e;
    color: white;
    border: 1px solid #4a8fe0;
    border-radius: 15px;
    padding: 4px 8px;
    margin-right: 5px;
}
.grant-access-btn, .delete-deck-btn, .revoke-access-btn {
    background: #0f3460;
    color: white;
    border: 1px solid #ffd700;
    border-radius: 15px;
    padding: 4px 12px;
    cursor: pointer;
}
.grant-access-btn:hover, .delete-deck-btn:hover, .revoke-access-btn:hover {
    background: #1a4b8c;
}

/* Убираем содержимое у перевернутых карт */
.card.back img,
.card.back .mini-card,
.card.back .full-text-content {
    display: none !important;
}

/* Большая перевернутая карта */
.card.large.back {
    background-size: auto !important;
    background-position: center !important;
    background-repeat: repeat !important;
}

/* Скрываем всё внутри большой перевернутой карты */
.card.large.back * {
    display: none !important;
}


/* ========== ФИНАЛЬНАЯ МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 768px) {
    /* ----- Запрет горизонтального скролла ----- */
    html, body, .app {
        overflow-x: hidden !important;
    }
    
       /* ----- Гамбургер ----- */
    .hamburger {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1001;
        font-size: 18px;
        color: #fcf6ba;
        background: #0f3460;
        width: 36px;
        height: 36px;
        text-align: center;
        line-height: 36px;
        border-radius: 50%;
        cursor: pointer;
        border: 1px solid #4a8fe0;
    }
    .main-content {
        margin-top: 54px;
        margin-bottom: 56px;
        padding: 5px !important;
    }

    /* ----- Сайдбар: прозрачный, размытый, компактный ----- */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -190px !important;
        width: 170px !important;
        height: 100% !important;
        background: rgba(10, 20, 30, 0.65) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        padding: 6px 4px !important;
        gap: 4px !important;
        z-index: 1050 !important;
        transition: left 0.25s ease !important;
        overflow-y: auto !important;
        border: none !important;
    }
    .sidebar.open {
        left: 0 !important;
    }

    /* ----- Аватар и профиль ----- */
    .sidebar .avatar-container {
        width: 28px !important;
        height: 28px !important;
        margin: 0 auto 2px !important;
        background: none !important;
        border: none !important;
    }
    .sidebar .avatar {
        width: 28px !important;
        height: 28px !important;
        border: 1px solid #fcf6ba !important;
    }
    .sidebar .profile-section {
        background: transparent !important;
        padding: 2px 0 !important;
        margin: 0 !important;
    }
    .sidebar .stats,
    .sidebar .logo-placeholder {
        display: none !important;
    }
    .sidebar .game-logo h1 {
        font-size: 0.55rem !important;
        margin-bottom: 2px;
    }

    /* ----- Скрываем ненужные дублирующие кнопки (Перевернуть, Тасовать, Сбросить) в сайдбаре ----- */
    .sidebar .deck-controls {
        display: none !important;
    }

    /* ----- ВСЕ КНОПКИ (включая 10 основных, Скафандр, Эвакуацию) – максимально мелко ----- */
    /* Было */
.sidebar button,
.sidebar .limit-btn,
... {
    font-size: 0.25rem !important;
    padding: 1px 2px !important;
    min-height: 16px !important;
}

/* Кнопки в сайдбаре - чуть увеличенные */
.sidebar button,
.sidebar .limit-btn,
.sidebar .lang-btn,
.sidebar #loadDeckBtn,
.sidebar .store-btn,
.sidebar .deck-controls button,
.sidebar #openSkinsBtn,
.sidebar #leaveGameBtn,
.sidebar .store-section button {
    font-size: 0.65rem !important;
    padding: 4px 6px !important;
    min-height: 26px !important;
    line-height: 1.2 !important;
    border-radius: 12px !important;
}

/* Текст внутри кнопок - заметно крупнее */
.sidebar button span,
.sidebar .store-btn span,
.sidebar .gold-ui-text {
    font-size: 1.8rem !important;
    padding: 0 !important;
    letter-spacing: normal !important;
}
    /* Расстояния между группами кнопок */
    .sidebar .store-section,
    .sidebar .card-limit-buttons,
    .sidebar .lang-switcher {
        gap: 2px !important;
        margin: 2px 0 !important;
    }
    .sidebar .lang-btn {
        padding: 1px 2px !important;
        min-width: 22px !important;
    }

    /* ----- Ползунки ----- */
    .sidebar .settings-panel {
        padding: 3px !important;
        gap: 2px !important;
    }
    .sidebar .setting-item {
        font-size: 0.35rem !important;
        gap: 2px !important;
    }
    .sidebar .setting-item input[type=range] {
        width: 55px !important;
        height: 3px !important;
    }
    /* Скрываем ползунки "Расстояние" и "Карт в ряду" */
    .sidebar .settings-panel .setting-item:nth-child(3),
    .sidebar .settings-panel .setting-item:nth-child(4) {
        display: none !important;
    }

    /* ----- Архив данных ----- */
    .library-section h3 {
        display: none !important;
    }
    .sidebar .deck-card {
        padding: 2px !important;
        gap: 2px !important;
    }
    .sidebar .deck-cover {
        width: 18px !important;
        height: 26px !important;
    }
    .sidebar .deck-info h4 {
        font-size: 0.35rem !important;
        margin: 0 !important;
    }
    .sidebar .deck-info p {
        display: none !important;
    }

    /* ----- Карты (игровое поле) ----- */
    .deck-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(var(--card-small-width, 40px), auto)) !important;
        gap: var(--card-gap, 3px) !important;
        justify-content: center !important;
    }
    .work-area {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(var(--card-small-width, 40px), auto)) !important;
        gap: var(--card-gap, 3px) !important;
        justify-content: center !important;
    }
    .card {
        width: var(--card-small-width, 40px) !important;
        font-size: 0.35rem !important;
    }
    /* Большая карта: значение ползунка, рамка синяя (как в ПК) */
    .card.large,
    .card.large.full-mode {
        width: min(var(--card-large-width, 260px), 90vw) !important;
        max-width: 90vw !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 10001 !important;
        border: 2px solid #0f3460 !important;
        background: #16213e !important;
    }
    /* Рубашка большой карты */
    .card.large.back {
        background-size: cover !important;
        background-position: center !important;
    }
    /* Режим текста – бежевый фон, коричневая рамка */
    .card.large.full-mode {
        background: #F5F5DC !important;
        border: 2px solid #4A2C2C !important;
        color: #4A2C2C !important;
    }

    /* ----- Нижняя панель эмодзи (только переворот, тасование, сброс) ----- */
    .mobile-actions-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(22, 33, 62, 0.9);
        backdrop-filter: blur(6px);
        display: flex;
        justify-content: space-around;
        padding: 4px;
        z-index: 1000;
        border-top: 1px solid #4a8fe0;
    }
    .mobile-actions-bar button {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.2rem !important;
        background: #0f3460;
        border-radius: 40px;
        color: #fcf6ba;
    }
    /* Скрываем кнопку «Режим» везде */
    #toggleLargeModeBtn,
    .deck-controls #toggleLargeModeBtn {
        display: none !important;
    }
    /* ----- Увеличиваем текст внутри кнопок для читаемости ----- */
    .sidebar button,
    .sidebar .store-btn,
    .sidebar #openSkinsBtn,
    .sidebar #leaveGameBtn,
    .sidebar .store-section button,
    .sidebar .limit-btn,
    .sidebar .lang-btn,
    .sidebar #loadDeckBtn {
        font-size: 0.45rem !important;
    }
    .sidebar button span,
    .sidebar .store-btn span,
    .sidebar .gold-ui-text {
        font-size: 0.45rem !important;
    }

    /* ----- Скрываем крестик закрытия сайдбара ----- */
    .sidebar-close {
        display: none !important;
    }
}

/* ===== ПК: возвращаем нормальный размер рубашки ===== */
@media (min-width: 769px) {
    .card.large.back {
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-color: #2c3e50 !important;
    }
    /* Если рубашка маленьких карт тоже увеличилась - вернём */
    .card.back {
        background-size: cover !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
    }
}

/* Убираем все линии над нижними панелями */
.mobile-actions-bar,
.mobile-bottom-buttons,
.my-bottom-buttons {
    border-top: none !important;
    box-shadow: none !important;
}

/* Умеренное увеличение шрифта в кнопках сайдбара на мобилках */
@media (max-width: 768px) {
    .sidebar button,
    .sidebar .store-btn,
    .sidebar .limit-btn,
    .sidebar .lang-btn,
    .sidebar #loadDeckBtn,
    .sidebar .deck-controls button,
    .sidebar #openSkinsBtn,
    .sidebar #leaveGameBtn,
    .sidebar .store-section button {
        font-size: 0.7rem !important;
    }
    .sidebar button span,
    .sidebar .store-btn span,
    .sidebar .gold-ui-text {
        font-size: 0.7rem !important;
    }
}

/* ===== АРХИВ КОЛОД (МОДАЛЬНОЕ ОКНО) ===== */

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 5px;
}

/* Стилизация скролла в архиве */
.archive-grid::-webkit-scrollbar {
    width: 6px;
}
.archive-grid::-webkit-scrollbar-track {
    background: transparent;
}
.archive-grid::-webkit-scrollbar-thumb {
    background: #4a8fe0;
    border-radius: 4px;
}
.archive-grid::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

.archive-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.archive-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #4a8fe0;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.archive-item.selected {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.15);
}

.archive-item .archive-cover {
    width: 100%;
    aspect-ratio: 2/3;
    max-width: 140px;
    object-fit: cover;
    border-radius: 8px;
    background: #0f3460;
    margin-bottom: 10px;
    border: 1px solid #2a4a6a;
}

.archive-item .archive-name {
    font-size: 0.85rem;
    color: #fcf6ba;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    max-height: 2.4em;
    word-break: break-word;
    width: 100%;
}

.archive-item .archive-meta {
    font-size: 0.7rem;
    color: #aaa;
    margin-bottom: 10px;
}

.archive-item .archive-langs {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.archive-item .archive-langs span {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.55rem;
    font-weight: bold;
}

.archive-item .archive-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 4px;
    flex-wrap: wrap;
    width: 100%;
}

.archive-item .archive-actions button {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #4a8fe0;
    background: #0f3460;
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    flex: 1;
    min-width: 60px;
}

.archive-item .archive-actions button:hover {
    background: #1a4b8c;
    transform: scale(1.03);
}

.archive-item .archive-actions .btn-select {
    border-color: #ffd700;
    color: #ffd700;
}

.archive-item .archive-actions .btn-select:hover {
    background: #ffd700;
    color: #1a1a2e;
}

.archive-item .archive-actions .btn-select:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    background: #0f3460;
    color: #4a8fe0;
    border-color: #4a8fe0;
}

.archive-item .archive-actions .btn-delete {
    border-color: #8B0000;
    color: #ff6666;
}

.archive-item .archive-actions .btn-delete:hover {
    background: #8B0000;
    color: white;
    border-color: #8B0000;
}

.archive-counter {
    color: #aaa;
    font-size: 0.85rem;
    text-align: center;
    padding: 4px 0;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        max-height: 50vh;
    }
    .archive-item {
        padding: 10px;
    }
    .archive-item .archive-cover {
        max-width: 100px;
    }
    .archive-item .archive-name {
        font-size: 0.7rem;
    }
    .archive-item .archive-meta {
        font-size: 0.6rem;
    }
    .archive-item .archive-actions button {
        font-size: 0.6rem;
        padding: 4px 10px;
    }
    #archiveModal .modal-content {
        padding: 15px !important;
        width: 95% !important;
    }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    .archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    .archive-item .archive-cover {
        max-width: 80px;
    }
}

/* ===== МАГАЗИН - СЕТКА ТОВАРОВ ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 10px 0;
    max-height: 60vh;
    overflow-y: auto;
}

/* ===== КАРТОЧКА ТОВАРА ===== */
.product-card {
    background: #16213e;
    border: 1px solid #4a8fe0;
    border-radius: 12px;
    padding: 15px 12px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.product-card:hover {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
    transform: translateY(-3px);
}

/* ===== МАГАЗИН - КАРТОЧКИ ТОВАРОВ ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 10px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.product-card {
    background: #16213e;
    border: 1px solid #4a8fe0;
    border-radius: 12px;
    padding: 15px 12px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.product-card:hover {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
    transform: translateY(-3px);
}

/* ===== ОБЛОЖКА ТОВАРА (КАК В АРХИВЕ) ===== */
.product-cover {
    width: 100%;
    aspect-ratio: 2/3;
    max-width: 140px;
    background: #0f3460;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 1px solid #2a4a6a;
}

.product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== ТЕКСТ ===== */
.product-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #fcf6ba;
    margin-bottom: 4px;
    line-height: 1.2;
    min-height: 2.4em;
}

.product-desc {
    font-size: 0.65rem;
    color: #aaa;
    margin-bottom: 6px;
    line-height: 1.3;
    min-height: 2.6em;
}

.product-price {
    font-size: 1rem;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 8px;
}

/* ===== КНОПКИ ===== */
.product-buy {
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    width: 100%;
    transition: 0.2s;
}

.product-buy:hover:not(:disabled) {
    background: #ffed4a;
    transform: scale(1.02);
}

.product-buy:disabled {
    background: #2a5a2a;
    color: #8a8a8a;
    cursor: default;
}

.product-details-btn {
    background: #0f3460;
    color: #fcf6ba;
    border: 1px solid #4a8fe0;
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    margin-top: 5px;
    width: 100%;
    font-size: 0.65rem;
    transition: 0.2s;
}

.product-details-btn:hover {
    background: #1a4b8c;
}

/* ===== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
        padding: 5px 0;
        max-height: 50vh;
    }
    
    .product-card {
        padding: 10px 8px;
    }
    
    .product-cover {
        max-width: 100px;
        font-size: 36px;
    }
    
    .product-title {
        font-size: 0.7rem;
        min-height: 1.8em;
    }
    
    .product-desc {
        font-size: 0.55rem;
        min-height: 2em;
    }
    
    .product-price {
        font-size: 0.85rem;
    }
    
    .product-buy {
        font-size: 0.65rem;
        padding: 5px 10px;
    }
}

/* ===== МОДАЛЬНЫЕ ОКНА ПОВЕРХ ВСЕГО ===== */
#paymentModal,
#bookModal,
#productModal,
#friendsModal,
#avatarModal,
#appsModal,
#globalRankingModal,
#rulesModal,
#adminModal,
#testAvatarModal {
    z-index: 99999 !important;
}

#paymentModal .modal-content,
#bookModal .modal-content,
#productModal .modal-content,
#friendsModal .modal-content,
#avatarModal .modal-content,
#appsModal .modal-content,
#globalRankingModal .modal-content,
#rulesModal .modal-content,
#adminModal .modal-content,
#testAvatarModal .modal-content {
    z-index: 100000 !important;
    position: relative;
}

/* Магазин - чуть ниже */
#storeArea {
    z-index: 9999 !important;
}

/* ===== ПРИЛОЖЕНИЯ (ГИПЕРПРЫЖКИ) ===== */
.apps-list::-webkit-scrollbar {
    width: 6px;
}

.apps-list::-webkit-scrollbar-track {
    background: transparent;
}

.apps-list::-webkit-scrollbar-thumb {
    background: #4a8fe0;
    border-radius: 4px;
}

.apps-list::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

/* ===== СКРЫВАЕМ ЗАГРУЗОЧНЫЙ ШЛЮЗ ДЛЯ ИГРОКОВ ===== */
#loadDeckBtn {
    display: none !important;
}
.show-admin #loadDeckBtn {
    display: flex !important;
}
/* ===== ФИКС ЛЕВОЙ ПАНЕЛИ ===== */
.sidebar,
.left-panel {
    padding-right: 10px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: #ffd700 #0f3460 !important;
}

.sidebar::-webkit-scrollbar,
.left-panel::-webkit-scrollbar {
    width: 4px !important;
}
.sidebar::-webkit-scrollbar-track,
.left-panel::-webkit-scrollbar-track {
    background: #0f3460 !important;
}
.sidebar::-webkit-scrollbar-thumb,
.left-panel::-webkit-scrollbar-thumb {
    background: #ffd700 !important;
    border-radius: 10px !important;
}

/* Каждая кнопка получает отступ */
.sidebar .store-btn,
.left-panel .store-btn,
.sidebar .panel-btn,
.left-panel .panel-btn {
    margin-right: 5px !important;
    box-sizing: border-box !important;
}

/* Секция кнопок */
.store-section {
    padding-right: 5px !important;
}
/* ========================== */
/* Только для Протокола */
#rulesModal .modal-content {
    max-width: 1200px !important;
    width: 95% !important;
}

/* ===== ПЛАШКА ИНФОРМАЦИИ И ПЛАНЕТА ===== */
.info-banner-wrapper {
    display: flex;
    align-items: flex-start; /* Выравниваем по верхнему краю */
    justify-content: center; /* ✅ ЦЕНТРИРУЕМ ВСЁ ПО ГОРИЗОНТАЛИ НА ПК */
    gap: 15px; /* Расстояние между планетой и текстом */
    margin: 15px auto 20px auto; /* Отступы сверху/снизу и авто по бокам */
    padding: 5px 15px;
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 850px; /* Ограничиваем максимальную ширину, чтобы не растягивалось на весь экран */
}

.info-banner {
    background: rgba(15, 52, 96, 0.9);
    color: #fcf6ba;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid #4a8fe0;
    cursor: pointer;
    transition: 0.3s;
    text-align: left;
    display: none;
    flex: 0 1 auto; /* Позволяем тексту занимать нужную ширину */
}

.info-banner:hover {
    background: rgba(15, 52, 96, 1);
    border-color: #ffd700;
}

.info-banner a {
    color: #ffd700;
    font-weight: bold;
    text-decoration: underline;
}

.info-banner a:hover {
    color: #fff;
}

/* ✅ ЖЕСТКИЕ РАЗМЕРЫ ДЛЯ КНОПКИ-ПЛАНЕТЫ */
#infoPlanetBtn {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    cursor: pointer;
    transition: transform 0.3s;
    border-radius: 50%;
    flex-shrink: 0; /* Запрещаем сжимать */
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
    object-fit: cover;
    margin-top: 5px; /* Чуть опускаем планету, чтобы она была на уровне первой строки текста */
}

#infoPlanetBtn:hover {
    transform: scale(1.1);
}

/* ===== АДАПТАЦИЯ ПОД ТЕЛЕФОН ===== */
@media (max-width: 768px) {
    .info-banner-wrapper {
        position: fixed;
        top: 14px; 
        right: 15px;
        left: auto; 
        width: auto;
        margin: 0;
        padding: 0;
    }

    /* На телефоне текст выпадает вниз, а не сбоку */
    .info-banner {
        position: absolute;
        top: 55px;
        right: 0;
        width: 85vw;
        max-width: 320px;
        font-size: 0.85rem;
        padding: 12px 15px;
    }
}

/* ===== ПОСТОЯННАЯ ПУЛЬСАЦИЯ ДЛЯ НЕЗАРЕГИСТРИРОВАННЫХ ===== */
@keyframes goldPulseInfinite {
    0% { box-shadow: 0 0 5px 2px rgba(255, 215, 0, 0.4); border-color: #4a8fe0; }
    50% { box-shadow: 0 0 20px 8px rgba(255, 215, 0, 0.8); border-color: #ffd700; }
    100% { box-shadow: 0 0 5px 2px rgba(255, 215, 0, 0.4); border-color: #4a8fe0; }
}

.guest-pulse {
    animation: goldPulseInfinite 2s ease-in-out infinite !important;
    border-color: #ffd700 !important;
}

/* ===== ЖЕСТКАЯ ФИКСАЦИЯ ПЛАНЕТЫ НА МОБИЛКАХ ===== */
@media (max-width: 768px) {
    #infoPlanetBtn {
        width: 44px !important;
        height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 1002 !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* Прячем саму плашку с текстом, чтобы не мешала */
    .info-banner-wrapper {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 1002 !important;
    }

    /* Текст плашки — выпадает вниз, если нажать на планету */
    .info-banner {
        position: absolute !important;
        top: 55px !important;
        right: 0 !important;
        width: 85vw !important;
        max-width: 320px !important;
        font-size: 0.85rem !important;
        padding: 12px 15px !important;
        display: none;
    }
}

/* ===== ФИКС СПИСКОВ В ПРОТОКОЛЕ ===== */
#rulesContent ol,
#rulesContent ul {
    padding-left: 25px !important; /* Чуть уменьшаем стандартный отступ */
    margin-top: 5px;
    margin-bottom: 15px;
}

#rulesContent ol li,
#rulesContent ul li {
    margin-bottom: 8px; /* Добавляем немного воздуха между пунктами */
    line-height: 1.5;
}

#rulesContent h2 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #ffd700; /* Делаем заголовки частей золотыми */
}

#rulesContent h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #fcf6ba; /* Подзаголовки чуть светлее */
}

/* ===== УМЕНЬШАЕМ ОТСТУПЫ В ПРОТОКОЛЕ ===== */
#rulesContent p,
#rulesContent ul,
#rulesContent ol {
    margin-top: 4px !important;
    margin-bottom: 8px !important;
    padding-left: 20px;
}

#rulesContent li {
    margin-bottom: 4px !important;
}

#rulesContent h2 {
    margin-top: 15px !important;
    margin-bottom: 10px !important;
}

#rulesContent h3 {
    margin-top: 12px !important;
    margin-bottom: 6px !important;
}

#rulesContent h4 {
    margin-top: 10px !important;
    margin-bottom: 4px !important;
}