/* Mobile First Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	min-height: 100vh;
	background: #0a0a0f;
	color: #e2e8f0;
}
.background {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: 
		radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.3), transparent),
		radial-gradient(ellipse 60% 40% at 80% 100%, rgba(99, 102, 241, 0.15), transparent),
		radial-gradient(ellipse 50% 30% at 10% 80%, rgba(168, 85, 247, 0.1), transparent);
	z-index: -1;
}
.grid-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
	background-size: 60px 60px;
	z-index: -1;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
header {
	padding: 1.5rem 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}
.logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.25rem; font-weight: 700; text-decoration: none; color: inherit; }
.logo-icon {
	width: 36px; height: 36px;
	background: linear-gradient(135deg, #818cf8, #c084fc);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.logo-icon svg { width: 20px; height: 20px; }
nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { color: #94a3b8; text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
nav a:hover, nav a.active { color: #fff; }
.page-title { padding: 2rem 0 1.5rem; }
.page-title h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-title p { color: #64748b; font-size: 0.95rem; line-height: 1.6; }
.hero { padding: 3rem 0; text-align: center; }
.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.8rem;
	background: rgba(129, 140, 248, 0.1);
	border: 1px solid rgba(129, 140, 248, 0.3);
	border-radius: 2rem;
	font-size: 0.75rem;
	color: #818cf8;
	margin-bottom: 1rem;
}
.badge::before {
	content: ''; width: 6px; height: 6px; background: #818cf8; border-radius: 50%;
	animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; letter-spacing: -0.02em; }
h1 span { background: linear-gradient(90deg, #818cf8, #c084fc, #f472b6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle { font-size: 1rem; color: #64748b; margin: 0 auto 2rem; line-height: 1.6; }
.cta-group { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn {
	padding: 0.75rem 1.25rem; border-radius: 0.75rem; font-size: 0.9rem; font-weight: 600;
	text-decoration: none; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary {
	background: linear-gradient(135deg, #818cf8, #6366f1); color: #fff;
	box-shadow: 0 4px 20px rgba(129, 140, 248, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(129, 140, 248, 0.4); }
.features { padding: 2rem 0; display: grid; grid-template-columns: 1fr; gap: 1rem; }
.feature-card {
	background: rgba(255,255,255,0.02);
	border: 1px solid rgba(255,255,255,0.05);
	border-radius: 1rem;
	padding: 1.25rem;
	transition: all 0.3s;
}
.feature-card:hover {
	background: rgba(255,255,255,0.04);
	border-color: rgba(129, 140, 248, 0.2);
	transform: translateY(-4px);
}
.feature-icon {
	width: 44px; height: 44px;
	background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(192, 132, 252, 0.2));
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.75rem;
	font-size: 1.3rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.85rem; color: #64748b; line-height: 1.5; }
.stats { padding: 2rem 0; display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); }
.stat { text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; background: linear-gradient(90deg, #818cf8, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.8rem; color: #64748b; margin-top: 0.25rem; }
footer { padding: 2rem 0; text-align: center; color: #475569; font-size: 0.8rem; margin-top: 2rem; }

/* Market Page */
.market-table { width: 100%; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 1rem; overflow: hidden; }
.table-header {
	display: grid;
	grid-template-columns: 40px 1fr 90px 80px;
	padding: 0.75rem 1rem;
	background: rgba(255,255,255,0.03);
	font-weight: 600;
	color: #64748b;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.coin-row {
	display: grid;
	grid-template-columns: 40px 1fr 90px 80px;
	padding: 0.75rem 1rem;
	align-items: center;
	border-top: 1px solid rgba(255,255,255,0.03);
	transition: background 0.2s;
}
.coin-row:hover { background: rgba(255,255,255,0.03); }
.coin-rank { color: #64748b; font-size: 0.8rem; }
.coin-info { display: flex; align-items: center; gap: 0.5rem; }
.coin-name { font-weight: 600; font-size: 0.9rem; }
.coin-symbol { color: #64748b; font-size: 0.75rem; text-transform: uppercase; }
.coin-price { text-align: right; font-weight: 600; font-size: 0.95rem; }
.coin-change { text-align: right; font-weight: 600; font-size: 0.85rem; }
.coin-change.positive { color: #22c55e; }
.coin-change.negative { color: #ef4444; }
.loading { color: #64748b; text-align: center; padding: 2rem; font-size: 0.95rem; }
.error { color: #ef4444; text-align: center; padding: 2rem; font-size: 0.95rem; }
.refresh-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: rgba(129, 140, 248, 0.1); border: 1px solid rgba(129, 140, 248, 0.3); border-radius: 0.5rem; color: #818cf8; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; margin-bottom: 1rem; }
.refresh-btn:hover { background: rgba(129, 140, 248, 0.2); }
.last-updated { color: #64748b; font-size: 0.75rem; margin-left: 0.5rem; }

/* News Page */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; padding-bottom: 2rem; }
.news-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 1rem; overflow: hidden; transition: all 0.3s; }
.news-card:hover { background: rgba(255,255,255,0.04); border-color: rgba(129, 140, 248, 0.2); transform: translateY(-4px); }
.news-image { width: 100%; height: 140px; object-fit: cover; background: rgba(255,255,255,0.05); }
.news-content { padding: 1rem; }
.news-source { font-size: 0.7rem; color: #818cf8; margin-bottom: 0.4rem; }
.news-title { font-size: 1rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-title a { color: inherit; text-decoration: none; }
.news-title a:hover { color: #818cf8; }
.news-time { font-size: 0.75rem; color: #64748b; }

/* Agent Page */
.agents-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; padding-bottom: 2rem; }
.agent-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 1rem; padding: 1.25rem; transition: all 0.3s; }
.agent-card:hover { background: rgba(255,255,255,0.04); border-color: rgba(129, 140, 248, 0.2); transform: translateY(-4px); }
.agent-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.agent-emoji { font-size: 2rem; width: 50px; height: 50px; background: rgba(129, 140, 248, 0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.agent-name { font-size: 1rem; font-weight: 600; }
.agent-tag { font-size: 0.65rem; padding: 0.2rem 0.5rem; background: rgba(34, 197, 94, 0.2); color: #22c55e; border-radius: 1rem; margin-left: 0.5rem; }
.agent-tag.new { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.agent-tag.popular { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.agent-description { color: #94a3b8; font-size: 0.85rem; line-height: 1.5; margin-bottom: 0.75rem; }
.agent-story { background: rgba(129, 140, 248, 0.05); border-left: 3px solid #818cf8; padding: 0.75rem; border-radius: 0 0.5rem 0.5rem 0; font-size: 0.8rem; color: #c4b5fd; line-height: 1.5; font-style: italic; }
.hero-agent { background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(168, 85, 247, 0.1)); border: 1px solid rgba(129, 140, 248, 0.2); border-radius: 1rem; padding: 1.5rem; margin-bottom: 2rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; justify-content: center; text-align: center; }
.hero-agent-icon { font-size: 3rem; width: 80px; height: 80px; background: linear-gradient(135deg, #818cf8, #c084fc); border-radius: 1rem; display: flex; align-items: center; justify-content: center; }
.hero-agent-info h2 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.hero-agent-info p { color: #94a3b8; font-size: 0.85rem; line-height: 1.5; }
.section-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; color: #fff; }

/* Agent Detail Page */
.agent-detail-header { text-align: center; padding: 2rem 0; }
.agent-detail-emoji { font-size: 4rem; margin-bottom: 1rem; }
.agent-detail-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.story-section { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 1rem; padding: 1.5rem; margin-bottom: 1.5rem; }
.story-section-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; color: #818cf8; }
.story-text { font-size: 0.95rem; line-height: 1.7; color: #c4b5fd; margin-bottom: 1rem; }
.story-text.zh { font-family: 'Noto Sans SC', sans-serif; color: #94a3b8; }

/* Demo Boxes */
.demo-box, .scan-box, .dating-box { background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(168, 85, 247, 0.1)); border: 1px solid rgba(129, 140, 248, 0.3); border-radius: 1rem; padding: 1.5rem; margin-top: 1.5rem; }
.demo-title, .scan-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.joke-box, .coin-row-demo, .msg-row { background: rgba(0,0,0,0.3); padding: 1rem; border-radius: 0.5rem; margin-bottom: 0.75rem; }
.joke-label { font-size: 0.7rem; color: #64748b; margin-bottom: 0.4rem; }
.joke-text { font-size: 0.9rem; color: #e2e8f0; line-height: 1.5; }

/* Code Box */
.code-box { background: #1a1a2e; border-radius: 0.5rem; padding: 1rem; margin-top: 0.75rem; font-family: 'Monaco', 'Menlo', monospace; font-size: 0.75rem; overflow-x: auto; }
.code-before { color: #ef4444; margin-bottom: 0.75rem; }
.code-after { color: #22c55e; }
.comment { color: #64748b; font-style: italic; margin-top: 0.4rem; }

/* Wisdom Box */
.wisdom-box { background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(129, 140, 248, 0.1)); border: 1px solid rgba(99, 102, 241, 0.3); border-radius: 0.75rem; padding: 1.25rem; margin-top: 1rem; text-align: center; }
.wisdom-quote { font-size: 1rem; font-style: italic; color: #a5b4fc; margin-bottom: 0.5rem; }
.wisdom-attribution { color: #64748b; font-size: 0.75rem; }

/* Meme Gallery */
.meme-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1.5rem; }
.meme-card { background: rgba(0,0,0,0.3); border-radius: 0.5rem; padding: 0.75rem; text-align: center; }
.meme-placeholder { height: 100px; background: linear-gradient(135deg, #1e1e2e, #2a2a4a); border-radius: 0.4rem; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 0.4rem; }
.meme-caption { font-size: 0.75rem; color: #94a3b8; }

/* Back Link */
.back-link { color: #818cf8; text-decoration: none; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 1.5rem; }
.back-link:hover { color: #a5b4fc; }

/* Animations */
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* Tablet and up */
@media (min-width: 768px) {
	.container { padding: 0 2rem; }
	header { padding: 2rem 0; }
	.logo { font-size: 1.5rem; }
	.logo-icon { width: 40px; height: 40px; }
	.logo-icon svg { width: 24px; height: 24px; }
	nav { gap: 2rem; }
	nav a { font-size: 0.9rem; }
	.page-title h1 { font-size: 2.5rem; }
	.page-title p { font-size: 1.1rem; }
	.hero { padding: 5rem 0; }
	.badge { padding: 0.5rem 1rem; font-size: 0.8rem; margin-bottom: 1.5rem; }
	h1 { font-size: 3rem; }
	.subtitle { font-size: 1.2rem; }
	.cta-group { gap: 1rem; }
	.btn { padding: 0.875rem 1.75rem; font-size: 0.95rem; }
	.features { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding: 3rem 0; }
	.feature-card { padding: 1.5rem; }
	.feature-icon { width: 48px; height: 48px; font-size: 1.5rem; }
	.feature-card h3 { font-size: 1.1rem; }
	.feature-card p { font-size: 0.9rem; }
	.stats { gap: 4rem; padding: 3rem 0; }
	.stat-value { font-size: 2.5rem; }
	.stat-label { font-size: 0.85rem; }
	footer { margin-top: 4rem; }
	
	.market-table { border-radius: 1rem; }
	.table-header { grid-template-columns: 60px 1fr 150px 150px; padding: 1rem 1.5rem; font-size: 0.8rem; }
	.coin-row { grid-template-columns: 60px 1fr 150px 150px; padding: 1rem 1.5rem; }
	.coin-rank { font-size: 0.85rem; }
	.coin-name { font-size: 1rem; }
	.coin-symbol { font-size: 0.85rem; }
	.coin-price { font-size: 1.1rem; }
	.coin-change { font-size: 0.95rem; }
	.refresh-btn { margin-bottom: 1.5rem; }
	.last-updated { margin-left: 1rem; }
	
	.news-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; padding-bottom: 4rem; }
	.news-image { height: 160px; }
	.news-content { padding: 1.25rem; }
	.news-title { font-size: 1.1rem; }
	.news-source { font-size: 0.75rem; }
	.news-time { font-size: 0.8rem; }
	
	.agents-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
	.agent-card { padding: 1.5rem; }
	.agent-emoji { font-size: 2.5rem; width: 60px; height: 60px; }
	.agent-name { font-size: 1.1rem; }
	.agent-tag { font-size: 0.7rem; }
	.agent-description { font-size: 0.9rem; }
	.agent-story { font-size: 0.85rem; padding: 1rem; }
	.hero-agent { padding: 2rem; }
	.hero-agent-icon { font-size: 4rem; width: 100px; height: 100px; }
	.hero-agent-info h2 { font-size: 1.5rem; }
	.hero-agent-info p { font-size: 0.95rem; }
	.section-title { font-size: 1.5rem; margin-bottom: 1.5rem; }
	
	.agent-detail-header { padding: 3rem 0; }
	.agent-detail-emoji { font-size: 6rem; }
	.agent-detail-title { font-size: 3rem; }
	.story-section { padding: 2.5rem; margin-bottom: 2rem; border-radius: 1.5rem; }
	.story-section-title { font-size: 1.5rem; }
	.story-text { font-size: 1.1rem; }
	
	.meme-gallery { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
	.meme-placeholder { height: 150px; }
	.meme-caption { font-size: 0.85rem; }
}

/* Desktop only */
@media (min-width: 1024px) {
	h1 { font-size: 4rem; }
	.news-grid { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; }
	.agents-grid { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; }
	.agent-detail-header { padding: 4rem 0; }
	.meme-gallery { grid-template-columns: repeat(2, 1fr); }
}
