/* MemeFusion AI - Ultra-Modern Dark Cyberpunk Design System */
:root {
    --bg-main: #060810;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --accent-yellow: #facc15;
    --accent-cyan: #06b6d4;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-card: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(250, 204, 21, 0.4);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism containers */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* Header Navbar */
.app-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-card);
    background: rgba(6, 8, 16, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent-yellow), var(--accent-pink));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 30%, var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pro-badge {
    background: linear-gradient(135deg, var(--accent-yellow), #eab308);
    color: #090d16;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.credit-pill {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 20px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-yellow);
    cursor: pointer;
}

/* Nav Tabs */
.nav-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    overflow-x: auto;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--border-card);
}

.nav-tab {
    padding: 10px 18px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-tab.active {
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.4);
    color: var(--accent-yellow);
}

/* Dual Slot Fusion Reactor */
.fusion-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .fusion-container {
        grid-template-columns: 1fr;
    }
}

.fusion-slot {
    aspect-ratio: 1 / 1;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    transition: all 0.25s ease;
}

.fusion-slot:hover {
    border-color: var(--accent-yellow);
    background: rgba(15, 23, 42, 0.75);
}

.fusion-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fusion-slot-label {
    position: absolute;
    bottom: 12px;
    background: rgba(6, 8, 16, 0.8);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Action Buttons */
.btn-fusion-primary {
    width: 100%;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-yellow), #eab308);
    color: #090d16;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(250, 204, 21, 0.35);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-fusion-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(250, 204, 21, 0.5);
}

.btn-fusion-secondary {
    padding: 12px 20px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-card);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-fusion-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 16, 0.85);
    backdrop-filter: blur(12px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    position: relative;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 15px rgba(250, 204, 21, 0.3); }
    100% { box-shadow: 0 0 30px rgba(250, 204, 21, 0.7); }
}

/* Visual Preset Cards Grid */
.preset-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 4px 12px 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.preset-grid::-webkit-scrollbar {
    height: 5px;
}

.preset-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}

.preset-card {
    flex: 0 0 110px;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid var(--border-card);
    border-radius: 18px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25 ease;
    position: relative;
    overflow: hidden;
}

.preset-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
}

.preset-card.active {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.5);
    background: rgba(30, 41, 59, 0.95);
}

.preset-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 6px;
    display: block;
}

.preset-card-title {
    font-size: 0.73rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
