/* style.css */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding-bottom: 50px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* === ВЕРХНЯЯ ПАНЕЛЬ === */
.top-bar { 
    background: #1f1f1f; 
    padding: 15px 30px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid #333; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
/*.logo { font-size: 24px; font-weight: bold; color: #d4af37; letter-spacing: 2px; text-transform: uppercase; }*/
.menu a { color: #aaa; text-decoration: none; margin-left: 20px; font-weight: 600; transition: 0.3s; text-transform: uppercase; font-size: 14px;}
.menu a:hover, .menu a.active { color: #fff; border-bottom: 2px solid #d4af37; padding-bottom: 5px; }

/* === ФИЛЬТРЫ (КАТЕГОРИИ) === */
.filters { margin: 30px 0; text-align: center; }
.filter-btn {
    display: inline-block;
    padding: 10px 25px;
    margin: 0 5px;
    background: #1e1e1e;
    color: #888;
    text-decoration: none;
    border-radius: 30px;
    border: 1px solid #333;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    transition: all 0.3s ease;
}
.filter-btn:hover { background: #333; color: #fff; transform: translateY(-2px); }
.filter-btn.active {
    background: #d4af37;
    color: #000;
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* === ГЛАВНАЯ ВИТРИНА (GRID) === */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.item-card { 
    background: #1e1e1e; 
    border: 1px solid #333; 
    border-radius: 8px; 
    padding: 20px; 
    transition: transform 0.2s, box-shadow 0.2s; 
    position: relative; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.item-card:hover { transform: translateY(-5px); border-color: #555; box-shadow: 0 10px 20px rgba(0,0,0,0.4); }

.card-header { display: flex; gap: 15px; margin-bottom: 15px; border-bottom: 1px solid #2a2a2a; padding-bottom: 15px; }
.item-icon { width: 42px; height: 42px; border-radius: 6px; border: 1px solid #444; }
.item-info { flex: 1; }
.item-name { font-weight: bold; color: #fff; font-size: 15px; margin-bottom: 4px; line-height: 1.3; }
.item-count { font-size: 12px; color: #777; }

/* === ЛИЧНЫЙ КАБИНЕТ (INVENTORY GRID) - ВОТ ЭТО БЫЛО ПОТЕРЯНО === */
.inventory-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 15px; 
}

.inv-item { 
    background: #252525; 
    padding: 15px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    border-radius: 6px; 
    border: 1px solid #333;
    transition: 0.2s;
}
.inv-item:hover { border-color: #555; background: #2a2a2a; }
.inv-item.equipped { border: 1px solid #d4af37; background: rgba(212, 175, 55, 0.05); }
.inv-item.online { opacity: 0.6; pointer-events: none; filter: grayscale(100%); }

/* Картинка в инвентаре (ФИКС ОГРОМНОЙ КАРТИНКИ) */
.inv-item img { 
    width: 45px; 
    height: 45px; 
    border-radius: 4px; 
    border: 1px solid #444; 
    flex-shrink: 0; /* Чтобы не сжималась */
}

.inv-details { flex-grow: 1; font-size: 13px; line-height: 1.4; }

/* Кнопка "Продать" */
.inv-item button {
    background: #d4af37;
    color: #000;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
}
.inv-item button:hover { background: #f0c44b; }

/* Бейджики (Надето / Склад) */
.badge { 
    font-size: 10px; 
    padding: 2px 5px; 
    border-radius: 3px; 
    margin-left: 5px; 
    background: #d4af37; 
    color: #000; 
    font-weight: bold;
}
.error-text { color: #ef5350; font-size: 11px; font-weight: bold; text-transform: uppercase; border: 1px solid #ef5350; padding: 3px 6px; border-radius: 3px; }

/* === ЭЛЕМЕНТЫ: Атрибут, ЛС, Цена === */
.att-info { font-size: 11px; margin-bottom: 5px; padding: 2px 6px; background: #252525; border-radius: 3px; border-left: 3px solid; display: inline-block; }

/* Стили ЛС (Аугментации) */
.aug-info { 
    display: flex; align-items: center; gap: 6px; margin-top: 5px; 
    font-size: 12px; color: #a4c639; background: rgba(164, 198, 57, 0.08); 
    padding: 4px 8px; border-radius: 4px; border: 1px solid #3d4a2b; width: fit-content;
}
.aug-icon { width: 18px; height: 18px; border-radius: 2px; }

/* Типы ЛС */
.aug-type { font-size: 9px; font-weight: bold; padding: 2px 4px; border-radius: 3px; margin-right: 5px; text-transform: uppercase; color: #fff; }
.type-active { background: #c62828; border: 1px solid #ff5252; }
.type-passive { background: #1565c0; border: 1px solid #448aff; }
.type-chance { background: #6a1b9a; border: 1px solid #e040fb; }
.aug-lvl { color: #fff; opacity: 0.8; font-size: 11px; margin-left: 4px; }

.seller-comment { font-style: italic; color: #888; font-size: 12px; margin: 10px 0; border-left: 2px solid #444; padding-left: 10px; background: #181818; padding: 5px 10px; }

/* === ФУТЕР КАРТОЧКИ (ЦЕНА) === */
.card-footer { margin-top: auto; padding-top: 15px; }

.price-block { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 18px; font-weight: bold; color: #d4af37; margin-bottom: 10px; }
.curr-name { font-size: 12px; color: #888; text-transform: uppercase; font-weight: normal; margin-top: 3px; }
.currency-icon { width: 34px; height: 34px; object-fit: contain; }

.action-block { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #333; padding-top: 12px; }
.seller-info { font-size: 12px; color: #666; }
.seller-info b { color: #aaa; }

.buy-btn { 
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%); 
    color: #fff; border: none; padding: 8px 20px; 
    border-radius: 4px; cursor: pointer; font-weight: bold; 
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: 0.2s;
}
.buy-btn:hover { background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%); transform: scale(1.05); }

/* === МОДАЛЬНОЕ ОКНО === */
.modal { display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(3px); }
.modal-content { background-color: #1f1f1f; margin: 10% auto; padding: 30px; border: 1px solid #444; width: 400px; border-radius: 12px; color: #fff; box-shadow: 0 20px 50px rgba(0,0,0,0.7); }
.close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; color: #ccc; font-size: 13px; }
.form-group input, .form-group select { width: 100%; padding: 12px; background: #2b2b2b; border: 1px solid #444; color: #fff; border-radius: 6px; box-sizing: border-box; outline: none; }
.form-group input:focus { border-color: #d4af37; }
.confirm-btn { width: 100%; background: #d4af37; color: #000; padding: 14px; border: none; font-weight: bold; cursor: pointer; margin-top: 10px; border-radius: 6px; font-size: 14px; text-transform: uppercase; }
.confirm-btn:hover { background: #f0c44b; }
.warning { color: #ff5252; font-size: 12px; margin-bottom: 15px; background: rgba(255, 82, 82, 0.1); padding: 10px; border-radius: 4px; border-left: 3px solid #ff5252; }

/* === HISTORY TABLE === */
.history-table { width: 100%; border-collapse: collapse; background: #1e1e1e; border-radius: 8px; overflow: hidden; margin-bottom: 20px; font-size: 14px; }
.history-table thead { background: #252525; border-bottom: 2px solid #333; }
.history-table th { padding: 15px; text-align: left; color: #888; font-weight: 600; text-transform: uppercase; font-size: 12px; }
.history-table td { padding: 12px 15px; border-bottom: 1px solid #2a2a2a; color: #e0e0e0; vertical-align: middle; }
.history-table tr:hover { background: #2a2a2a; }
.h-date { color: #666; font-size: 12px; font-family: monospace; }
.h-item { display: flex; align-items: center; gap: 10px; }
.h-icon { width: 32px; height: 32px; border-radius: 4px; border: 1px solid #444; }
.h-price { display: flex; align-items: center; gap: 5px; color: #d4af37; font-weight: bold; }
.h-currency-icon { width: 16px; height: 16px; }
.role-badge { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; text-transform: uppercase; }
.role-sell { background: rgba(76, 175, 80, 0.2); color: #81c784; border: 1px solid #4caf50; }
.role-buy { background: rgba(244, 67, 54, 0.2); color: #e57373; border: 1px solid #f44336; }
.char-name { font-weight: bold; }
.char-buyer { color: #ffab91; }
.char-seller { color: #a5d6a7; }

.header2 {
            width: 100%;
            height: 670px;
            background: url('logo.jpg') no-repeat center top;
            background-size: cover;
            position: relative;
            border-bottom: 2px solid #d4af37;
            border-radius:7px;
            margin-top:-200px;
        }
		
		
		/* === ДАТА ВЫСТАВЛЕНИЯ === */
.item-date {
    font-size: 11px;
    color: #555;
    margin-top: 5px;
    text-align: right;
    font-family: monospace;
}

/* === ПАГИНАЦИЯ (КНОПКИ СТРАНИЦ) === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.page-btn {
    background: #1e1e1e;
    color: #d4af37;
    border: 1px solid #333;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s;
}

.page-btn:hover {
    background: #333;
    border-color: #d4af37;
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    border-color: #333;
    color: #555;
}

/* 1. Обновляем блок с Логотипом, чтобы он выравнивал всё внутри себя */
.logo { 
    font-size: 28px; 
    font-weight: bold; 
    color: #d4af37; 
    letter-spacing: 2px; 
    text-transform: uppercase;
    
    /* === ДОБАВЬ ЭТИ СТРОКИ === */
    display: flex;          /* Включаем Flexbox */
    align-items: center;    /* Выравниваем строго по центру по вертикали */
    gap: 15px;              /* Отступ между текстом "WEB MARKET" и картинкой */
}

/* 2. Твой стиль для картинки (чуть дополнил) */
.myimage {
  width: 150px;
  height: auto;
  border: 2px solid #333;
  border-radius: 7px;
  box-shadow: 5px 5px 10px rgba(0,0,0,0.5);
  
  /* На всякий случай убираем отступы, если они были */
  display: block; 
}


/* === ЖИВОЙ ЧАТ === */
.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #d4af37;
    color: #000;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 999;
    transition: 0.3s;
    animation: pulse 2s infinite;
}
.chat-toggle:hover { transform: scale(1.05); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.chat-box {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    height: 400px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: none; /* Скрыт по умолчанию */
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.chat-header {
    background: #252525;
    padding: 10px 15px;
    border-bottom: 1px solid #333;
    font-weight: bold;
    color: #d4af37;
    display: flex;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Скроллбар для чата */
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.chat-msg { padding: 5px 8px; border-radius: 4px; background: #222; border-left: 2px solid #444; line-height: 1.4; }
.chat-msg b { color: #aaa; cursor: pointer; }
.chat-msg b:hover { color: #fff; }

/* Системные сообщения (Анонсы) */
.msg-system {
    background: rgba(76, 175, 80, 0.1);
    border-left: 2px solid #4caf50;
    color: #a5d6a7;
    font-style: italic;
}
.msg-system b { color: #81c784; }

.chat-input-area {
    display: flex;
    padding: 10px;
    background: #222;
    border-top: 1px solid #333;
}
.chat-input-area input {
    flex: 1;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 8px;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 12px;
}
.chat-input-area button {
    background: #d4af37;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
}