:root {
	--primary: #6366f1;
	--primary-dark: #4f46e5;
	--secondary: #8b5cf6;
	--success: #10b981;
	--danger: #ef4444;
	--warning: #f59e0b;
	--info: #3b82f6;
	
	--bg-primary: #f8fafc;
	--bg-secondary: #ffffff;
	--bg-tertiary: #f1f5f9;
	
	--text-primary: #0f172a;
	--text-secondary: #475569;
	--text-tertiary: #94a3b8;
	
	--border: #e2e8f0;
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	
	--radius: 12px;
	--radius-lg: 16px;
	--radius-full: 9999px;
}

body.dark-mode {
	--primary: #818cf8;
	--primary-dark: #6366f1;
	--secondary: #a78bfa;
	--success: #34d399;
	--danger: #f87171;
	
	--bg-primary: #0f172a;
	--bg-secondary: #1e293b;
	--bg-tertiary: #334155;
	
	--text-primary: #f1f5f9;
	--text-secondary: #cbd5e1;
	--text-tertiary: #64748b;
	
	--border: #334155;
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
	--shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--bg-primary);
	color: var(--text-primary);
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
	transition: background 0.3s ease, color 0.3s ease;
}

.background-animation {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.5;
	animation: float 20s ease-in-out infinite;
}

.blob-1 {
	width: 500px;
	height: 500px;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	top: -250px;
	left: -250px;
	animation-delay: 0s;
}

.blob-2 {
	width: 400px;
	height: 400px;
	background: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
	bottom: -200px;
	right: -200px;
	animation-delay: 7s;
}

.blob-3 {
	width: 350px;
	height: 350px;
	background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	animation-delay: 14s;
}

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

.navbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 70px;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 32px;
	z-index: 1000;
	transition: all 0.3s ease;
}

body.dark-mode .navbar {
	background: rgba(15, 23, 42, 0.8);
}

.nav-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 24px;
	font-weight: 800;
	color: var(--primary);
}

.nav-brand i {
	font-size: 28px;
}

.nav-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.theme-toggle {
	width: 44px;
	height: 44px;
	border-radius: var(--radius-full);
	background: var(--bg-tertiary);
	border: none;
	color: var(--text-primary);
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.theme-toggle:hover {
	background: var(--primary);
	color: white;
	transform: scale(1.1);
}

.logout-btn {
	padding: 10px 20px;
	border-radius: var(--radius-full);
	background: var(--danger);
	color: white;
	border: none;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: all 0.3s ease;
}

.logout-btn:hover {
	background: #dc2626;
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

#welcome {
	padding-top: 100px;
	min-height: 100vh;
	position: relative;
	z-index: 1;
}

.welcome-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.welcome-header {
	text-align: center;
	margin-bottom: 60px;
}

.welcome-title {
	font-size: 48px;
	font-weight: 800;
	margin-bottom: 12px;
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.welcome-subtitle {
	font-size: 18px;
	color: var(--text-secondary);
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
	margin-bottom: 60px;
}

.feature-card {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 32px;
	text-decoration: none;
	color: inherit;
	position: relative;
	overflow: hidden;
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	cursor: pointer;
}

.feature-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 0;
}

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

.feature-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-xl);
	border-color: var(--primary);
}

.feature-card > * {
	position: relative;
	z-index: 1;
}

.feature-icon {
	width: 64px;
	height: 64px;
	border-radius: var(--radius);
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	font-size: 28px;
	color: white;
}

.feature-card h3 {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 8px;
}

.feature-card p {
	font-size: 14px;
	color: var(--text-secondary);
	line-height: 1.6;
}

.feature-badge {
	position: absolute;
	top: 20px;
	right: 20px;
	padding: 6px 12px;
	border-radius: var(--radius-full);
	background: var(--success);
	color: white;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.feature-badge.coming-soon {
	background: var(--warning);
}

.user-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}

