/* Base Design System & Styles */
:root {
    --transition-speed: 0.4s;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- THEME: GLASSMORPHISM --- */
body[data-theme="glassmorphism"] {
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: 1px solid rgba(255, 255, 255, 0.2);
    --card-blur: blur(12px);
    --btn-primary: rgba(255, 255, 255, 0.2);
    --btn-text: #fff;
    --accent: #00f2fe;
}

/* --- THEME: NEUMORPHISM --- */
body[data-theme="neumorphism"] {
    --bg-color: #e0e5ec;
    --text-color: #31344b;
    --card-bg: #e0e5ec;
    --shadow-light: 20px 20px 60px #bec3c9, -20px -20px 60px #ffffff;
    --shadow-inset: inset 6px 6px 12px #bec3c9, inset -6px -6px 12px #ffffff;
    --btn-primary: #e0e5ec;
    --accent: #4481eb;
}

/* --- THEME: NEUBRUTALISM --- */
body[data-theme="neubrutalism"] {
    --bg-color: #f3f3f3;
    --text-color: #000;
    --card-bg: #fff;
    --card-border: 4px solid #000;
    --btn-primary: #ffeb3b;
    --accent: #ff4081;
    --font-heading: 'Space Grotesk', sans-serif;
    --shadow-hard: 8px 8px 0px #000;
}

/* --- THEME: MATERIAL DESIGN --- */
body[data-theme="material"] {
    --bg-color: #f5f5f5;
    --text-color: rgba(0, 0, 0, 0.87);
    --card-bg: #fff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --btn-primary: #6200ee;
    --accent: #03dac6;
    --font-heading: 'Roboto', sans-serif;
}

/* --- THEME: FLAT DESIGN --- */
body[data-theme="flat"] {
    --bg-color: #2c3e50;
    --text-color: #ecf0f1;
    --card-bg: #34495e;
    --btn-primary: #e67e22;
    --accent: #1abc9c;
    --card-border: none;
    --border-radius: 0;
}

/* --- THEME: SKEUOMORPHISM --- */
body[data-theme="skeuomorphism"] {
    --bg-color: #d1d1d1;
    --text-color: #333;
    --card-bg: linear-gradient(145deg, #e6e6e6, #bababa);
    --card-border: 1px solid #ffffff;
    --shadow-light: 5px 5px 15px #a1a1a1, -5px -5px 15px #ffffff;
    --btn-primary: linear-gradient(to bottom, #4facfe 0%, #00f2fe 100%);
    --accent: #333;
}

/* --- THEME: BENTO UI --- */
body[data-theme="bento"] {
    --bg-color: #f8f9fa;
    --text-color: #1a1a1b;
    --card-bg: #ffffff;
    --card-border: 1.5px solid #edf2f7;
    --btn-primary: #1a1a1a;
    --accent: #ff4757;
}

/* --- THEME: CLAYMORPHISM --- */
body[data-theme="claymorphism"] {
    --bg-color: #f0f4f8;
    --text-color: #2d3748;
    --card-bg: #ffffff;
    --shadow-clay: 10px 10px 20px rgba(0, 0, 0, 0.05),
        inset -8px -8px 12px rgba(0, 0, 0, 0.1),
        inset 8px 8px 12px rgba(255, 255, 255, 0.8);
    --btn-primary: #4a90e2;
    --accent: #f6ad55;
}

/* --- THEME: SPATIAL UI --- */
body[data-theme="spatial"] {
    --bg-color: #000;
    --text-color: #fff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: 1px solid rgba(255, 255, 255, 0.1);
    --accent: #5aebff;
    --btn-primary: #fff;
    --card-blur: blur(20px);
}

body[data-theme="spatial"] .container {
    perspective: 1200px;
}

body[data-theme="spatial"] .card {
    transform-style: preserve-3d;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* --- THEME: KINETIC UI --- */
body[data-theme="kinetic"] {
    --bg-color: #0a0a0a;
    --text-color: #f0f0f0;
    --card-bg: #1a1a1a;
    --accent: #ff0055;
    --btn-primary: #ff0055;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

body[data-theme="kinetic"] .card {
    animation: float 6s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.5s);
}

/* --- THEME: CYBERPUNK --- */
body[data-theme="cyberpunk"] {
    --bg-color: #050505;
    --text-color: #00ff00;
    --card-bg: #000;
    --card-border: 2px solid #ff00ff;
    --accent: #00ffff;
    --font-heading: 'Roboto Mono', monospace;
}

body[data-theme="cyberpunk"] .card {
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 85% 100%, 0 100%);
    box-shadow: 5px 5px 0 #00ffff;
}

body[data-theme="cyberpunk"] .btn {
    border-radius: 0;
    background: #ff00ff;
    color: #fff;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
}

/* --- THEME: AURORA UI --- */
body[data-theme="aurora"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: 1px solid rgba(255, 255, 255, 0.1);
    --accent: #8b5cf6;
}

body[data-theme="aurora"] .aurora-bg {
    opacity: 1;
    background: radial-gradient(circle at 20% 20%, #3b82f6 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, #ec4899 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #8b5cf6 0%, transparent 50%);
    filter: blur(80px);
    animation: aurora-mesh 20s ease infinite alternate;
}

@keyframes aurora-mesh {
    0% {
        transform: scale(1) translate(0, 0);
    }

    50% {
        transform: scale(1.2) translate(5%, 5%);
    }

    100% {
        transform: scale(1) translate(0, 0);
    }
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background: var(--bg-color, #fff);
    transition: background var(--transition-speed), color var(--transition-speed);
    min-height: 100vh;
    overflow-x: hidden;
}

body[data-theme="glassmorphism"] {
    background: var(--bg-gradient);
}

body[data-theme="flat"] {
    border-radius: 0;
}

body[data-theme="flat"] .card {
    border-radius: 4px;
}

body[data-theme="material"] .card {
    box-shadow: var(--card-shadow);
    border-radius: 4px;
}

body[data-theme="skeuomorphism"] .card {
    box-shadow: var(--shadow-light);
    border-radius: 20px;
}

body[data-theme="claymorphism"] .card {
    box-shadow: var(--shadow-clay);
    border-radius: 35px;
}

body[data-theme="bento"] .card {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

/* Navigation */
.main-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

body[data-theme="glassmorphism"] .main-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.theme-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    border-radius: 12px;
}

.theme-toggle {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.theme-toggle.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body[data-theme="neubrutalism"] .theme-toggle.active {
    background: var(--accent);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.8s ease backwards;
}

.bento-grid .card:nth-child(1) {
    animation-delay: 0.1s;
}

.bento-grid .card:nth-child(2) {
    animation-delay: 0.2s;
}

.bento-grid .card:nth-child(3) {
    animation-delay: 0.3s;
}

.bento-grid .card:nth-child(4) {
    animation-delay: 0.4s;
}

.bento-grid .card:nth-child(5) {
    animation-delay: 0.5s;
}

/* Responsive Grid */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .card-wide,
    .card-tall {
        grid-column: auto;
        grid-row: auto;
    }
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

body[data-theme="flat"] .theme-toggle {
    border-radius: 0;
    background: #34495e;
    color: #fff;
    margin: 2px;
}

body[data-theme="neubrutalism"] .theme-toggle {
    border: 2px solid #000;
    font-weight: bold;
    background: #fff;
    margin: 2px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.hero p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.8;
}

/* Components */
.card {
    background: var(--card-bg);
    border: var(--card-border, none);
    backdrop-filter: var(--card-blur, none);
    padding: 2rem;
    border-radius: 20px;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
}

/* Theme Specific Card Adjustments */
body[data-theme="neumorphism"] .card {
    box-shadow: var(--shadow-light);
}

body[data-theme="neubrutalism"] .card {
    box-shadow: var(--shadow-hard);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.card-wide {
    grid-column: span 2;
}

.card-square {
    grid-column: span 1;
}

.card-tall {
    grid-row: span 2;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-heading);
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

body[data-theme="neubrutalism"] .btn {
    border-radius: 0;
    border: 3px solid #000;
    box-shadow: 4px 4px 0 #000;
}

body[data-theme="neubrutalism"] .btn:hover {
    box-shadow: 2px 2px 0 #000;
    transform: translate(2px, 2px);
}

body[data-theme="skeuomorphism"] .btn {
    background: var(--btn-primary);
    box-shadow: 0 4px 0 #0056b3, inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

body[data-theme="flat"] .btn {
    border-radius: 0;
}

/* Helper Classes */
.visual-placeholder {
    width: 100%;
    height: 120px;
    background: var(--accent);
    opacity: 0.2;
    border-radius: 12px;
    margin-top: 1rem;
}

/* More styles to come in subsequent iterations... */