/* public/dashboard.css */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #1a233a; /* Темный фон для игрового дашборда */
    color: #e0e0e0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Чтобы панель была сверху, если контент не заполняет весь экран */
    min-height: 90vh;
    padding-top: 20px; /* Отступ сверху */
}

.dashboard-container {
    width: 100%;
    max-width: 1000px; /* Ширина основного контейнера */
    background-color: #25314c; /* Чуть светлее фона */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* dashboard.css */
.reward-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}
.reward-day-item {
    padding: 10px;
    border: 2px solid #3a4a6d;
    border-radius: 6px;
    text-align: center;
    background-color: #1e2a45;
    transition: all 0.2s ease-in-out;
}
.reward-day-item .day-number {
    font-weight: bold;
    font-size: 1.1em;
    display: block;
}
.reward-day-item .reward-icon {
    font-size: 1.5em;
    margin: 5px 0;
}
.reward-day-item .reward-amount {
    font-size: 0.8em;
}

/* Стили для разных состояний */
.reward-day-item.claimed {
    background-color: #2c3e50;
    border-color: #27ae60;
}
.reward-day-item.current {
    border-color: #f1c40f;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.5);
}
/* dashboard.css */
.prize-list {
    list-style: none;
    padding: 0;
    font-size: 0.9em;
    column-count: 2; /* Располагаем в 2 колонки для компактности */
}
.prize-list li {
    padding: 5px;
}

/* Стили для слот-машины */
.slot-machine {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background-color: #1e2a45;
    border-radius: 8px;
}
.slot-reel {
    width: 80px;
    height: 100px;
    background-color: #2c3e50;
    border: 2px solid #4a5a7d;
    border-radius: 6px;
    display: flex;
    /* Изменяем flex-direction, чтобы иконка и текст были друг под другом */
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    
    /* Убираем font-size отсюда, будем задавать его для дочерних элементов */
    font-weight: bold;
    color: #f1c40f;
    overflow: hidden;
    position: relative;
    padding: 5px; /* Добавляем небольшой padding */
    box-sizing: border-box; /* Чтобы padding не увеличивал размер */
}

/* Стили для иконки и текста ВНУТРИ ячейки */
.slot-reel i {
    font-size: 2.5em; /* Размер иконки */
    line-height: 1; /* Убираем лишнее пространство */
}

.slot-reel span {
    position: static; /* Убираем position: absolute, если он был */
    /* Используем clamp для адаптивного шрифта */
    /* clamp(MIN, PREFERRED, MAX) */
    font-size: clamp(0.8rem, 3.5vw, 1.2rem);
    line-height: 1.2;
    text-align: center;
    white-space: normal; /* Разрешаем перенос, если нужно */
}
/* dashboard.css */
.prize-list.detailed {
    column-count: 1; /* В одну колонку для подробного списка */
    text-align: left;
}
.prize-list.detailed li {
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.prize-list.detailed i {
    color: #a0b0d0;
}
/* Обертка для валюты для позиционирования */
.currency-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 15px;
}

/* Стили для всплывающего текста награды */
.reward-popup {
    position: absolute;
    top: -25px; /* Начальная позиция над балансом */
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 8px;
    background-color: rgba(46, 204, 113, 0.9); /* Полупрозрачный зеленый */
    color: white;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: all 1.5s ease-out;
    pointer-events: none; /* Чтобы не мешал кликам */
}

/* Анимация: всплытие и исчезновение */
.reward-popup.show {
    top: -50px; /* Конечная позиция */
    opacity: 1;
}

/* Финальное состояние для плавного исчезновения */
.reward-popup.fade-out {
    opacity: 0;
}
/* --- Header --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #1e2a45; /* Еще темнее для хедера */
    border-bottom: 1px solid #3a4a6d;
}

