:root {
    --bg-primary: #06060b;
    --bg-secondary: #0a0a12;
    --bg-card: rgba(255,255,255,0.03);
    --border-color: rgba(255,255,255,0.07);
    --text-primary: #e8e8ed;
    --text-secondary: #6b6b80;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-pink: #ec4899;
}

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

body {
    font-family: 'Syne', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(139,92,246,0.4), 0 0 20px rgba(6,182,212,0.2); }
    50% { box-shadow: 0 0 16px rgba(139,92,246,0.6), 0 0 40px rgba(6,182,212,0.4); }
}

@keyframes float-particle {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 0.7; }
    50% { transform: translateY(-10px) translateX(-5px); opacity: 0.5; }
    75% { transform: translateY(-30px) translateX(15px); opacity: 0.8; }
}

@keyframes typing-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-6px); opacity: 1; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glow-border {
    0%, 100% { border-color: rgba(139,92,246,0.3); }
    50% { border-color: rgba(6,182,212,0.5); }
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease-out forwards;
}

.animate-fade-in {
    animation: fade-in 0.4s ease-out forwards;
}

.animate-slide-in {
    animation: slide-in-right 0.4s ease-out forwards;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan), var(--accent-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: typing-dot 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.particle-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(139,92,246,0.5);
    border-radius: 50%;
    animation: float-particle 8s infinite ease-in-out;
}

.nav-item-active {
    background: rgba(139,92,246,0.1);
    border-left: 3px solid;
    border-image: linear-gradient(180deg, var(--accent-purple), var(--accent-cyan)) 1;
}

.chat-bubble-user {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

.chat-bubble-ai {
    background: rgba(139,92,246,0.06);
    border: 1px solid;
    border-image: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(6,182,212,0.3)) 1;
    border-radius: 16px;
    border-image: none;
    border-color: rgba(139,92,246,0.2);
    position: relative;
}

.chat-bubble-ai::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(6,182,212,0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.avatar-pulse {
    animation: pulse-glow 3s infinite ease-in-out;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 40;
    backdrop-filter: blur(4px);
}

input, textarea {
    font-family: 'JetBrains Mono', monospace;
}

.knowledge-card {
    animation: glow-border 3s infinite ease-in-out;
}

.image-grid-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid-item:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(139,92,246,0.2);
}

/* Game Studio styles */
.code-preview-frame {
    border: none;
    width: 100%;
    height: 100%;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.animate-pulse {
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes pulse-amber {
    0%, 100% { box-shadow: 0 0 8px rgba(245,158,11,0.3); }
    50% { box-shadow: 0 0 20px rgba(245,158,11,0.5); }
}

@keyframes pulse-cyan {
    0%, 100% { box-shadow: 0 0 8px rgba(6,182,212,0.3); }
    50% { box-shadow: 0 0 20px rgba(6,182,212,0.5); }
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(6,182,212,0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-glow:hover::after {
    opacity: 1;
}

/* Game template hover effects */
.game-template-card {
    transition: all 0.2s ease;
}

.game-template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139,92,246,0.15);
}

/* Accent color themes */
[data-accent="purple"] { --accent-start: #8b5cf6; --accent-end: #06b6d4; }
[data-accent="cyan"] { --accent-start: #06b6d4; --accent-end: #3b82f6; }
[data-accent="green"] { --accent-start: #10b981; --accent-end: #06b6d4; }
[data-accent="pink"] { --accent-start: #ec4899; --accent-end: #8b5cf6; }