/* Custom Animations and Overrides */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Premium Cyberpunk Background */
body {
    background-color: #030303;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 0, 240, 0.05) 0%, transparent 50%);
    background-size: 30px 30px, 30px 30px, 100% 100%, 100% 100%;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

/* Subtle Film Grain */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

::-webkit-scrollbar-track {
    background: #050505; 
}

::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555; 
}

/* Markdown prose overrides for nice looking output */
.prose h1, .prose h2, .prose h3, .prose h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.2;
}

.prose h3 {
    font-size: 1.25rem;
    color: #00f0ff !important; /* Accent color for headers */
}

.prose p {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

.prose ul, .prose ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-left: 1.5em;
}

.prose li {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

.prose strong {
    color: #ffffff;
    font-weight: 600;
}

.prose blockquote {
    border-left: 4px solid #00f0ff;
    background: rgba(0, 240, 255, 0.05);
    padding: 0.5em 1em;
    margin: 1em 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #e5e7eb;
}

/* Active states for selectable buttons */
.niche-btn.active {
    background-color: rgba(0, 240, 255, 0.1);
    border-color: #00f0ff;
    color: #00f0ff;
}

.format-btn.active {
    background-color: rgba(0, 240, 255, 0.1);
    border-color: #00f0ff;
    color: #00f0ff;
}

/* Loading dots animation */
.loading-dots::after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: white;
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 white,
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 white,
            .5em 0 0 white;
    }
}

