/* static/css/style.css */

/* =========================================
БАЗОВЫЕ ПЕРЕМЕННЫЕ И НАСТРОЙКИ
========================================= */
:root {
	--bg-dark: #0a0d14;
	--text-main: #e2e8f0;
	--gold: #FFD700;
	--ice-blue: #00E5FF;
	--glass-bg: rgba(10, 13, 20, 0.35); 
	--glass-border: rgba(255, 255, 255, 0.05); 

	--octagon-shape: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
	--button-bevel: polygon(15px 0, calc(100% - 15px) 0, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0 calc(100% - 15px), 0 15px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: 'Inter', sans-serif;
	color: var(--text-main);
	background-color: var(--bg-dark);
	min-height: 100vh;
	overflow-x: hidden;
}

h1, h2, h3, .Cinzel-text { font-family: 'Cinzel', serif; }

/* =========================================
ФОН И ГЛАССМОРФИЗМ (ПАНЕЛИ)
========================================= */
.bg-yggdrasil {
	position: fixed;
	top: 0; left: 0; width: 100vw; height: 100vh;
	background-size: cover; background-position: center; z-index: -1;
	box-shadow: inset 0 0 0 2000px rgba(10, 13, 20, 0.5); 
}

.glass-panel {
	background: var(--glass-bg); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	border: 1px solid var(--glass-border); border-radius: 8px;
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5); 
}