.clan-tag {
    color: #a0b0d0; /* Светло-серый, как в чате */
    font-weight: normal;
    margin-right: 5px;
}
.username {
    font-weight: bold; /* По умолчанию делаем ник жирным */
}
.header-left .icon-button {
    background: none;
    border: none;
    color: #a0b0d0;
    font-size: 1.3em;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    transition: color 0.2s ease;
}
.header-left .icon-button:hover {
    color: #fff;
}
.delete-button:hover {
    color: #ff4d4d;
}

.header-user {
    font-size: 0.9em;
    color: #c0d0f0;
}
#dashboardUsername {
    font-weight: bold;
    color: #fff;
}
#logoutButtonDashboard {
    margin-left: 15px;
    padding: 6px 12px;
    font-size: 0.8em;
}

.header-right {
    display: flex;
    align-items: center;
}
.currency {
    display: flex;
    align-items: center;
    margin-left: 20px;
    font-size: 1.1em;
    font-weight: bold;
}
.currency .fas {
    margin-left: 5px;
}
.gold-icon { color: #ffd700; }
.bucks-icon { color: #28a745; }


/* --- Main Content --- */
.dashboard-main {
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* dashboard.css */
.online-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    color: #e0e0e0;
    font-size: 1.1em;
    margin-right: 15px; /* Отступ от валют */
}
/* dashboard.css */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: bold;
    border: 1px solid #25314c;
}

.notification-dropdown {
    position: absolute;
    top: 65px; /* Подстройте под высоту вашего хедера */
    right: 150px; /* Подстройте под расположение иконки */
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background-color: #2c3e50;
    border: 1px solid #4a5a7d;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    z-index: 1001;
    padding: 15px;
}
.notification-dropdown h4 {
    margin: 0 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a5a7d;
}
.notification-item {
    padding: 10px 0;
    border-bottom: 1px solid #3a4a6d;
    font-size: 0.9em;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item .time-ago {
    display: block;
    font-size: 0.8em;
    color: #95a5a6;
}
/* dashboard.css */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    min-width: 250px;
}
/* dashboard.css */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}
.modal.show {
    display: flex;
}
.modal-content {
    background-color: #2c3e50;
    color: #e0e0e0;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    position: relative;
}
/* Делаем окно настроек шире */
#settingsModal .modal-content {
    max-width: 650px;
}

/* Окно смены пароля можно оставить стандартным или тоже увеличить */
#changePasswordModal .modal-content {
    max-width: 550px; 
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background-color: #2ecc71;
}

.toast.error {
    background-color: #e74c3c;
}

.toast.info {
    background-color: #3498db;
}

.clan-tag {
    color: #00f90c; /* Светло-серый, чтобы не был слишком навязчивым */
    font-weight: bold;
    margin-right: 5px;
    font-family: 'Consolas', 'monospace'; /* Моноширинный шрифт для тегов */
}
/* --- Team Info Panel --- */
.team-info-panel {
    background-color: #1e2a45; /* Такой же как хедер или чуть другой */
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    max-width: 865px; /* Ширина центрального блока */
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.team-name-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.team-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #4a5a7d;
}
#teamName {
    font-size: 1.8em;
    color: #fff;
    margin: 0;
    font-weight: 700;
}

.team-level-section h3 {
    font-size: 1.1em;
    color: #a0b0d0;
    margin-bottom: 8px;
    font-weight: 500;
}
#teamLevel { font-weight: bold; color: #fff; }

