/* Reelzai — Premium dark AI SaaS styling */

:root {
    --bg: #070B14;
    --card: #111827;
    --accent: #8B5CF6;
    --glow: #3B82F6;
    --text-muted: #9CA3AF;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    min-height: 100vh;
}

/* Gradient mesh background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(59, 130, 246, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(139, 92, 246, 0.06), transparent);
    pointer-events: none;
    z-index: -1;
}

/* Glass cards */
.glass-card {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.glass-card:hover {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.08);
}

.feature-card:hover {
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 50%, #3B82F6 100%);
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
    opacity: 0.95;
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Form inputs */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: white;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field::placeholder {
    color: #6B7280;
}

.input-field:focus {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Nav active state */
.nav-link.active {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

/* Dashboard preview mock */
.dashboard-preview {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.9) 0%, rgba(7, 11, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* AI loading animation */
.ai-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
}

.ai-loader-dots {
    display: flex;
    gap: 0.5rem;
}

.ai-loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--glow));
    animation: pulse-dot 1.4s ease-in-out infinite both;
}

.ai-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.ai-scan-line {
    width: 100%;
    max-width: 280px;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.ai-scan-line::after {
    content: '';
    position: absolute;
    left: -40%;
    top: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), var(--glow), transparent);
    animation: scan 1.5s ease-in-out infinite;
}

@keyframes scan {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* Hashtag pills */
.hashtag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #E5E7EB;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.hashtag-pill:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

.hashtag-pill.copied {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.15);
}

/* Heatmap cells */
.heat-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.heat-best { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.3); color: #86EFAC; }
.heat-avg { background: rgba(234, 179, 8, 0.12); border-color: rgba(234, 179, 8, 0.25); color: #FDE047; }
.heat-avoid { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.25); color: #FCA5A5; }

/* Score ring */
.score-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #8B5CF6, #3B82F6, #8B5CF6);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Section spacing */
.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Blog cards */
.blog-card-image {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.15));
}

/* Creator avatar placeholder */
.avatar-placeholder {
    background: linear-gradient(135deg, #374151, #1F2937);
}

/* Lazy images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ai-loader-dots span,
    .ai-scan-line::after,
    .feature-card:hover { animation: none; transform: none; }
}

/* Utility */
.text-gradient {
    background: linear-gradient(135deg, #A78BFA 0%, #60A5FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(59, 130, 246, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
}

.glow-border:hover::before {
    opacity: 1;
}

.hidden-results { display: none; }
.hidden-results.visible { display: block; }
