/* style.css - Общие стили для всего проекта */

/* ---------- ОСНОВНЫЕ СТИЛИ ---------- */
body {
    background: #000;
    color: #fff;
    font-family: monospace;
    margin: 0;
    padding: 0;
}

/* ---------- КОНТЕЙНЕРЫ ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.box {
    background: #111;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
    margin: 20px auto;
    width: 90%;
    max-width: 500px;
}

/* ---------- ФОРМЫ ---------- */
input, textarea, select {
    width: 100%;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    padding: 12px;
    margin-bottom: 15px;
    box-sizing: border-box;
    border-radius: 5px;
    font-family: monospace;
}

input:focus, textarea:focus, select:focus {
    outline: 1px solid #0f0;
    border-color: #0f0;
}

label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    color: #0f0;
    font-size: 12px;
    text-transform: uppercase;
}

/* ---------- КНОПКИ ---------- */
button {
    background: #0f0;
    color: #000;
    border: none;
    padding: 15px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    font-size: 16px;
    font-family: monospace;
    transition: all 0.2s;
}

button:hover {
    background: #fff;
}

button:disabled {
    background: #040;
    color: #080;
    cursor: not-allowed;
}

/* ---------- ССЫЛКИ ---------- */
a {
    color: #0f0;
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    text-decoration: underline;
}

/* ---------- ЧЕКБОКСЫ ---------- */
.checkbox-container {
    display: flex;
    align-items: center;
    margin: 15px 0;
    text-align: left;
    background: #1a1a1a;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #333;
}

.checkbox-container input {
    width: auto;
    margin-right: 10px;
    margin-bottom: 0;
    transform: scale(1.2);
}

.checkbox-container label {
    margin-bottom: 0;
    color: #fff;
    text-transform: none;
    font-size: 14px;
    cursor: pointer;
}

.hint {
    color: #666;
    font-size: 11px;
    margin-top: -5px;
    margin-bottom: 10px;
    text-align: left;
    padding-left: 25px;
}

/* ---------- СТАТУСЫ ---------- */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 10px;
}

.status-active {
    background: #0f0;
    color: #000;
}

.status-frozen {
    background: #f00;
    color: #fff;
}

/* ---------- НАВИГАЦИЯ ---------- */
.nav-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a, .nav-links button.nav-btn {
    color: #0f0;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 15px;
    border: 1px solid #0f0;
    border-radius: 20px;
    transition: all 0.2s;
    background: transparent;
    cursor: pointer;
    font-family: monospace;
    width: auto;
}

.nav-links a:hover, .nav-links button.nav-btn:hover {
    background: #0f0;
    color: #000;
}

/* ---------- РЕДАКТОР ФОТО ---------- */
.photo-preview {
    margin: 15px 0;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 10px;
}

.photo-preview img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0f0;
}

#editor-container {
    display: none;
    margin-bottom: 20px;
    border: 1px dashed #444;
    padding: 10px;
}

#canvas-editor {
    cursor: move;
    border: 1px solid #0f0;
    background: #000;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.zoom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.zoom-btn {
    background: #222;
    color: #0f0;
    border: 1px solid #444;
    padding: 5px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    width: auto;
}

.zoom-btn:hover {
    background: #0f0;
    color: #000;
}

.zoom-level {
    color: #0f0;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
}

/* ---------- СООБЩЕНИЯ ---------- */
.error {
    color: #f00;
    margin: 10px 0;
    font-weight: bold;
}

.success {
    color: #0f0;
    margin: 10px 0;
    font-weight: bold;
}

/* ---------- ТОКЕН ---------- */
.token-val {
    background: #222;
    padding: 20px;
    font-size: 22px;
    color: #fff;
    border: 2px solid #0f0;
    margin: 20px 0;
    font-family: monospace;
    word-break: break-all;
}

/* ---------- ПРИВАТНОСТЬ ---------- */
.private-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00f;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.hidden-message {
    color: #00f;
    font-style: italic;
    padding: 20px;
    background: #001;
    border-radius: 5px;
    margin: 10px 0;
}

/* ---------- ПОИСК (общий) ---------- */
.search-box {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 30px;
    border: 1px solid #333;
    backdrop-filter: blur(5px);
    z-index: 90;
    display: flex;
    gap: 10px;
}

