:root {
	--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	--accent-color: #f093fb;
	--dark-bg: #0f0f23;
	--card-bg: #1a1a2e;
	--text-primary: #e4e4e7;
	--text-secondary: #a1a1aa;
	--border-color: rgba(255, 255, 255, 0.1);
	--success: #10b981;
	--warning: #f59e0b;
	--danger: #ef4444;
	--sidebar-width: 280px;
	--header-height: 70px;
}

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

body {
	font-family: 'Vazirmatn', 'IBM Plex Sans Arabic', sans-serif;
	background: var(--dark-bg);
	color: var(--text-primary);
	line-height: 1.8;
	overflow-x: hidden;
}

/* Header Styles */
.header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--header-height);
	background: rgba(26, 26, 46, 0.95);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-color);
	z-index: 1000;
	display: flex;
	align-items: center;
	padding: 0 2rem;
}

.logo {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: 1.5rem;
	font-weight: 700;
	background: var(--primary-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.logo-icon {
	width: 40px;
	height: 40px;
	background: var(--primary-gradient);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 1.2rem;
	font-weight: 900;
	box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.nav-menu {
	display: flex;
	gap: 0.5rem;
	margin-right: auto;
	list-style: none;
	padding: 0.35rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	backdrop-filter: blur(8px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-menu a {
	color: var(--text-secondary);
	text-decoration: none;
	padding: 0.6rem 1.2rem;
	border-radius: 8px;
	transition: all 0.3s ease;
	font-weight: 500;
	font-size: 0.95rem;
	position: relative;
	overflow: hidden;
	border: 1px solid transparent;
	transform: translateY(0);
}

.nav-menu a::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--primary-gradient);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: -1;
}

.nav-menu a::after {
	content: '';
	position: absolute;
	bottom: 0.15rem;
	right: 0.9rem;
	width: 0;
	height: 2px;
	background: currentColor;
	opacity: 0.8;
	transition: width 0.25s ease;
}

.nav-menu a:hover {
	color: var(--text-primary);
	border-color: rgba(255, 255, 255, 0.15);
	transform: translateY(-1px);
}

.nav-menu a:hover::before {
	opacity: 0.1;
}

.nav-menu a:hover::after {
	width: calc(100% - 1.8rem);
}

.nav-menu a.active {
	background: var(--primary-gradient);
	color: white;
	box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
	border-color: rgba(255, 255, 255, 0.22);
	transform: translateY(-1px);
}

.nav-menu a.active::after {
	width: calc(100% - 1.8rem);
}

/* Dropdown Menu Styles */
.nav-item {
	position: relative;
}

.dropdown {
	position: relative;
	cursor: pointer;
}

.dropdown-content {
	position: absolute;
	top: 100%;
	right: 0;
	background: linear-gradient(160deg, rgba(26, 26, 46, 0.98) 0%, rgba(19, 22, 44, 0.98) 100%);
	backdrop-filter: blur(12px);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	min-width: 200px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s ease;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
	z-index: 1000;
	margin-top: 0.5rem;
	overflow: hidden;
}

.dropdown:hover .dropdown-content {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dropdown-content a {
	display: block;
	padding: 0.8rem 1.2rem;
	color: var(--text-secondary);
	text-decoration: none;
	transition: all 0.2s ease;
	border-radius: 0;
	font-size: 0.9rem;
}

.dropdown-content a:first-child {
	border-radius: 8px 8px 0 0;
}

.dropdown-content a:last-child {
	border-radius: 0 0 8px 8px;
}

.dropdown-content a::before {
	display: none;
}

.dropdown-content a:hover {
	background: rgba(102, 126, 234, 0.15);
	color: var(--text-primary);
	padding-right: 1.5rem;
}

.dropdown > a::after {
	content: '▼';
	font-size: 0.7rem;
	margin-right: 0.4rem;
	transition: transform 0.3s ease;
}

.dropdown:hover > a::after {
	transform: rotate(-180deg);
}

/* Sidebar Styles */
.sidebar {
	position: fixed;
	right: 0;
	top: var(--header-height);
	width: var(--sidebar-width);
	height: calc(100vh - var(--header-height));
	background:
		linear-gradient(180deg, rgba(102, 126, 234, 0.08) 0%, transparent 22%),
		linear-gradient(170deg, rgba(26, 26, 46, 0.82) 0%, rgba(16, 19, 37, 0.86) 100%);
	backdrop-filter: blur(12px);
	border-left: 1px solid var(--border-color);
	overflow-y: auto;
	padding: 2rem 1.5rem;
	z-index: 100;
	box-shadow: -12px 0 30px rgba(0, 0, 0, 0.2);
}

.sidebar::-webkit-scrollbar {
	width: 6px;
}

.sidebar::-webkit-scrollbar-track {
	background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
	background: var(--border-color);
	border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.2);
}

.sidebar-section {
	margin-bottom: 2rem;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 1rem;
}

.sidebar-title {
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--text-secondary);
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sidebar-title::before {
	content: '◉';
	font-size: 0.7rem;
	color: var(--accent-color);
}

.sidebar-menu {
	list-style: none;
}

.sidebar-menu li {
	margin-bottom: 0.35rem;
}

.sidebar-menu a {
	display: block;
	color: var(--text-secondary);
	text-decoration: none;
	padding: 0.7rem 0.95rem;
	padding-left: 2rem;
	border-radius: 10px;
	transition: all 0.3s ease;
	font-size: 0.9rem;
	position: relative;
	border: 1px solid transparent;
	background: rgba(255, 255, 255, 0.01);
	line-height: 1.45;
}

.sidebar-menu a::before {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 0;
	background: var(--primary-gradient);
	border-radius: 2px;
	transition: height 0.3s ease;
}

.sidebar-menu a::after {
	content: '‹';
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%) translateX(-4px);
	color: var(--text-secondary);
	opacity: 0;
	transition: all 0.25s ease;
}

.sidebar-menu a:hover {
	background: rgba(102, 126, 234, 0.12);
	color: var(--text-primary);
	padding-right: 1.2rem;
	border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-menu a:hover::before {
	height: 60%;
}

.sidebar-menu a:hover::after {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

.sidebar-menu a.active {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.18) 0%, rgba(240, 147, 251, 0.08) 100%);
	color: var(--text-primary);
	font-weight: 600;
	padding-right: 1.2rem;
	border-color: rgba(102, 126, 234, 0.45);
	box-shadow: 0 8px 18px rgba(102, 126, 234, 0.18);
}

.sidebar-menu a.active::before {
	height: 75%;
}

.sidebar-menu a.active::after {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
	color: var(--accent-color);
}

/* Main Content Area */
.main-container {
	margin-top: var(--header-height);
	margin-right: var(--sidebar-width);
	min-height: calc(100vh - var(--header-height));
	position: relative;
}

.content {
	max-width: 85%;
	margin: 0 auto;
	padding: 3rem 2rem;
}

/* Background Effects */
.bg-gradient-1 {
	position: fixed;
	top: -50%;
	left: -10%;
	width: 600px;
	height: 600px;
	background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
	border-radius: 50%;
	filter: blur(80px);
	pointer-events: none;
	z-index: 0;
	animation: float 20s ease-in-out infinite;
}

.bg-gradient-2 {
	position: fixed;
	bottom: -30%;
	right: -10%;
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(118, 75, 162, 0.12) 0%, transparent 70%);
	border-radius: 50%;
	filter: blur(80px);
	pointer-events: none;
	z-index: 0;
	animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
	0%, 100% {
		transform: translate(0, 0) scale(1);
	}
	50% {
		transform: translate(30px, -30px) scale(1.1);
	}
}

/* Page Title Animation */
.page-header {
	margin-bottom: 3rem;
	position: relative;
}

.page-title {
	font-size: 2.5rem;
	font-weight: 900;
	background: var(--primary-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 0.5rem;
	animation: slideInRight 0.6s ease-out;
}

.page-subtitle {
	font-size: 1.1rem;
	color: var(--text-secondary);
	font-weight: 300;
	animation: slideInRight 0.6s ease-out 0.1s backwards;
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Status Badge */
.status-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 1rem;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 600;
	margin-top: 1rem;
}

.status-badge.mvp {
	background: rgba(16, 185, 129, 0.15);
	color: var(--success);
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.5;
		transform: scale(1.2);
	}
}

/* Responsive Design */
@media (max-width: 1024px) {
	.sidebar {
		transform: translateX(100%);
		transition: transform 0.3s ease;
	}

	.sidebar.open {
		transform: translateX(0);
	}

	.main-container {
		margin-right: 0;
	}

	.nav-menu {
		display: none;
	}
}

@media (max-width: 768px) {
	.header {
		padding: 0 1rem;
	}

	.content {
		padding: 2rem 1rem;
	}

	.page-title {
		font-size: 2rem;
	}
}

/* Mobile Menu Toggle */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--text-primary);
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0.5rem;
	margin-left: 1rem;
}