/* Mobile Mockup Styles - Updated to Cyberpunk */
.phone-frame { width: 390px; max-width: 100%; margin: 20px auto; text-align: left; background: #0f0f17; border-radius: 40px; border: 1.5px solid #2a2a3a; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.8), 0 0 0 1px #1a1a2e, inset 0 1px 0 rgba(255,255,255,0.05); position: relative; font-family: 'DM Sans', sans-serif; }
.status-bar { background: #0f0f17; padding: 14px 24px 8px; display: flex; justify-content: space-between; align-items: center; }
.status-bar .time { font-family: 'Space Mono', monospace; font-size: 13px; color: #fff; font-weight: 700; }
.status-bar .icons { display: flex; gap: 6px; align-items: center; }
.status-bar .icons span { font-size: 11px; color: #aaa; }
.app-header { background: linear-gradient(135deg, #0f0f17 0%, #141420 100%); padding: 12px 20px 16px; border-bottom: 1px solid #1e1e2e; display: flex; align-items: center; justify-content: space-between; }
.app-header .logo { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.app-header .logo span { color: #00f0ff; }
.pro-badge { background: linear-gradient(135deg, #00f0ff, #ff00f0); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; letter-spacing: 0.5px; font-family: 'Space Mono', monospace; }
.input-summary { background: #13131f; margin: 12px 16px; border-radius: 12px; padding: 10px 14px; border: 1px solid #2a2a3a; display: flex; align-items: center; gap: 10px; }
.input-summary .product-chip { background: #1e1e32; border: 1px solid #00f0ff44; color: #00f0ff; font-size: 11px; padding: 3px 10px; border-radius: 20px; font-family: 'Space Mono', monospace; font-weight: 700; }
.input-summary .meta { font-size: 11px; color: #555; flex: 1; text-align: right; }
.input-summary .meta b { color: #888; }
.section-label { padding: 6px 16px 4px; font-size: 10px; font-family: 'Space Mono', monospace; color: #00f0ff; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.output-scroll { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.output-card { background: #13131f; border-radius: 14px; border: 1px solid #1e1e2e; overflow: hidden; transition: border-color 0.2s; }
.output-card.highlight { border-color: #00f0ff44; }
.card-header { padding: 10px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #1a1a2a; }
.card-icon { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.icon-red { background: #00f0ff22; } /* Reused as cyan */
.icon-orange { background: #ff00f022; } /* Reused as magenta */
.icon-blue { background: #4d79ff22; }
.icon-green { background: #2ecc7122; }
.icon-purple { background: #a855f722; }
.icon-yellow { background: #f59e0b22; }
.icon-teal { background: #14b8a622; }
.card-title { font-size: 11px; font-family: 'Space Mono', monospace; color: #666; letter-spacing: 0.8px; text-transform: uppercase; flex: 1; margin-bottom: 0; }
.card-count { font-size: 10px; color: #00f0ff; font-family: 'Space Mono', monospace; background: #00f0ff15; padding: 2px 7px; border-radius: 20px; }
.card-body { padding: 12px 14px; }
.hook-list { display: flex; flex-direction: column; gap: 7px; }
.hook-item { background: #1a1a2a; border-radius: 10px; padding: 9px 12px; font-size: 12px; color: #ddd; line-height: 1.5; border-left: 2px solid transparent; position: relative; }
.hook-item.active { border-left-color: #00f0ff; background: #1e1a2e; }
.hook-item .num { font-family: 'Space Mono', monospace; font-size: 9px; color: #00f0ff; margin-right: 6px; font-weight: 700; }
.bullet-list { display: flex; flex-direction: column; gap: 6px; }
.bullet-item { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #ccc; line-height: 1.5; }
.bullet-dot { width: 5px; height: 5px; border-radius: 50%; background: #00f0ff; margin-top: 6px; flex-shrink: 0; }
.cta-grid { display: flex; flex-direction: column; gap: 6px; }
.cta-item { background: #1a1a2a; border-radius: 8px; padding: 8px 12px; font-size: 11.5px; color: #ddd; border-left: 2px solid #ff00f0; }
.scene-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scene-item { background: #1a1a2a; border-radius: 8px; padding: 8px 10px; }
.scene-num { font-family: 'Space Mono', monospace; font-size: 9px; color: #4d79ff; margin-bottom: 3px; font-weight: 700; }
.scene-text { font-size: 10.5px; color: #bbb; line-height: 1.4; }
.script-block { background: #1a1a2a; border-radius: 10px; padding: 10px 12px; font-size: 11.5px; color: #ccc; line-height: 1.7; }
.script-block .ts { font-family: 'Space Mono', monospace; font-size: 9px; color: #a855f7; font-weight: 700; display: block; margin-bottom: 2px; margin-top: 8px; }
.script-block .ts:first-child { margin-top: 0; }
.overlay-grid { display: flex; flex-direction: column; gap: 6px; }
.overlay-item { background: #fff; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 700; color: #000; text-align: center; font-family: 'Syne', sans-serif; letter-spacing: -0.3px; }
.overlay-item.dark { background: #000; color: #fff; }
.caption-block { font-size: 12px; color: #ccc; line-height: 1.6; }
.hashtag-row { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.hashtag { font-size: 10px; color: #4d79ff; font-family: 'Space Mono', monospace; }
.action-bar { position: sticky; bottom: 0; background: linear-gradient(to top, #0f0f17 70%, transparent); padding: 16px 16px 20px; display: flex; gap: 8px; }
.btn-copy { flex: 1; background: linear-gradient(135deg, #00f0ff, #0088ff); border: none; border-radius: 12px; padding: 12px; color: #fff; font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; letter-spacing: -0.3px; }
.btn-pdf { background: #1e1e2e; border: 1px solid #2a2a3a; border-radius: 12px; padding: 12px 16px; color: #888; font-family: 'Space Mono', monospace; font-size: 11px; cursor: pointer; }
.divider { height: 1px; background: linear-gradient(to right, transparent, #2a2a3a, transparent); margin: 4px 16px; }
.home-indicator { height: 30px; display: flex; align-items: center; justify-content: center; background: #0f0f17; }
.home-indicator .bar { width: 120px; height: 4px; background: #2a2a3a; border-radius: 2px; }
.watermark { position: absolute; bottom: 48px; right: 20px; font-family: 'Space Mono', monospace; font-size: 8px; color: #2a2a3a; letter-spacing: 1px; }

/* Generated AI Output Global Animations */
.animate-generated-card {
    animation: fadeInUp 0.8s ease-out forwards, float 8s ease-in-out infinite 0.8s;
}
