:root {
	--bg: #0b1020;
	--card: #121936;
	--muted: #9aa4bf;
	--text: #e8ecf8;
	--primary: #6d8bff;
	--primary-600: #5979ff;
	--danger: #ff6b6b;
	--warning: #ffb454;
	--success: #4cc59a;
	--border: #243055;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	font-family: 'Quicksand', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
	background: radial-gradient(1200px 800px at 20% -10%, #1a2348, transparent),
		linear-gradient(160deg, #0b1020 0%, #101735 100%);
	color: var(--text);
}

.container { width: min(100%, 960px); margin: 24px auto; padding: 0 16px; }

.navbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(11,16,32,0.8); backdrop-filter: blur(10px); z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.logo { width: 22px; height: 22px; color: var(--primary); }
.spacer { flex: 1; }

.hero { text-align: center; padding: 80px 0; }
.hero h1 { font-size: 40px; margin: 0 0 12px; }
.hero p { color: var(--muted); margin: 0 0 24px; }
.cta-group { display: inline-flex; gap: 12px; }

.card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0)); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06); }
.card + .card { margin-top: 16px; }

.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 880px) { .grid { grid-template-columns: 1.2fr 1fr; } }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid transparent; color: white; background: var(--primary); text-decoration: none; cursor: pointer; transition: transform .05s ease, background .2s ease; }
.btn:hover { background: var(--primary-600); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-secondary { background: transparent; border-color: var(--border); }
.btn-text { background: transparent; border-color: transparent; color: var(--text); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }

.i { width: 18px; height: 18px; }

.form { display: grid; gap: 12px; }
.form.inline { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
input { padding: 10px 12px; border-radius: 10px; background: #0b122a; border: 1px solid var(--border); color: var(--text); outline: none; }
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109,139,255,0.15); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.02); }
.item-main { display: grid; color: var(--text); text-decoration: none; }
.item-main:hover { text-decoration: none; }
.muted { color: var(--muted); }

.flash-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.flash { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); }
.flash.info { background: rgba(109,139,255,0.12); border-color: #5566aa; }
.flash.success { background: rgba(76,197,154,0.12); border-color: #2d8a6f; }
.flash.warning { background: rgba(255,180,84,0.12); border-color: #b97c2b; }
.flash.danger { background: rgba(255,107,107,0.12); border-color: #b94b4b; }

.auth-card { max-width: 420px; margin: 40px auto; }

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 50; }
.modal[aria-hidden="false"] { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.65); backdrop-filter: none; }
.modal-dialog { position: fixed; top: calc(50% + 50px); left: 50%; transform: translate(-50%, -50%); width: min(560px, 92%); z-index: 51; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal .card { background: var(--card); box-shadow: 0 20px 50px rgba(0,0,0,0.45); }

/* Animations */
@keyframes fadeIn {
	from { opacity: 0 }
	to { opacity: 1 }
}
@keyframes slideUp {
	from { opacity: 0; transform: translateY(12px) }
	to { opacity: 1; transform: translateY(0) }
}
@keyframes popIn {
	0% { opacity: 0; transform: scale(.98) }
	60% { opacity: 1; transform: scale(1.01) }
	100% { opacity: 1; transform: scale(1) }
}

.animate-fade { animation: fadeIn .6s ease both; }
.animate-slide-up { animation: slideUp .6s ease both; }
.animate-pop { animation: popIn .4s ease both; }

.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }

/* Subtle hover interactions */
.btn.hover-lift:hover { transform: translateY(-3px) scale(1.01); }
.card { transition: transform .18s ease, border-color .2s ease, background .2s ease; }
.card:hover { transform: translateY(-2px); }

.list-item { transition: transform .15s ease, background .2s ease, border-color .2s ease; }
.list-item:hover { transform: translateY(-2px); }

/* Staggered lists */
.list.stagger > .list-item { animation: slideUp .4s ease both; }
.list.stagger > .list-item:nth-child(1) { animation-delay: .02s; }
.list.stagger > .list-item:nth-child(2) { animation-delay: .06s; }
.list.stagger > .list-item:nth-child(3) { animation-delay: .1s; }
.list.stagger > .list-item:nth-child(4) { animation-delay: .14s; }
.list.stagger > .list-item:nth-child(5) { animation-delay: .18s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
}
