/* ======================================================
index.css - Полные стили для клановой системы "Листопад"
====================================================== */

/* 1. CSS ПЕРЕМЕННЫЕ */
:root {
	--dark-bg: #1C2129;
	--darker-bg: #161b22;
	--modal-bg: #252A34;
	--card-bg: #2d3748;

	--green: #13873a;
	--green-hover: #16a34a;
	--green-light: rgba(19, 135, 58, 0.1);

	--tg-blue: #2AABEE;
	--tg-blue-hover: #229ed9;
	--tg-blue-light: rgba(42, 171, 238, 0.1);

	--white: #FFFFFF;
	--white-90: rgba(255, 255, 255, 0.9);
	--white-70: rgba(255, 255, 255, 0.7);
	--white-50: rgba(255, 255, 255, 0.5);

	--gray: #adb5bd;
	--gray-dark: #6c757d;
	--gray-light: #ced4da;

	--border: #444;
	--border-light: #555;
	--border-hover: #666;

	--red: #ff6b6b;
	--red-hover: #ff5252;
	--red-light: rgba(255, 107, 107, 0.1);

	--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 12px;
	--radius-xl: 16px;
	--radius-full: 9999px;

	--transition-fast: 150ms ease;
	--transition-normal: 300ms ease;
	--transition-slow: 500ms ease;
}

/* 2. СБРОС И БАЗОВЫЕ СТИЛИ */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
	height: 100%;
}

body {
	font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: var(--dark-bg);
	color: var(--white);
	min-height: 100vh;
	overflow-x: hidden;
	position: relative;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* 3. VANTA.JS ФОН */
.vanta-background {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	opacity: 0.4;
	pointer-events: none;
}

/* 4. APP WRAPPER */
.app-wrapper {
	position: relative;
	z-index: 10;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* 5. HEADER */
.site-header {
	position: relative;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	background: rgba(28, 33, 41, 0.98);
	backdrop-filter: blur(10px);
	padding: 1rem 5%;
	box-shadow: var(--shadow-md);
	border-bottom: 2px solid var(--green);
}

.logo {
	font-size: 1.7rem;
	font-weight: 800;
	color: var(--green);
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	transition: color var(--transition-fast);
}

.logo i {
	font-size: 1.5rem;
}

.logo:hover {
	color: var(--green-hover);
}

/* 6. НАВИГАЦИЯ */
.main-nav {
    flex: 1;
    margin: 0 20px;
}
.main-nav ul {
	list-style: none;
	display: flex;
	gap: 5px;
	background: rgba(22, 27, 34, 0.8);
	padding: 4px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
	margin: 0;
}

.main-nav a {
	color: var(--white-70);
	text-decoration: none;
	padding: 10px 20px;
	border-radius: var(--radius-md);
	font-size: 0.95rem;
	font-weight: 500;
	transition: all var(--transition-normal);
	display: flex;
	align-items: center;
	gap: 8px;
}

.main-nav a:hover {
	background: rgba(255, 255, 255, 0.05);
	color: var(--white);
	transform: translateY(-1px);
}

.main-nav a.active {
	background: var(--green);
	color: var(--white);
	box-shadow: var(--shadow-sm);
}

.main-nav a.active:hover {
	background: var(--green-hover);
}

/* 7. ПОЛЬЗОВАТЕЛЬСКОЕ МЕНЮ */
.user-avatar {
	background: #1a2a1f;
	border-radius: var(--radius-md);
	padding: 0.2rem 1rem 0.2rem 0.5rem;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	transition: background var(--transition-fast);
}

.user-avatar:hover {
	background: #2a3a2f;
}

.user-avatar img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}

.user-avatar span {
	color: var(--white);
	font-weight: 500;
}

#userInfoContainer {
	order: 4;
	margin-left: 12px;
	position: relative;
}

#userDropdownMenu {
	position: absolute;
	right: 0;
	top: 50px;
	background: #1e2a24;
	border-radius: var(--radius-lg);
	padding: 0.5rem 0;
	width: 180px;
	z-index: 200;
	display: none;
	border: 1px solid #2e7d32;
	box-shadow: var(--shadow-lg);
}

#userDropdownMenu > div {
	padding: 10px 16px;
	cursor: pointer;
	transition: background var(--transition-fast);
	color: var(--white-90);
}