.search-box input {
    background: #222;
    border: 1px solid #444;
    color: #0f0;
    padding: 8px 15px;
    border-radius: 20px;
    width: 200px;
    font-family: monospace;
    margin-bottom: 0;
}

.search-box button {
    background: #0f0;
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-family: monospace;
    width: auto;
}

.search-box button:hover {
    background: #fff;
}

/* ---------- ИНДИКАТОР ЭРЫ ---------- */
.era-indicator {
    position: fixed;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 15px 40px;
    border-radius: 50px;
    border: 2px solid #0f0;
    color: #0f0;
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 80;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(0,255,0,0.3);
}

/* ---------- HUD ---------- */
#hud {
    position: fixed;
    top: 20px;
    right: 20px;
    text-align: right;
    pointer-events: none;
    background: rgba(0,0,0,0.7);
    padding: 15px 20px;
    border-radius: 10px;
    border: 2px solid #0f0;
    font-size: 16px;
    line-height: 1.6;
    min-width: 160px;
    z-index: 80;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(0,255,0,0.2);
}

#hud div {
    border-bottom: 1px solid #333;
    padding: 5px 0;
}

#hud div:last-child {
    border-bottom: none;
}

#hud #era-display {
    font-size: 24px;
    font-weight: bold;
    color: #0f0;
    text-shadow: 0 0 10px #0f0;
}

/* ---------- ПОДСКАЗКИ ПО УПРАВЛЕНИЮ ---------- */
#controls-hint {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #333;
    font-size: 12px;
    color: #888;
    line-height: 1.8;
    z-index: 90;
}

#controls-hint kbd {
    background: #222;
    border: 1px solid #444;
    padding: 2px 6px;
    border-radius: 4px;
    color: #0f0;
}

/* ---------- ДОК (НИЖНЕЕ МЕНЮ) ---------- */
#dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10,10,15,0.9);
    padding: 10px 30px;
    border: 1px solid #333;
    border-radius: 50px;
    display: flex;
    gap: 20px;
    z-index: 100;
    backdrop-filter: blur(5px);
}

#dock a {
    color: #0f0;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.2s;
}

#dock a:hover {
    background: #0f0;
    color: #000;
    text-decoration: none;
}

/* ---------- ОВЕРЛЕЙ КАРТОЧКИ ЗВЕЗДЫ ---------- */
#overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    padding: 25px;
    display: none;
    width: 350px;
    text-align: center;
    border: 1px solid #333;
    border-radius: 15px;
    z-index: 200;
    box-shadow: 0 0 30px rgba(0,255,0,0.2);
}

#overlay img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0f0;
    display: block;
    margin: 0 auto;
}

#overlay button {
    width: auto;
    padding: 10px 30px;
    margin-top: 15px;
}

/* Исправлено: добавлены свойства для переноса текста и прокрутки */
#overlay #starText {
    color: #ccc;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: #222;
    border-radius: 5px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/*жалобы */
#complain-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s;
    filter: drop-shadow(0 0 5px rgba(255,0,0,0.5));
}

#complain-icon:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px #f00);
}

/* ---------- КАРТА (общие стили) ---------- */
#map-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.map-object {
    position: absolute;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: filter 0.2s;
}

.map-object:hover {
    filter: drop-shadow(0 0 10px #0f0);
}

#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0f0;
    font-size: 20px;
    display: none;
    z-index: 1000;
}

/* ---------- ГАЛАКТИКА (общие стили) ---------- */
#back {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border: 2px solid #0f0;
    border-radius: 30px;
    color: #0f0;
    text-decoration: none;
    z-index: 100;
    transition: all 0.2s;
}

#back:hover {
    background: #0f0;
    color: #000;
}

canvas {
    display: block;
}

#starCount {
    color: #0f0;
}

/* ---------- ПРЕМИУМ-ОПЦИИ (общие) ---------- */
.premium-option {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.premium-option h3 {
    color: #0f0;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.slider-container input[type=range] {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.value-display {
    background: #000;
    border: 1px solid #0f0;
    border-radius: 4px;
    padding: 5px 10px;
    font-family: monospace;
    color: #0f0;
    min-width: 60px;
    text-align: center;
}

.price-tag {
    background: #0f0;
    color: #000;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
}

.char-counter {
    text-align: right;
    color: #888;
    font-size: 12px;
    margin-top: -10px;
    margin-bottom: 10px;
}

#total-cost {
    font-size: 24px;
    font-weight: bold;
    color: #0f0;
    margin: 20px 0;
}