.stat-card {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.stat-card i {
	font-size: 32px;
	color: var(--primary);
}

.stat-info {
	display: flex;
	flex-direction: column;
}

.stat-value {
	font-size: 24px;
	font-weight: 700;
	color: var(--text-primary);
}

.stat-label {
	font-size: 13px;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.auth-container {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	position: relative;
	z-index: 1;
}

.auth-card {
	background: var(--bg-secondary);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl);
	padding: 48px;
	width: 100%;
	max-width: 480px;
	position: relative;
	z-index: 2;
	border: 1px solid var(--border);
}

.auth-header {
	text-align: center;
	margin-bottom: 32px;
}

.auth-logo {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	border-radius: var(--radius);
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	color: white;
}

.auth-header h1 {
	font-size: 32px;
	font-weight: 800;
	margin-bottom: 8px;
}

.auth-header p {
	color: var(--text-secondary);
	font-size: 15px;
}

.auth-tabs {
	display: flex;
	gap: 8px;
	padding: 6px;
	background: var(--bg-tertiary);
	border-radius: var(--radius);
	margin-bottom: 32px;
}

.auth-tab {
	flex: 1;
	padding: 12px 20px;
	border: none;
	background: transparent;
	color: var(--text-secondary);
	font-weight: 600;
	font-size: 15px;
	border-radius: calc(var(--radius) - 4px);
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.auth-tab.active {
	background: var(--bg-secondary);
	color: var(--primary);
	box-shadow: var(--shadow-sm);
}

.auth-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.input-group {
	position: relative;
	display: flex;
	align-items: center;
}

.input-group i {
	position: absolute;
	left: 16px;
	color: var(--text-tertiary);
	font-size: 16px;
	pointer-events: none;
}

.input-group input {
	width: 100%;
	padding: 14px 16px 14px 48px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-tertiary);
	color: var(--text-primary);
	font-size: 15px;
	outline: none;
	transition: all 0.3s ease;
}

.input-group input:focus {
	border-color: var(--primary);
	background: var(--bg-secondary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-primary {
	padding: 14px 24px;
	border: none;
	border-radius: var(--radius);
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	color: white;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.3s ease;
	margin-top: 8px;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.btn-primary:active {
	transform: translateY(0);
}

.error {
	color: var(--danger);
	font-size: 14px;
	padding: 8px 12px;
	background: rgba(239, 68, 68, 0.1);
	border-radius: var(--radius);
	border-left: 3px solid var(--danger);
	min-height: auto;
}

.error:empty {
	display: none;
}

.auth-links, .back-link {
	text-align: center;
	margin-top: 8px;
}

.link, .back-link {
	color: var(--primary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.3s ease;
}

.link:hover, .back-link:hover {
	color: var(--primary-dark);
	gap: 8px;
}

.info-hint {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px;
	background: rgba(99, 102, 241, 0.1);
	border-radius: var(--radius);
	font-size: 13px;
	color: var(--text-secondary);
	border-left: 3px solid var(--primary);
}

.info-hint i {
	color: var(--primary);
	flex-shrink: 0;
	margin-top: 2px;
}

.verify-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	border-radius: var(--radius);
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	color: white;
}

.form-description {
	text-align: center;
	color: var(--text-secondary);
	margin-bottom: 24px;
	font-size: 15px;
}

#verify-form h2, #forgot-form h2, #reset-form h2 {
	text-align: center;
	font-size: 24px;
	margin-bottom: 8px;
}

.auth-decoration {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	pointer-events: none;
	overflow: hidden;
}

.decoration-circle {
	position: absolute;
	border-radius: 50%;
	opacity: 0.1;
	animation: float 15s ease-in-out infinite;
}

.circle-1 {
	width: 300px;
	height: 300px;
	background: var(--primary);
	top: -150px;
	right: -150px;
}

.circle-2 {
	width: 200px;
	height: 200px;
	background: var(--secondary);
	bottom: -100px;
	left: -100px;
	animation-delay: 5s;
}

.circle-3 {
	width: 150px;
	height: 150px;
	background: var(--info);
	top: 50%;
	right: 10%;
	animation-delay: 10s;
}

.hidden {
	display: none !important;
}

@media (max-width: 768px) {
	.navbar {
		padding: 0 16px;
	}

	.nav-brand {
		font-size: 20px;
	}

	.welcome-title {
		font-size: 32px;
	}

	.features-grid {
		grid-template-columns: 1fr;
	}

	.auth-card {
		padding: 32px 24px;
	}

	.user-stats {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.welcome-title {
		font-size: 28px;
	}

	.welcome-header {
		margin-bottom: 40px;
	}

		.feature-card {
		padding: 24px;
	}

	.feature-icon {
		width: 56px;
		height: 56px;
		font-size: 24px;
	}

	.auth-logo, .verify-icon {
		width: 64px;
		height: 64px;
		font-size: 28px;
	}

	.auth-header h1, #verify-form h2, #forgot-form h2, #reset-form h2 {
		font-size: 24px;
	}

	.auth-tabs {
		flex-direction: column;
	}

	.stat-card {
		padding: 20px;
	}

	.blob-1, .blob-2, .blob-3 {
		width: 300px;
		height: 300px;
		filter: blur(60px);
	}
}

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

.feature-card {
	animation: slideUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; opacity: 0; }
.feature-card:nth-child(2) { animation-delay: 0.2s; opacity: 0; }
.feature-card:nth-child(3) { animation-delay: 0.3s; opacity: 0; }
.feature-card:nth-child(4) { animation-delay: 0.4s; opacity: 0; }

.stat-card {
	animation: slideUp 0.6s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.5s; opacity: 0; }
.stat-card:nth-child(2) { animation-delay: 0.6s; opacity: 0; }
.stat-card:nth-child(3) { animation-delay: 0.7s; opacity: 0; }

.auth-form {
	animation: slideUp 0.4s ease;
}

::-webkit-scrollbar {
	width: 10px;
}

::-webkit-scrollbar-track {
	background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
	background: var(--primary);
	border-radius: 5px;
}

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

button {
	position: relative;
	overflow: hidden;
}

button::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}

button:active::before {
	width: 300px;
	height: 300px;
}

body.dark-mode .theme-toggle i::before {
	content: "\f185";
}

*:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

.loading-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.success-message {
	background: rgba(16, 185, 129, 0.1);
	border-left: 3px solid var(--success);
	color: var(--success);
	padding: 12px;
	border-radius: var(--radius);
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.success-message i {
	font-size: 16px;
}

.info-message {
	background: rgba(59, 130, 246, 0.1);
	border-left: 3px solid var(--info);
	color: var(--info);
	padding: 12px;
	border-radius: var(--radius);
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.warning-message {
	background: rgba(245, 158, 11, 0.1);
	border-left: 3px solid var(--warning);
	color: var(--warning);
	padding: 12px;
	border-radius: var(--radius);
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.gradient-border {
	position: relative;
	background: var(--bg-secondary);
	border-radius: var(--radius-lg);
	padding: 2px;
}

.gradient-border::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 2px;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
}

.particle {
	position: absolute;
	border-radius: 50%;
	background: var(--primary);
	opacity: 0.3;
	animation: float-particle 15s ease-in-out infinite;
}

@keyframes float-particle {
	0%, 100% {
		transform: translateY(0) translateX(0);
		opacity: 0.3;
	}
	50% {
		transform: translateY(-100px) translateX(50px);
		opacity: 0.6;
	}
}

.glow-effect {
	position: relative;
	transition: all 0.3s ease;
}

.glow-effect::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	background: inherit;
	border-radius: inherit;
	filter: blur(20px);
	opacity: 0;
	transform: translate(-50%, -50%);
	transition: opacity 0.3s ease;
	z-index: -1;
}

.glow-effect:hover::after {
	opacity: 0.6;
}

.active-highlight {
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.feature-badge {
	animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.stat-card {
	transition: all 0.3s ease;
}

.stat-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: var(--primary);
}

.gradient-text {
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.divider {
	height: 1px;
	background: var(--border);
	margin: 24px 0;
}

.tooltip {
	position: relative;
}

.tooltip::before {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-8px);
	padding: 8px 12px;
	background: var(--text-primary);
	color: var(--bg-primary);
	border-radius: var(--radius);
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: all 0.3s ease;
}

.tooltip:hover::before {
	opacity: 1;
	transform: translateX(-50%) translateY(-12px);
}