.quests-list-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}
.quest-item {
    background-color: #1e2a45;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.quest-info { flex-grow: 1; }
.quest-info strong { display: block; }
.quest-info small { color: #a0b0d0; }
.quest-progress { text-align: right; font-size: 0.9em; }
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #3a4a6d;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background-color: #2ecc71;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.quest-action .btn { width: 120px; } /* Фикс. ширина кнопки */

/* Стиль для выполненного квеста */
.quest-item.completed { opacity: 0.6; }

.xp-bar-container {
    width: 80%;
    margin: 0 auto 15px auto;
}
.xp-bar {
    height: 12px;
    background-color: #3a4a6d;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}
.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 6px;
    transition: width 0.5s ease-in-out;
}
.xp-text {
    font-size: 0.8em;
    color: #a0b0d0;
}

.team-stats-section {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    border-top: 1px solid #3a4a6d;
    padding-top: 20px;
}
.stat-block {
    text-align: center;
}
.stat-block .stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 3px;
}
.stat-block .stat-label {
    font-size: 0.75em;
    color: #a0b0d0;
    text-transform: uppercase;
}
.rating-block .stat-value { color: #28a745; } /* Рейтинг зеленым */

/* --- Dashboard Actions (Energy & Buttons) --- */
.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Кнопки и энергия внизу */
    width: 100%;
    margin-top: 20px; /* Отступ от центрального блока */
}

.energy-section {
    text-align: center;
    flex-basis: 25%; /* Занимает часть ширины */
}
.energy-panel-widget {
    margin-top: 25px; /* Или другое значение */
}
.energy-section h4 {
    font-size: 0.9em;
    
    margin-bottom: 10px;
    font-weight: 500;
}
.dashboard-panel.panel-transparent {
    background: none; /* Убираем фон */
    box-shadow: none;   /* Убираем тень */
    padding: 0;         /* Убираем внутренние отступы, если они не нужны */
}
.energy-bar-container {
    margin-bottom: 5px;
}
.energy-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
}
.energy-unit {
    width: 12px;
    height: 20px;
    background-color: #3a4a6d; /* Пустая энергия */
    border-radius: 3px;
    border: 1px solid #5a6a8d;
}
.energy-unit.filled {
    background-color: #ffc107; /* Заполненная энергия (желтая) */
    border-color: #e0a800;
}
#energyText { font-size: 0.9em; display: block; margin-bottom: 3px;}
#energyRefillTimer { font-size: 0.7em; color: #8090b0; }