#userDropdownMenu > div:hover {
	background: var(--green-light);
	color: var(--green);
}

#userDropdownMenu #logoutBtn {
	color: #f87171;
	border-top: 1px solid #2e7d32;
}

#userDropdownMenu #logoutBtn:hover {
	background: var(--red-light);
	color: var(--red);
}

/* 8. ОСНОВНОЙ КОНТЕЙНЕР */
.index-main-container {
	flex: 1;
	max-width: 1400px;
	margin: 0 auto;
	padding: 30px 5%;
	width: 100%;
}

/* 9. КАРТОЧКИ И СТЕКЛЯННЫЕ ЭЛЕМЕНТЫ */
.glass-card,
.full-height-card {
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(8px);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg) !important;
	transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.glass-card:hover,
.full-height-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

/* 10. ПРИВЕТСТВЕННЫЙ БЛОК */
.welcome-hero {
	text-align: center;
	padding: 2rem;
	background: linear-gradient(135deg, var(--green-light), rgba(0, 0, 0, 0.3));
	border-radius: var(--radius-lg);
	margin-bottom: 2rem;
}

.welcome-hero i {
	font-size: 4rem;
	color: var(--green);
}

.welcome-hero h1 {
	margin-top: 1rem;
	font-size: 2.5rem;
	font-weight: 800;
}

.welcome-hero .lead {
	font-size: 1.25rem;
	color: var(--white-70);
}

.btn-brand, .btn-success {
	background: var(--green);
	border: none;
	padding: 10px 24px;
	border-radius: var(--radius-md);
	font-weight: 600;
	transition: all var(--transition-fast);
}

.btn-brand:hover, .btn-success:hover {
	background: var(--green-hover);
	transform: translateY(-1px);
}

/* 11. СТАТИСТИКА */
.stat-big-card {
	background: rgba(0, 0, 0, 0.5);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	text-align: center;
	border: 1px solid var(--border);
	transition: transform var(--transition-fast);
}

.stat-big-card:hover {
	transform: translateY(-3px);
}

.stat-number {
	font-size: 2.6rem;
	font-weight: 800;
	color: var(--green);
}

/* 12. ТАБЛИЦЫ */
.table-dark {
	color: var(--white);
	background: transparent;
}

.table-dark td, 
.table-dark th {
	border-color: var(--border);
	vertical-align: middle;
	padding: 12px 15px;
}

.table-dark thead th {
	background: rgba(0, 0, 0, 0.5);
	color: var(--green);
	font-weight: 600;
	border-bottom: 2px solid var(--green);
}

.table-dark tbody tr {
	transition: background var(--transition-fast);
}

.table-dark tbody tr:hover {
	background: rgba(19, 135, 58, 0.1);
}

/* 13. ВКЛАДКИ */
.tab-btn {
	background: transparent;
	border: none;
	padding: 0.6rem 1.2rem;
	font-weight: 600;
	color: var(--white-70);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: var(--transition-fast);
	border-radius: var(--radius-md) !important;
	cursor: pointer;
}

.tab-btn i { 
	font-size: 1rem; 
}

.tab-btn:hover {
	background: var(--green-light);
	color: var(--green);
}

.tab-btn.active {
	background: var(--green);
	color: var(--white);
}

/* 14. ФУТЕР */
.footer-fixed {
	background: var(--darker-bg);
	border-top: 2px solid var(--green);
	padding: 2.5rem;
	margin-top: 2rem;
}

/* 15. ВРЕМЯ В УГЛУ */
.time-corner {
	position: fixed;
	bottom: 65px;
	right: 55px;
	font-size: 0.9em;
	font-weight: bold;
	padding: 3px 6px;
	border-radius: 4px;
	border: 1px solid #13873a;
	background: rgba(22, 27, 34, 0.95);
	color: #13873a;
	font-family: monospace;
	z-index: 1000;
}