.info-message {
    background: #1a1a1a;
    border: 1px solid #0f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #0f0;
    text-align: center;
}

.example-stars {
    display: flex;
    gap: 30px;
    margin: 15px 0;
    align-items: center;
    justify-content: center;
}

.example-star {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.star-circle {
    background: #fff;
    border-radius: 50%;
    border: 1px solid #0f0;
}

/* ---------- СЕТКА ИКОНОК ---------- */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 10px;
}

.icon-option {
    cursor: pointer;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
}

.icon-option:hover {
    border-color: #0f0;
    background: #222;
}

.icon-option.selected {
    border-color: #0f0;
    background: #0f0;
}

.icon-option img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.icon-option span {
    display: block;
    color: #fff;
    font-size: 11px;
    margin-top: 5px;
}

.icon-option.selected span {
    color: #000;
    font-weight: bold;
}

/* ---------- ТОКЕН-ОВЕРЛЕЙ ---------- */
#token-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

#token-overlay .box {
    background: #111;
    border: 2px solid #0f0;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    text-align: center;
}

/* ---------- ТИП-БЕЙДЖ ---------- */
#type-badge {
    margin-left: 10px;
    color: #0f0;
    font-size: 12px;
}

/* ---------- ТОКЕН-ИНПУТ КОНТЕЙНЕР ---------- */
.token-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.token-input-container input {
    flex: 1;
    margin-bottom: 0;
}

.token-input-container button {
    width: auto;
    padding: 12px 20px;
    white-space: nowrap;
}

/* Селектор валюты */
.currency-selector-container {
    margin-bottom: 20px;
    text-align: left;
}

.currency-selector-container label {
    display: block;
    color: #0f0;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.currency-select {
    width: 100%;
    background: #000;
    color: #0f0;
    border: 1px solid #0f0;
    border-radius: 5px;
    padding: 12px;
    font-family: monospace;
    font-size: 16px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.currency-select option {
    background: #111;
    color: #0f0;
    padding: 10px;
}

.currency-select:hover,
.currency-select:focus {
    outline: none;
    border-color: #0f0;
    box-shadow: 0 0 5px rgba(0,255,0,0.3);
}

/* ---------- МОДАЛЬНОЕ ОКНО ВЫБОРА ЯЗЫКА ---------- */
#lang-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

#lang-modal .modal-content {
    background: #111;
    border: 2px solid #0f0;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

#lang-modal h2 {
    color: #0f0;
    margin-bottom: 25px;
    font-size: 24px;
}

#lang-modal .lang-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

#lang-modal .lang-btn {
    background: #222;
    color: #0f0;
    border: 2px solid #333;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 18px;
    font-family: monospace;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#lang-modal .lang-btn:hover {
    background: #0f0;
    color: #000;
    border-color: #0f0;
}

#lang-modal .lang-btn.active {
    background: #0f0;
    color: #000;
    border-color: #0f0;
}

#lang-modal .close-btn {
    background: #333;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

#lang-modal .close-btn:hover {
    background: #f00;
}

#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    max-width: 300px;
    width: 100%;
}

.notification-content {
    background: #111;
    border: 1px solid #0f0;
    border-radius: 10px;
    padding: 12px 20px;
    color: #0f0;
    font-size: 10px;
    box-shadow: 0 0 15px rgba(0,255,0,0.3);
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: all 0.3s;
}

.notification:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px #0f0;
}

/* Стили для оверлея с токеном */
.token-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.token-actions button {
    background: #0f0;
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    font-family: monospace;
}

.token-actions button:hover {
    background: #fff;
    transform: scale(1.02);
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 10px;
    color: #444;
    background: rgba(0,0,0,0.5);
    padding: 4px 0;
    z-index: 40;
    pointer-events: none;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    #complain-icon {
        font-size: 28px; /* чуть крупнее для удобного нажатия */
        top: 8px;
        left: 8px;
    }
	#notification-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    .notification {
        max-width: 100%;
    }
	
	.token-actions button {
        padding: 15px;
        font-size: 16px;
    }
}