.main-buttons {
    display: flex;
    flex-direction: column; /* Кнопки в столбик */
    gap: 15px;
    flex-basis: 40%; /* Занимает большую часть */
    align-items: center;
}
.btn-action {
    width: 80%; /* Ширина кнопок */
    max-width: 250px;
    padding: 15px 20px;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-action .fas {
    margin-right: 10px;
}
.btn-play {
    background-color: #28a745; /* Зеленая для "Играть" */
    color: white;
}
.btn-play:hover { background-color: #1e7e34; }

/* --- Общие стили для кнопок и модальных окон (можно вынести в style.css) --- */
.btn { /* Уже есть в вашем style.css, можно дополнить */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
}
.btn:active {
    transform: scale(0.98);
}
.btn-small { padding: 8px 12px; font-size: 0.9em; }
.btn-secondary { background-color: #6c757d; color: white; }
.btn-secondary:hover { background-color: #5a6268; }
.btn-primary { background-color: #007bff; color: white; }
.btn-primary:hover { background-color: #0056b3; }


/* --- Модальное окно поддержки --- */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #2c3e50; /* Темнее, чем основной дашборд */
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    position: relative;
    color: #e0e0e0;
}
.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-button:hover,
.close-button:focus {
    color: #fff;
}
.modal-content h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #fff;
}
.modal .form-group label { color: #a0b0d0; }
.modal .form-group input[type="text"],
.modal .form-group textarea {
    background-color: #1e2a45;
    border: 1px solid #3a4a6d;
    color: #e0e0e0;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 0; /* убираем лишний отступ, если он есть от общего .form-group */
}
.modal .form-group textarea { resize: vertical; }
.modal .form-message { margin-top: 10px; }

.editable-team-name {
    display: flex;
    align-items: center;
    gap: 8px; /* Промежуток между элементами */
}

.editable-team-name h2 {
    margin: 0; /* Убираем стандартные отступы у h2 */
    font-size: 1.8em; /* Как было у #teamName */
    color: #fff;
    font-weight: 700;
}

.editable-team-name input[type="text"] {
    font-size: 1.6em; /* Чуть меньше h2, чтобы выглядело как редактирование */
    padding: 5px 8px;
    border: 1px solid #4a5a7d;
    background-color: #1e2a45;
    color: #e0e0e0;
    border-radius: 5px;
    max-width: 250px; /* Ограничение ширины инпута */
}

.icon-button-small {
    background: none;
    border: none;
    color: #a0b0d0;
    font-size: 1.1em; /* Размер иконок */
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}
.icon-button-small:hover {
    color: #fff;
}
.icon-button-small .fa-save:hover { color: #28a745; } /* Зеленый для сохранения */
.icon-button-small .fa-times:hover { color: #dc3545; } /* Красный для отмены */

.form-message.small-message { /* Для сообщений под именем команды */
    font-size: 0.8em;
    text-align: center; /* Или как вам нужно */
    margin-top: 5px;
    min-height: 1em;
}
/* public/dashboard.css или style.css */
.editable-team-name {
    display: flex;
    align-items: center;
    gap: 8px; /* Пространство между элементами */
}

#teamNameDisplay {
    margin: 0; /* Убираем стандартные отступы h2 */
    font-size: 1.8em; /* Как было */
    color: #fff;
    font-weight: 700;
}

#teamNameInput {
    font-size: 1.6em; /* Чуть меньше, чтобы влезли кнопки */
    padding: 5px 8px;
    border: 1px solid #4a5a7d;
    background-color: #1e2a45;
    color: #e0e0e0;
    border-radius: 4px;
    max-width: 200px; /* Ограничение ширины */
}

.icon-button-small {
    background: none;
    border: none;
    color: #a0b0d0;
    font-size: 1em; /* Размер иконки */
    padding: 5px;
    cursor: pointer;
    transition: color 0.2s ease;
}
.icon-button-small:hover {
    color: #fff;
}
#saveTeamNameButton:hover {
    color: #28a745; /* Зеленый для сохранения */
}
#cancelEditTeamNameButton:hover {
    color: #ffc107; /* Желтый для отмены */
}

.small-message {
    font-size: 0.85em;
    min-height: 1em; /* Чтобы не прыгало при появлении */
    margin-top: 5px;
}
.form-message.info { color: #75a3d4; }
.form-message.success { color: #28a745; }
.form-message.error { color: #dc3545; }
.btn-shop {
    background-color: #e67e22; /* Пример: оранжевый цвет для магазина */
    color: white;
}
.btn-shop:hover {
    background-color: #d35400; /* Более темный оранжевый при наведении */
}
.currency-add-btn {
    background-color: #4a5a7d;
    color: #e0e0e0;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 18px; /* Выровнять + по центру */
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.2s ease;
}
.currency-add-btn:hover {
    background-color: #6a7a9d;
}
/* Добавьте это в dashboard.css или в <style> на dashboard.html */

/* Стили для контейнера карт на продажу в модальном окне */
#sellableCardsContainer {
    display: grid;
    grid-template-columns: 1fr; /* Одна колонка для списка */
    gap: 8px;
}

/* Стиль для одного элемента (карты) в списке продажи */
.sellable-card-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px;
    border: 2px solid #3a4a6d; /* Темная рамка по умолчанию */
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    background-color: #1e2a45; /* Фон элемента */
}

/* Стиль при наведении на карту */
.sellable-card-item:hover {
    background-color: #34495e;
}

/* Стиль для ВЫБРАННОЙ карты */
.sellable-card-item.selected {
    border-color: #ffd700; /* Яркая золотая рамка */
    background-color: #4a5a7d; /* Слегка подсвеченный фон */
    transform: scale(1.02); /* Немного увеличить для акцента */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); /* Легкое свечение */
}

/* Стили для изображения и текста внутри элемента */
.sellable-card-item img {
    width: 50px;
    height: 70px; /* Задаем высоту для единообразия */
    object-fit: cover;
    border-radius: 4px;
}

.sellable-card-item div {
    text-align: left;
}

.sellable-card-item strong {
    color: #ecf0f1;
}

.sellable-card-item p {
    margin: 2px 0;
    font-size: 0.9em;
    color: #bdc3c7;
}