/* 16. УВЕДОМЛЕНИЯ */
.notification-toast {
	position: fixed;
	top: 20px;
	right: 20px;
	background: var(--darker-bg);
	border-left: 4px solid var(--green);
	padding: 12px 20px;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	z-index: 1100;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from { transform: translateX(100%); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
	from { transform: translateX(0); opacity: 1; }
	to { transform: translateX(100%); opacity: 0; }
}

/* 17. SCROLLBAR */
::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

::-webkit-scrollbar-track {
	background: var(--darker-bg);
	border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
	background: var(--green);
	border-radius: var(--radius-sm);
	border: 2px solid var(--darker-bg);
}

::-webkit-scrollbar-thumb:hover {
	background: var(--green-hover);
}

* {
	scrollbar-width: thin;
	scrollbar-color: var(--green) var(--darker-bg);
}

/* 18. ТИПОГРАФИЯ */
h1, h2, h3, h4, h5, h6 {
	font-weight: 600;
	line-height: 1.2;
	margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.text-center { text-align: center; }
.text-muted { color: var(--white-50); }

/* 19. АНИМАЦИИ */
.fade-in {
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.slide-up {
	animation: slideUp 0.3s ease;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 20. АДАПТИВНОСТЬ */
@media (max-width: 1024px) {
	.site-header {
		padding: 12px 3%;
	}

	.logo {
		font-size: 1.5rem;
	}
}

@media (max-width: 768px) {
	.glass-card,
	.full-height-card {
		border-radius: var(--radius-md) !important;
	}

	.tab-btn {
		padding: 0.5rem 1rem;
		font-size: 0.85rem;
	}

	.welcome-hero {
		padding: 1.5rem;
	}

	.welcome-hero h1 {
		font-size: 1.75rem;
	}

	.stat-number {
		font-size: 2rem;
	}

	.site-header {
		flex-direction: column;
		align-items: stretch;
	}

	#userInfoContainer {
		order: 3;
		margin-left: 0;
		width: 100%;
	}

	.main-nav {
		order: 1;
	}

	.logo {
		order: 0;
	}

	.time-corner {
		bottom: 15px;
		right: 15px;
		font-size: 0.75em;
	}
}

@media (max-width: 480px) {
	.logo {
		font-size: 1.3rem;
	}

	.index-main-container {
		padding: 15px 3%;
	}

	.main-nav a {
		padding: 8px 12px;
		font-size: 0.85rem;
	}

	.stat-big-card {
		padding: 1rem;
	}

	.stat-number {
		font-size: 1.75rem;
	}

	.welcome-hero i {
		font-size: 2.5rem;
	}
}

/* 21. ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.d-flex { display: flex !important; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* 22. КНОПКА ВХОДА */
.auth-btn-main {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--green);
	border: none;
	padding: 10px 24px;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--white);
	cursor: pointer;
	transition: all var(--transition-fast);
	box-shadow: var(--shadow-sm);
}

.auth-btn-main:hover {
	background: var(--green-hover);
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.auth-btn-main:active {
	transform: translateY(0px);
}

/* 23. ВЫДЕЛЕНИЕ ТЕКСТА */
::selection {
	background-color: var(--green-light);
	color: var(--green);
}

/* Стили для выпадающего меню профиля */
.profile-dropdown {
	position: relative;
	display: inline-block;
}

.profile-btn {
	background: linear-gradient(135deg, #2ecc71, #27ae60);
	border: none;
	padding: 10px 24px;
	border-radius: 30px;
	color: white;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	display: flex;
	align-items: center;
	gap: 10px;
}

.profile-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

.dropdown-menu-custom {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 10px;
	background: #2a2e3a;
	border-radius: 12px;
	min-width: 220px;
	box-shadow: 0 5px 20px rgba(0,0,0,0.3);
	z-index: 1000;
	overflow: hidden;
	animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.dropdown-menu-custom.show {
	display: block;
}

.dropdown-item-custom {
	padding: 12px 20px;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	gap: 12px;
	color: #e0e0e0;
	border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dropdown-item-custom:hover {
	background: #3a3e4a;
}

.dropdown-item-custom i {
	width: 20px;
	color: #2ecc71;
}

.dropdown-item-custom.logout {
	color: #2ecc71;
}

.dropdown-item-custom.logout i {
	color: #2ecc71;
}

.user-info-header {
	padding: 15px 20px;
	border-bottom: 1px solid rgba(46, 204, 113, 0.3);
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(46, 204, 113, 0.1);
}

.user-info-header img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.user-info-header div {
	flex: 1;
}

.user-info-header .user-name {
	font-weight: 600;
	color: #2ecc71;
}

.user-info-header .user-email {
	font-size: 0.75rem;
	color: #888;
}