@media (max-width: 1024px) {
	.menu-toggle {
		display: block;
	}
}

/* ===== NEW: Epic Cards Styles ===== */
.epic-cards-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
    margin-top: 2.2rem;
    position: relative;
    z-index: 1;
}

.epic-card {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(26, 26, 46, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: cardSlideIn 0.6s ease-out backwards;
    animation-delay: calc(var(--card-index) * 0.1s);
}

.epic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.epic-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 14px 28px rgba(102, 126, 234, 0.2);
}

.epic-card:hover::before {
    opacity: 0.1;
}

.card-icon {
    font-size: 2.1rem;
    margin-bottom: 0.6rem;
    transition: transform 0.4s ease;
}

.epic-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: var(--text-primary);
}

.card-description {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.card-arrow {
    position: absolute;
    bottom: 1.2rem;
    left: 1.2rem;
    font-size: 1.2rem;
    color: var(--accent-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
}

.epic-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

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

/* ===== NEW: Motivational Quote Animation ===== */
#motivational-quote {
    min-height: 2rem;
    transition: opacity 0.5s ease;
}

#motivational-quote.fade-out {
    opacity: 0;
}

#motivational-quote.fade-in {
    opacity: 1;
}

/* ===== UPDATED: Hide sidebar in homepage ===== */
body.homepage .sidebar {
    display: none;
}

body.homepage .main-container {
    margin-right: 0;
}

/* ===== RESPONSIVE: Epic Cards ===== */
@media (max-width: 1280px) {
    .epic-cards-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .epic-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .epic-card {
        padding: 1.1rem;
    }
}