/* =========================================
ШАПКА САЙТА (HEADER)
========================================= */
.main-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; margin: 20px; }
.logo h1 { font-size: 1.5rem; letter-spacing: 2px; color: var(--ice-blue); text-shadow: 0 0 10px rgba(0, 229, 255, 0.5); }
.logo p { font-size: 0.7rem; letter-spacing: 4px; color: #aaa; }

/* =========================================
КНОПКИ ТАБОВ
========================================= */
.tabs-nav { display: flex; gap: 20px; }
.tab-btn {
	position: relative; padding: 15px 30px; font-family: 'Inter', sans-serif; font-weight: 600; cursor: pointer;
	border: none; outline: none; text-align: center; color: var(--text-main);
	background: rgba(255, 255, 255, 0.15); clip-path: var(--button-bevel);
	z-index: 1; transition: filter 0.3s ease, background 0.3s ease;
}
.tab-btn::before {
	content: ''; position: absolute; top: 1px; left: 1px; right: 1px; bottom: 1px; 
	background: #11141a; clip-path: var(--button-bevel); z-index: -1; 
}
.tab-btn span { font-size: 0.7rem; font-weight: 400; color: #888; }
.tab-btn.gold.active { background: var(--gold); filter: drop-shadow(0px 0px 8px rgba(255, 215, 0, 0.6)); }
.tab-btn.blue { background: rgba(0, 229, 255, 0.3); }
.tab-btn.blue:hover { background: var(--ice-blue); filter: drop-shadow(0px 0px 8px rgba(0, 229, 255, 0.4)); }

/* =========================================
ОКТАГОНЫ (АВАТАРЫ, ИКОНКИ, ПОРТРЕТЫ)
========================================= */
.octagon-avatar, .octagon-portrait, .octagon-icon {
	position: relative; z-index: 1; display: flex; justify-content: center; align-items: center;
	background: transparent; 
}
.octagon-avatar::before, .octagon-portrait::before, .octagon-icon::before {
	content: ''; position: absolute; inset: 0; clip-path: var(--octagon-shape);
	z-index: -2; transition: all 0.3s ease;
}
.octagon-avatar::after, .octagon-portrait::after, .octagon-icon::after {
	content: ''; position: absolute; inset: 2px; 
	background-color: #2a2d36; background-image: var(--bg-image, none); background-size: cover; background-position: center;
	clip-path: var(--octagon-shape); z-index: -1; transition: all 0.3s ease;
}
.octagon-icon { width: 40px; height: 40px; font-family: 'Cinzel', serif; font-weight: bold; font-size: 1.2rem; }
.octagon-icon.gold { color: var(--gold); }
.octagon-icon.gold::before { background: var(--gold); }
.octagon-icon.gold::after { background: var(--glass-bg); }
.octagon-icon.blue { color: var(--ice-blue); }
.octagon-icon.blue::before { background: var(--ice-blue); }
.octagon-icon.blue::after { background: var(--glass-bg); }
.octagon-avatar { width: 50px; height: 50px; }
.octagon-avatar::before { background: var(--ice-blue); }
.octagon-avatar.small { width: 40px; height: 40px; }
.octagon-avatar.opponent::before { background: #ff3366; }
.octagon-portrait { width: 80px; height: 80px; }
.octagon-portrait::before { background: #555; }
.octagon-portrait::after { background-color: #444; }
.figure-card:hover .octagon-portrait { transform: scale(1.05); }
.figure-card:hover .octagon-portrait::before { background: var(--gold); filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6)); }

/* =========================================
ОСНОВНАЯ СЕТКА (LAYOUT)
========================================= */
.dashboard-grid { display: grid; grid-template-columns: 250px 1fr 300px; gap: 20px; padding: 0 20px 20px 20px; height: calc(100vh - 120px); }
.sidebar-left { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.nav-item { display: flex; align-items: center; gap: 15px; cursor: pointer; transition: 0.2s; }
.nav-item:hover { transform: translateX(5px); }
.nav-item span { font-size: 0.85rem; letter-spacing: 1px; line-height: 1.4; }
.center-stage { display: flex; justify-content: center; align-items: center; }
.sidebar-right { display: flex; flex-direction: column; gap: 20px; }
.figures-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; }
.figure-card { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; }
.figure-name { font-size: 0.8rem; font-family: 'Cinzel', serif; letter-spacing: 1px; }
.discussion-board { padding: 20px; flex-grow: 1; overflow-y: auto; }
.gold-text { color: var(--gold); margin-bottom: 15px; font-size: 1rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; }
.comment { display: flex; gap: 15px; margin-bottom: 15px; font-size: 0.85rem; line-height: 1.5; }
.comment strong { color: var(--ice-blue); }

/* === СТИЛИ ДЛЯ WIKI (ДИНАМИЧЕСКИЙ КОНТЕНТ В ЦЕНТРЕ) === */
#info-display { transition: opacity 0.2s ease-in-out; }
.lore-text { font-size: 1rem; line-height: 1.7; color: #cbd5e1; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.lore-text b { color: var(--gold); font-weight: 600; }
.stat-box {
	background: rgba(0, 0, 0, 0.4); border: 1px solid var(--glass-border); padding: 10px 20px; border-radius: 4px;
	font-family: 'Cinzel', serif; font-weight: bold; font-size: 1.1rem; letter-spacing: 1px;
}

/* =========================================
ВКЛАДКИ (TABS)
========================================= */
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
АРЕНА ЕДИНСТВА (3D/HYBRID MODE)
========================================= */
.arena-layout { grid-template-columns: 1fr 300px; }

.sphere-container.3d-mode {
	position: relative; width: 650px; height: 650px; margin: 0 auto; border-radius: 50%;

	/* НОВОЕ: Задействуем arena_sphere_3d.png как фон */
	background-image: url('../images/arena_sphere_3d.png');
	background-size: cover; background-position: center;
	background-color: transparent;
	box-shadow: 0 0 60px rgba(0, 229, 255, 0.15), inset 0 0 40px rgba(0, 0, 0, 0.8);
	border: 2px solid var(--glass-border); display: flex; justify-content: center; align-items: center; overflow: hidden;
}

/* Стеклянный купол (Блик и полусфера) */
.glass-dome {
	position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 50%;
	/* Усиливаем блик, имитируя полусферу */
	background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
	box-shadow: inset -20px -20px 60px rgba(0,0,0,0.6), inset 10px 10px 40px rgba(255, 255, 255, 0.15);
	pointer-events: none; z-index: 10;
}

/* Сетка октагонов */
.board-grid {
	display: grid; grid-template-columns: repeat(9, 60px); grid-template-rows: repeat(9, 60px); gap: 4px;
}

.board-cell {
	width: 60px; height: 60px;
	/* Ячейки СОВЕРШЕННО прозрачные, чтобы было видно 3D-поле */
	background: transparent; clip-path: var(--octagon-shape);
	display: flex; justify-content: center; align-items: center;
	transition: all 0.2s ease;
}

/* Подсветка пустых ячеек при наведении мышкой */
.board-cell:empty:hover {
	background: rgba(0, 229, 255, 0.25); box-shadow: inset 0 0 10px var(--ice-blue); 
}

/* Подсветка при перетаскивании фигуры над ячейкой */
.board-cell.drag-over {
	background: rgba(255, 215, 0, 0.3); box-shadow: inset 0 0 15px var(--gold);
}

.board-cell.hidden { visibility: hidden; pointer-events: none; }

/* Фигуры на поле */
.board-cell .figure-drag-item { width: 100%; height: 100%; }
.board-cell .figure-drag-item span { display: none; /* Прячем имя на поле */ }
.board-cell .octagon-portrait { 
	width: 100%; height: 100%; border-radius: 50%;
	border: 2px solid transparent; transition: 0.3s;
}
.board-cell .figure-drag-item:hover .octagon-portrait { border-color: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* === ДЛЯ DRAG & DROP === */
.figure-drag-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: grab; }
.figure-drag-item:active { cursor: grabbing; }
.small-portrait { width: 50px; height: 50px; }

@media (max-width: 1024px) {
	.dashboard-grid { grid-template-columns: 1fr; height: auto; }
	.tabs-nav { display: none; }
}

