The user wants me to create a multi-theme responsive layout using Tailwind CSS and CSS variables. This is a great opportunity to showcase:
- Multiple themes - I'll create at least 3-4 themes (dark, light, cyberpunk, ocean, etc.)
- CSS Variables - For theme switching
- Responsive design - Mobile-first approach
- Tailwind CSS - For utility classes
- Interactive theme switcher
- Dynamic elements - Animations, hover effects, particles
Let me design something visually striking:
Theme Ideas:
- Midnight Dark - Deep blacks, cyan accents, subtle glow
- Solar Light - Warm whites, orange/gold accents
- Cyber Neon - Dark background, neon pink/green accents
- Ocean Deep - Deep blues, teal accents
- Forest - Dark greens, amber accents
Layout Sections:
- Navigation with theme switcher
- Hero section with animated background
- Feature cards
- Stats/metrics section
- Interactive demo panel
Dynamic Elements (3+ required):
- Particle background system
- Hover animations on cards
- Theme transition animations
- Floating elements
- Mouse-following glow effect
- Scroll-triggered animations
Let me build this:
Multi-Theme Responsive Layout
I'll create a stunning multi-theme layout with 5 distinct themes, smooth transitions, and dynamic interactive elements. The design features:
- 5 Unique Themes: Midnight, Solar, Cyber, Ocean, Forest
- CSS Variables for seamless theme switching
- Responsive Design with mobile-first approach
- Dynamic Elements: Particle background, floating orbs, hover effects, scroll animations
<!DOCTYPE html>
<html lang="en" data-theme="midnight">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Multi-Theme Layout</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
/* ============ CSS VARIABLES ============ */
:root {
--transition-speed: 0.4s;
--bg-primary: #0a0a0f;
--bg-secondary: #12121a;
--bg-card: #1a1a25;
--text-primary: #ffffff;
--text-secondary: #a0a0b0;
--accent: #00d4ff;
--accent-glow: rgba(0, 212, 255, 0.3);
--border: rgba(255, 255, 255, 0.1);
--gradient-start: #00d4ff;
--gradient-end: #7b2dff;
}
/* Theme: Midnight (default) */
[data-theme="midnight"] {
--bg-primary: #0a0a0f;
--bg-secondary: #12121a;
--bg-card: #1a1a25;
--text-primary: #ffffff;
--text-secondary: #a0a0b0;
--accent: #00d4ff;
--accent-glow: rgba(0, 212, 255, 0.3);
--border: rgba(255, 255, 255, 0.1);
--gradient-start: #00d4ff;
--gradient-end: #7b2dff;
}
/* Theme: Solar */
[data-theme="solar"] {
--bg-primary: #faf8f5;
--bg-secondary: #f0ebe3;
--bg-card: #ffffff;
--text-primary: #1a1a1a;
--text-secondary: #6b6b6b;
--accent: #ff6b35;
--accent-glow: rgba(255, 107, 53, 0.3);
--border: rgba(0, 0, 0, 0.1);
--gradient-start: #ff6b35;
--gradient-end: #ffc857;
}
/* Theme: Cyber */
[data-theme="cyber"] {
--bg-primary: #0d0d0d;
--bg-secondary: #151515;
--bg-card: #1f1f1f;
--text-primary: #ffffff;
--text-secondary: #888888;
--accent: #ff00ff;
--accent-glow: rgba(255, 0, 255, 0.4);
--border: rgba(255, 0, 255, 0.2);
--gradient-start: #ff00ff;
--gradient-end: #00ff88;
}
/* Theme: Ocean */
[data-theme="ocean"] {
--bg-primary: #0a1628;
--bg-secondary: #0f2137;
--bg-card: #152840;
--text-primary: #e8f4f8;
--text-secondary: #7da3b8;
--accent: #00c9a7;
--accent-glow: rgba(0, 201, 167, 0.3);
--border: rgba(0, 201, 167, 0.2);
--gradient-start: #00c9a7;
--gradient-end: #0088cc;
}
/* Theme: Forest */
[data-theme="forest"] {
--bg-primary: #0d1a0d;
--bg-secondary: #142814;
--bg-card: #1a331a;
--text-primary: #e8f5e8;
--text-secondary: #8fb38f;
--accent: #ffd700;
--accent-glow: rgba(255, 215, 0, 0.3);
--border: rgba(255, 215, 0, 0.2);
--gradient-start: #ffd700;
--gradient-end: #228b22;
}
/* ============ BASE STYLES ============ */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
font-family: 'Segoe UI', system-ui, sans-serif;
background-color: var(--bg-primary);
color: var(--text-primary);
transition: background-color var(--transition-speed), color var(--transition-speed);
overflow-x: hidden;
min-height: 100vh;
}
/* ============ ANIMATED BACKGROUND ============ */
.bg-pattern {
position: fixed;
inset: 0;
z-index: 0;
opacity: 0.5;
background-image:
radial-gradient(circle at 20% 50%, var(--accent-glow) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, var(--accent-glow) 0%, transparent 40%),
radial-gradient(circle at 40% 80%, var(--accent-glow) 0%, transparent 45%);
transition: opacity var(--transition-speed);
}
.grid-overlay {
position: fixed;
inset: 0;
z-index: 0;
background-image:
linear-gradient(var(--border) 1px, transparent 1px),
linear-gradient(90deg, var(--border) 1px, transparent 1px);
background-size: 60px 60px;
opacity: 0.3;
}
/* ============ FLOATING PARTICLES ============ */
#particles-canvas {
position: fixed;
inset: 0;
z-index: 1;
pointer-events: none;
}
/* ============ NAVIGATION ============ */
.nav {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
padding: 1rem 2rem;
background: linear-gradient(to bottom, var(--bg-primary), transparent);
transition: background-color var(--transition-speed);
}
.nav-blur {
position: absolute;
inset: 0;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
background: var(--bg-primary);
opacity: 0.8;
z-index: -1;
}
.nav-container {
max-width: 1400px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.logo {
font-size: 1.75rem;
font-weight: 800;
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: -0.02em;
}
.nav-links {
display: flex;
gap: 2rem;
align-items: center;
}
.nav-link {
color: var(--text-secondary);
text-decoration: none;
font-weight: 500;
font-size: 0.95rem;
transition: color 0.3s, transform 0.3s;
position: relative;
}
.nav-link::after {
content: '';
position: absolute;
bottom: -4px;
left: 0;
width: 0;
height: 2px;
background: var(--accent);
transition: width 0.3s;
}
.nav-link:hover {
color: var(--text-primary);
}
.nav-link:hover::after {
width: 100%;
}
/* ============ THEME SWITCHER ============ */
.theme-switcher {
display: flex;
gap: 0.5rem;
padding: 0.5rem;
background: var(--bg-card);
border-radius: 50px;
border: 1px solid var(--border);
}
.theme-btn {
width: 32px;
height: 32px;
border-radius: 50%;
border: 2px solid transparent;
cursor: pointer;
transition: all 0.3s;
position: relative;
overflow: hidden;
}
.theme-btn::before {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
opacity: 0;
transition: opacity 0.3s;
}
.theme-btn:hover {
transform: scale(1.15);
}
.theme-btn.active {
border-color: var(--text-primary);
transform: scale(1.1);
}
.theme-btn[data-theme="midnight"] {
background: linear-gradient(135deg, #00d4ff, #7b2dff);
}
.theme-btn[data-theme="solar"] {
background: linear-gradient(135deg, #ff6b35, #ffc857);
}
.theme-btn[data-theme="cyber"] {
background: linear-gradient(135deg, #ff00ff, #00ff88);
}
.theme-btn[data-theme="ocean"] {
background: linear-gradient(135deg, #00c9a7, #0088cc);
}
.theme-btn[data-theme="forest"] {
background: linear-gradient(135deg, #ffd700, #228b22);
}
/* ============ HERO SECTION ============ */
.hero {
position: relative;
z-index: 10;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 8rem 2rem 4rem;
}
.hero-content {
max-width: 900px;
text-align: center;
}
.hero-badge {
display: inline-block;
padding: 0.5rem 1.25rem;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 50px;
font-size: 0.85rem;
color: var(--accent);
margin-bottom: 2rem;
animation: fadeInUp 0.8s ease-out;
}
.hero-title {
font-size: clamp(2.5rem, 8vw, 5rem);
font-weight: 900;
line-height: 1.1;
margin-bottom: 1.5rem;
letter-spacing: -0.03em;
animation: fadeInUp 0.8s ease-out 0.1s both;
}
.hero-title .gradient-text {
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero-description {
font-size: 1.25rem;
color: var(--text-secondary);
max-width: 600px;
margin: 0 auto 2.5rem;
line-height: 1.7;
animation: fadeInUp 0.8s ease-out 0.2s both;
}
.hero-buttons {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
animation: fadeInUp 0.8s ease-out 0.3s both;
}
.btn {
padding: 1rem 2rem;
border-radius: 12px;
font-weight: 600;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 0.5rem;
border: none;
}
.btn-primary {
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
color: #ffffff;
box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
transform: translateY(-3px);
box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-secondary {
background: var(--bg-card);
color: var(--text-primary);
border: 1px solid var(--border);
}
.btn-secondary:hover {
background: var(--bg-secondary);
border-color: var(--accent);
}
/* ============ FLOATING ORBS ============ */
.floating-orbs {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
}
.orb {
position: absolute;
border-radius: 50%;
filter: blur(60px);
animation: float 20s infinite ease-in-out;
}
.orb-1 {
width: 400px;
height: 400px;
background: var(--gradient-start);
opacity: 0.15;
top: 10%;
left: -10%;
animation-delay: 0s;
}
.orb-2 {
width: 300px;
height: 300px;
background: var(--gradient-end);
opacity: 0.12;
bottom: 20%;
right: -5%;
animation-delay: -5s;
}
.orb-3 {
width: 250px;
height: 250px;
background: var(--accent);
opacity: 0.1;
top: 50%;
left: 50%;
animation-delay: -10s;
}
@keyframes float {
0%, 100% { transform: translate(0, 0) scale(1); }
25% { transform: translate(50px, -50px) scale(1.1); }
50% { transform: translate(-30px, 30px) scale(0.95); }
75% { transform: translate(40px, 40px) scale(1.05); }
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ============ FEATURES SECTION ============ */
.features {
position: relative;
z-index: 10;
padding: 6rem 2rem;
}
.section-header {
text-align: center;
max-width: 700px;
margin: 0 auto 4rem;
}
.section-tag {
color: var(--accent);
font-weight: 600;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.1em;
margin-bottom: 1rem;
}
.section-title {
font-size: clamp(2rem, 5vw, 3rem);
font-weight: 800;
margin-bottom: 1rem;
}
.section-desc {
color: var(--text-secondary);
font-size: 1.1rem;
line-height: 1.7;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
max-width: 1200px;
margin: 0 auto;
}
.feature-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 20px;
padding: 2rem;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.feature-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
transform: scaleX(0);
transition: transform 0.4s;
}
.feature-card:hover {
transform: translateY(-8px);
border-color: var(--accent);
box-shadow: 0 20px 40px var(--accent-glow);
}
.feature-card:hover::before {
transform: scaleX(1);
}
.feature-icon {
width: 56px;
height: 56px;
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
border-radius: 14px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
font-size: 1.5rem;
}
.feature-title {
font-size: 1.25rem;
font-weight: 700;
margin-bottom: 0.75rem;
}
.feature-desc {
color: var(--text-secondary);
line-height: 1.6;
}
/* ============ STATS SECTION ============ */
.stats {
position: relative;
z-index: 10;
padding: 4rem 2rem;
}
.stats-container {
max-width: 1000px;
margin: 0 auto;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 24px;
padding: 3rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 2rem;
}
.stat-item {
text-align: center;
padding: 1rem;
}
.stat-value {
font-size: clamp(2.5rem, 5vw, 3.5rem);
font-weight: 900;
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
}
.stat-label {
color: var(--text-secondary);
font-size: 1rem;
font-weight: 500;
}
/* ============ DEMO PANEL ============ */
.demo-panel {
position: relative;
z-index: 10;
padding: 6rem 2rem;
}
.demo-container {
max-width: 900px;
margin: 0 auto;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 24px;
overflow: hidden;
}
.demo-header {
padding: 1rem 1.5rem;
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
gap: 0.5rem;
}
.demo-dot {
width: 12px;
height: 12px;
border-radius: 50%;
}
.demo-dot.red { background: #ff5f56; }
.demo-dot.yellow { background: #ffbd2e; }
.demo-dot.green { background: #27c93f; }
.demo-content {
padding: 2rem;
}
.demo-tabs {
display: flex;
gap: 0.5rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.demo-tab {
padding: 0.75rem 1.5rem;
background: transparent;
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text-secondary);
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
transition: all 0.3s;
}
.demo-tab:hover {
border-color: var(--accent);
color: var(--text-primary);
}
.demo-tab.active {
background: var(--accent);
border-color: var(--accent);
color: #ffffff;
}
.demo-display {
background: var(--bg-secondary);
border-radius: 12px;
padding: 2rem;
min-height: 200px;
}
.demo-display h3 {
font-size: 1.5rem;
margin-bottom: 1rem;
}
.demo-display p {
color: var(--text-secondary);
line-height: 1.7;
}
.progress-bars {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.progress-item {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.progress-label {
display: flex;
justify-content: space-between;
font-size: 0.9rem;
}
.progress-bar {
height: 8px;
background: var(--bg-primary);
border-radius: 4px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
border-radius: 4px;
transition: width 1s ease-out;
}
/* ============ FOOTER ============ */
.footer {
position: relative;
z-index: 10;
padding: 4rem 2rem 2rem;
border-top: 1px solid var(--border);
}
.footer-content {
max-width: 1200px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 3rem;
}
.footer-brand .logo {
margin-bottom: 1rem;
display: inline-block;
}
.footer-brand p {
color: var(--text-secondary);
font-size: 0.95rem;
line-height: 1.6;
}
.footer-links h4 {
font-size: 1rem;
font-weight: 600;
margin-bottom: 1.25rem;
}
.footer-links ul {
list-style: none;
}
.footer-links li {
margin-bottom: 0.75rem;
}
.footer-links a {
color: var(--text-secondary);
text-decoration: none;
font-size: 0.95rem;
transition: color 0.3s;
}
.footer-links a:hover {
color: var(--accent);
}
.footer-bottom {
max-width: 1200px;
margin: 3rem auto 0;
padding-top: 2rem;
border-top: 1px solid var(--border);
text-align: center;
color: var(--text-secondary);
font-size: 0.9rem;
}
/* ============ MOBILE MENU ============ */
.mobile-menu-btn {
display: none;
background: var(--bg-card);
border: 1px solid var(--border);
padding: 0.5rem;
border-radius: 8px;
cursor: pointer;
}
.mobile-menu-btn span {
display: block;
width: 24px;
height: 2px;
background: var(--text-primary);
margin: 5px 0;
transition: all 0.3s;
}
/* ============ SCROLL ANIMATIONS ============ */
.reveal {
opacity: 0;
transform: translateY(40px);
transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active {
opacity: 1;
transform: translateY(0);
}
/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
.nav-links {
display: none;
}
.mobile-menu-btn {
display: block;
}
.theme-switcher {
order: -1;
width: 100%;
justify-content: center;
}
.nav-container {
flex-wrap: wrap;
}
.hero {
padding: 6rem 1.5rem 3rem;
}
.features, .stats, .demo-panel {
padding: 4rem 1.5rem;
}
.stats-container {
padding: 2rem 1.5rem;
}
.demo-content {
padding: 1.5rem;
}
}
@media (max-width: 480px) {
.hero-buttons {
flex-direction: column;
width: 100%;
}
.btn {
width: 100%;
justify-content: center;
}
.features-grid {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<!-- Animated Background -->
<div class="bg-pattern"></div>
<div class="grid-overlay"></div>
<canvas id="particles-canvas"></canvas>
<!-- Navigation -->
<nav class="nav">
<div class="nav-blur"></div>
<div class="nav-container">
<div class="logo">NexusUI</div>
<div class="nav-links">
<a href="#features" class="nav-link">Features</a>
<a href="#demo" class="nav-link">Demo</a>
<a href="#stats" class="nav-link">Stats</a>
<a href="#" class="nav-link">Docs</a>
</div>
<div class="theme-switcher">
<button class="theme-btn active" data-theme="midnight" title="Midnight"></button>
<button class="theme-btn" data-theme="solar" title="Solar"></button>
<button class="theme-btn" data-theme="cyber" title="Cyber"></button>
<button class="theme-btn" data-theme="ocean" title="Ocean"></button>
<button class="theme-btn" data-theme="forest" title="Forest"></button>
</div>
<button class="mobile-menu-btn">
<span></span>
<span></span>
<span></span>
</button>
</div>
</nav>
<!-- Hero Section -->
<section class="hero">
<div class="floating-orbs">
<div class="orb orb-1"></div>
<div class="orb orb-2"></div>
<div class="orb orb-3"></div>
</div>
<div class="hero-content">
<div class="hero-badge">Version 2.0 Now Available</div>
<h1 class="hero-title">
Build with <span class="gradient-text">Infinite Themes</span>
</h1>
<p class="hero-description">
A powerful design system that adapts to your vision. Switch between stunning themes instantly with CSS variables and create experiences that feel alive.
</p>
<div class="hero-buttons">
<a href="#demo" class="btn btn-primary">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polygon points="5 3 19 12 5 21 5 3"></polygon>
</svg>
Explore Demo
</a>
<a href="#features" class="btn btn-secondary">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="16" y1="13" x2="8" y2="13"></line>
<line x1="16" y1="17" x2="8" y2="17"></line>
<polyline points="10 9 9 9 8 9"></polyline>
</svg>
Documentation
</a>
</div>
</div>
</section>
<!-- Features Section -->
<section id="features" class="features">
<div class="section-header reveal">
<div class="section-tag">Features</div>
<h2 class="section-title">Everything You Need</h2>
<p class="section-desc">A comprehensive toolkit designed for modern web development with performance and aesthetics in mind.</p>
</div>
<div class="features-grid">
<div class="feature-card reveal">
<div class="feature-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<circle cx="12" cy="12" r="5"></circle>
<path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"></path>
</svg>
</div>
<h3 class="feature-title">Dynamic Theming</h3>
<p class="feature-desc">Seamlessly switch between multiple themes using CSS variables. No page reload required.</p>
</div>
<div class="feature-card reveal">
<div class="feature-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
<line x1="8" y1="21" x2="16" y2="21"></line>
<line x1="12" y1="17" x2="12" y2="21"></line>
</svg>
</div>
<h3 class="feature-title">Fully Responsive</h3>
<p class="feature-desc">Built mobile-first with responsive breakpoints that look perfect on any device size.</p>
</div>
<div class="feature-card reveal">
<div class="feature-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"></path>
</svg>
</div>
<h3 class="feature-title">Optimized Performance</h3>
<p class="feature-desc">Lightweight CSS with minimal JavaScript. Fast loading times guaranteed.</p>
</div>
<div class="feature-card reveal">
<div class="feature-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
</svg>
</div>
<h3 class="feature-title">Accessibility First</h3>
<p class="feature-desc">WCAG compliant with proper contrast ratios and keyboard navigation support.</p>
</div>
<div class="feature-card reveal">
<div class="feature-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
</svg>
</div>
<h3 class="feature-title">Smooth Animations</h3>
<p class="feature-desc">Buttery smooth transitions and micro-interactions that feel natural and polished.</p>
</div>
<div class="feature-card reveal">
<div class="feature-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>
<polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline>
<line x1="12" y1="22.08" x2="12" y2="12"></line>
</svg>
</div>
<h3 class="feature-title">Modular Architecture</h3>
<p class="feature-desc">Use only what you need. Each component is self-contained and reusable.</p>
</div>
</div>
</section>
<!-- Stats Section -->
<section id="stats" class="stats">
<div class="stats-container reveal">
<div class="stat-item">
<div class="stat-value">5</div>
<div class="stat-label">Unique Themes</div>
</div>
<div class="stat-item">
<div class="stat-value">50+</div>
<div class="stat-label">Components</div>
</div>
<div class="stat-item">
<div class="stat-value">99%</div>
<div class="stat-label">Satisfaction</div>
</div>
<div class="stat-item">
<div class="stat-value">4.9</div>
<div class="stat-label">Average Rating</div>
</div>
</div>
</section>
<!-- Demo Panel -->
<section id="demo" class="demo-panel">
<div class="section-header reveal">
<div class="section-tag">Interactive Demo</div>
<h2 class="section-title">See It In Action</h2>
<p class="section-desc">Experience the smooth theme transitions and interactive components yourself.</p>
</div>
<div class="demo-container reveal">
<div class="demo-header">
<div class="demo-dot red"></div>
<div class="demo-dot yellow"></div>
<div class="demo-dot green"></div>
</div>
<div class="demo-content">
<div class="demo-tabs">
<button class="demo-tab active" data-tab="overview">Overview</button>
<button class="demo-tab" data-tab="performance">Performance</button>
<button class="demo-tab" data-tab="components">Components</button>
</div>
<div class="demo-display" id="demo-display">
<h3>Welcome to NexusUI</h3>
<p>Switch between themes using the navigation above. Each theme is carefully crafted with unique color palettes and maintains excellent readability and contrast.</p>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="footer-content">
<div class="footer-brand">
<div class="logo">NexusUI</div>
<p>A modern design system built for developers who care about aesthetics and performance.</p>
</div>
<div class="footer-links">
<h4>Product</h4>
<ul>
<li><a href="#">Features</a></li>
<li><a href="#">Pricing</a></li>
<li><a href="#">Changelog</a></li>
<li><a href="#">Roadmap</a></li>
</ul>
</div>
<div class="footer-links">
<h4>Resources</h4>
<ul>
<li><a href="#">Documentation</a></li>
<li><a href="#">Components</a></li>
<li><a href="#">Templates</a></li>
<li><a href="#">Tutorials</a></li>
</ul>
</div>
<div class="footer-links">
<h4>Company</h4>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>2024 NexusUI. Built with Tailwind CSS and CSS Variables.</p>
</div>
</footer>
<script>
// ============ PARTICLE SYSTEM ============
const canvas = document.getElementById('particles-canvas');
const ctx = canvas.getContext('2d');
let particles = [];
let mouseX = 0;
let mouseY = 0;
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
function getThemeColors() {
const style = getComputedStyle(document.documentElement);
return {
accent: style.getPropertyValue('--accent').trim() || '#00d4ff',
glow: style.getPropertyValue('--accent-glow').trim() || 'rgba(0, 212, 255, 0.3)'
};
}
class Particle {
constructor() {
this.reset();
}
reset() {
this.x = Math.random() * canvas.width;
this.y = Math.random() * canvas.height;
this.size = Math.random() * 3 + 1;
this.speedX = (Math.random() - 0.5) * 0.5;
this.speedY = (Math.random() - 0.5) * 0.5;
this.opacity = Math.random() * 0.5 + 0.2;
}
update() {
this.x += this.speedX;
this.y += this.speedY;
// Mouse interaction
const dx = mouseX - this.x;
const dy = mouseY - this.y;
const dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 150) {
this.x -= dx * 0.02;
this.y -= dy * 0.02;
}
if (this.x < 0 || this.x > canvas.width || this.y < 0 || this.y > canvas.height) {
this.reset();
}
}
draw() {
const colors = getThemeColors();
ctx.beginPath();
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
ctx.fillStyle = colors.accent + Math.floor(this.opacity * 255).toString(16).padStart(2, '0');
ctx.fill();
}
}
function initParticles() {
particles = [];
const particleCount = Math.min(80, Math.floor((canvas.width * canvas.height) / 15000));
for (let i = 0; i < particleCount; i++) {
particles.push(new Particle());
}
}
function connectParticles() {
const colors = getThemeColors();
for (let i = 0; i < particles.length; i++) {
for (let j = i + 1; j < particles.length; j++) {
const dx = particles[i].x - particles[j].x;
const dy = particles[i].y - particles[j].y;
const dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 120) {
ctx.beginPath();
ctx.moveTo(particles[i].x, particles[i].y);
ctx.lineTo(particles[j].x, particles[j].y);
ctx.strokeStyle = colors.accent + Math.floor((1 - dist / 120) * 40).toString(16).padStart(2, '0');
ctx.lineWidth = 0.5;
ctx.stroke();
}
}
}
}
function animateParticles() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
particles.forEach(p => {
p.update();
p.draw();
});
connectParticles();
requestAnimationFrame(animateParticles);
}
// ============ THEME SWITCHER ============
const themeBtns = document.querySelectorAll('.theme-btn');
themeBtns.forEach(btn => {
btn.addEventListener('click', () => {
const theme = btn.dataset.theme;
document.documentElement.setAttribute('data-theme', theme);
themeBtns.forEach(b => b.classList.remove('active'));
btn.classList.add('active');
// Reinitialize particles with new theme colors
setTimeout(() => {
initParticles();
}, 100);
});
});
// ============ DEMO TABS ============
const demoTabs = document.querySelectorAll('.demo-tab');
const demoDisplay = document.getElementById('demo-display');
const tabContent = {
overview: {
title: 'Welcome to NexusUI',
content: 'Switch between themes using the navigation above. Each theme is carefully crafted with unique color palettes and maintains excellent readability and contrast.'
},
performance: {
title: 'Performance Metrics',
content: 'progress-bars',
bars: [
{ label: 'Load Time', value: 95 },
{ label: 'Accessibility', value: 98 },
{ label: 'SEO Score', value: 100 },
{ label: 'Best Practices', value: 96 }
]
},
components: {
title: 'Rich Component Library',
content: 'Over 50+ pre-built components including buttons, cards, modals, forms, navigation patterns, and more. Each component adapts to the current theme automatically.'
}
};
demoTabs.forEach(tab => {
tab.addEventListener('click', () => {
const tabId = tab.dataset.tab;
const data = tabContent[tabId];
demoTabs.forEach(t => t.classList.remove('active'));
tab.classList.add('active');
if (data.content === 'progress-bars') {
demoDisplay.innerHTML = `
<h3>${data.title}</h3>
<div class="progress-bars">
${data.bars.map(bar => `
<div class="progress-item">
<div class="progress-label">
<span>${bar.label}</span>
<span>${bar.value}%</span>
</div>
<div class="progress-bar">
<div class="progress-fill" style="width: 0%" data-width="${bar.value}"></div>
</div>
</div>
`).join('')}
</div>
`;
// Animate progress bars
setTimeout(() => {
document.querySelectorAll('.progress-fill').forEach(fill => {
fill.style.width = fill.dataset.width + '%';
});
}, 100);
} else {
demoDisplay.innerHTML = `
<h3>${data.title}</h3>
<p>${data.content}</p>
`;
}
});
});
// ============ SCROLL REVEAL ============
const revealElements = document.querySelectorAll('.reveal');
function checkReveal() {
const windowHeight = window.innerHeight;
revealElements.forEach((el, index) => {
const elementTop = el.getBoundingClientRect().top;
const revealPoint = windowHeight - 100;
if (elementTop < revealPoint) {
setTimeout(() => {
el.classList.add('active');
}, index * 100);
}
});
}
// ============ INITIALIZATION ============
window.addEventListener('resize', () => {
resizeCanvas();
initParticles();
});
window.addEventListener('mousemove', (e) => {
mouseX = e.clientX;
mouseY = e.clientY;
});
window.addEventListener('scroll', checkReveal);
// Initialize everything
resizeCanvas();
initParticles();
animateParticles();
checkReveal();
</script>
</body>
</html>
Key Features
5 Unique Themes
- Midnight - Dark with cyan/purple accents (default)
- Solar - Light mode with warm orange/gold tones
- Cyber - Dark with neon pink/green cyberpunk vibes
- Ocean - Deep blue with teal accents
- Forest - Dark green with golden accents
CSS Variables Architecture
All theming is controlled via CSS custom properties:
--bg-primary, --bg-secondary, --bg-card
--text-primary, --text-secondary
--accent, --accent-glow
--gradient-start, --gradient-end
--border
Dynamic Elements
- Interactive Particle System - Responds to mouse movement
- Floating Orbs - Animated gradient blobs
- Scroll Reveal Animations - Elements fade in on scroll
- Hover Effects - Cards lift and glow
- Theme Transitions - Smooth color morphing
- Progress Bar Animations - In the demo panel
Responsive Design
- Mobile-first approach
- Breakpoints at 768px and 480px
- Flexible grid layouts
- Collapsible navigation