* {
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0a0e27;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

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

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

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.editor-container {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

.preview-frame {
    border: none;
    background: white;
}

.vibe-particles {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-rise 1s ease-out forwards;
}

@keyframes particle-rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

.fab-button {
    touch-action: manipulation;
    transition: all 0.2s ease;
}

.fab-button:active {
    transform: scale(0.95);
}

.template-drawer {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyboard-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1f3a;
    border-top: 1px solid #2d3548;
    z-index: 1000;
}

.resize-handle {
    cursor: ns-resize;
    touch-action: none;
}

pre[class*="language-"] {
    margin: 0;
    border-radius: 0;
}

.achievement-popup {
    animation: achievement-slide 0.5s ease-out;
}

@keyframes achievement-slide {
    0% {
        transform: translateX(400px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.status-message {
    animation: fade-in 0.3s ease;
}

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

/* Mobile optimizations */
@media (max-width: 640px) {
    .editor-container {
        font-size: 14px;
    }
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}