/* ╔══════════════════════════════════════════════════════╗
   ║  AI Caption Magic — Full Premium ViralTools Theme   ║
   ╚══════════════════════════════════════════════════════╝ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-deep:       #06040f;
    --bg-mid:        #0d0a1e;
    --bg-card:       rgba(255,255,255,0.04);
    --border:        rgba(255,255,255,0.08);
    --card-border:   rgba(255,255,255,0.08);
    --border-hover:  rgba(255,255,255,0.18);
    --text-primary:  #f0ecff;
    --text-main:     #f0ecff;
    --text-muted:    rgba(240,236,255,0.55);
    --purple-500:    #8b5cf6;
    --purple-400:    #a78bfa;
    --purple-300:    #c4b5fd;
    --pink-500:      #ec4899;
    --primary-gradient: linear-gradient(135deg, #7c3aed, #c026d3);
    --accent-glow:   rgba(139,92,246,0.35);
    --radius:        20px;
    --transition:    all 0.3s cubic-bezier(0.4,0,0.2,1);
    --transition-smooth: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
    margin: 0;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Common Sections ── */
.container,
.hero-container,
.section-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-dark { padding: 100px 0; background: var(--bg-mid); }
.section-mid  { padding: 100px 0; background: var(--bg-deep); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--purple-400);
    background: rgba(139,92,246,0.15);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(139,92,246,0.25);
    margin-bottom: 16px;
}
.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}
.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* ── Gradient text ── */
.gradient-text {
    background: linear-gradient(135deg, var(--purple-400), var(--pink-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
    position: relative;
    padding: 100px 0 120px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}
.hero__orb--1 {
    width: 600px; height: 600px;
    top: -200px; left: -100px;
    background: radial-gradient(circle, rgba(124,58,237,0.2), transparent 70%);
}
.hero__orb--2 {
    width: 500px; height: 500px;
    top: -100px; right: -80px;
    background: radial-gradient(circle, rgba(219,39,119,0.15), transparent 70%);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--purple-300);
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
    padding: 7px 18px;
    border-radius: 50px;
    margin-bottom: 24px;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 18px;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 40px;
}

/* ── Main card (inside hero) ── */
.main-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.35);
    transition: var(--transition-smooth);
    text-align: left;
}
.main-card:hover { border-color: rgba(139,92,246,0.3); }

.input-group { margin-bottom: 20px; }
.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

textarea {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    transition: var(--transition-smooth);
    outline: none;
}
textarea:focus {
    border-color: var(--purple-500);
    background: rgba(255,255,255,0.06);
}

select {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 14px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    transition: var(--transition-smooth);
    outline: none;
}
select:focus { border-color: var(--purple-500); }
select option { background: #1a1535; color: #fff; }

.btn-generate {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    border-radius: 14px;
    padding: 16px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,0.55); filter: brightness(1.1); }

/* ══════════════════════════════════
   RESULTS SECTION
══════════════════════════════════ */
.results-wrapper { margin-top: -60px; position: relative; z-index: 10; margin-bottom: 100px; }
#results-container { display: none; margin-bottom: 40px; }

.result-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}
.result-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.hook-line {
    display: block;
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--purple-400);
}

.caption-content { color: rgba(240,236,255,0.85); line-height: 1.7; margin-bottom: 20px; white-space: pre-wrap; font-size: 0.98rem; }

.card-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-action {
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.88rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}
.btn-action:hover { background: rgba(255,255,255,0.08); border-color: var(--border-hover); }

.btn-whatsapp { background: rgba(37,211,102,0.12); border-color: rgba(37,211,102,0.2); color: #4ade80; }
.btn-whatsapp:hover { background: rgba(37,211,102,0.22); color: #86efac; }

/* ── Hashtags ── */
.hashtag-section {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 40px;
}
.hashtag-header { margin-bottom: 16px; }
.hashtag-header h3 { font-size: 1.1rem; font-weight: 700; color: #fff; }

.hashtag-list { color: var(--purple-400); word-break: break-all; font-size: 1rem; margin-bottom: 20px; line-height: 1.8; }

.generate-more-box { text-align: center; }
.btn-refresh { margin: 0 auto; background: rgba(139,92,246,0.1); border-color: rgba(139,92,246,0.25); color: var(--purple-300); }

/* ══════════════════════════════════
   STEPS GRID
══════════════════════════════════ */
.steps-grid { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.step-card {
    flex: 1; min-width: 250px; max-width: 320px;
    text-align: center; padding: 40px 30px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    transition: var(--transition); position: relative;
}
.step-card:hover { border-color: var(--border-hover); transform: translateY(-5px); box-shadow: 0 20px 50px rgba(0,0,0,0.3); }

.step-num { font-size: 2.8rem; font-weight: 900; color: rgba(139,92,246,0.08); line-height: 1; margin-bottom: 10px; letter-spacing: -2px; }
.step-icon {
    width: 60px; height: 60px; border-radius: 16px;
    background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(192,38,211,0.08));
    border: 1px solid rgba(139,92,246,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--purple-400); margin: 0 auto 20px;
}
.step-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.step-card p { font-size: 0.9rem; color: var(--text-muted); }

.step-connector { color: rgba(255,255,255,0.1); font-size: 1.4rem; padding: 0 15px; flex-shrink: 0; }

/* ══════════════════════════════════
   FEATURES GRID
══════════════════════════════════ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature-item {
    background: var(--bg-card); border: 1px solid var(--border); padding: 30px; border-radius: var(--radius);
    transition: var(--transition);
}
.feature-item:hover { border-color: rgba(139,92,246,0.25); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(124,58,237,0.1); }

.feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(192,38,211,0.06));
    border: 1px solid rgba(139,92,246,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--purple-400); margin-bottom: 20px;
}
.feature-item h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.feature-item p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ══════════════════════════════════
   FAQ
══════════════════════════════════ */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.faq-question {
    padding: 20px 24px; background: var(--bg-card); cursor: pointer; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center; transition: background 0.3s;
}
.faq-question:hover { background: rgba(255,255,255,0.06); }
.faq-answer {
    padding: 0 24px; max-height: 0; overflow: hidden; transition: all 0.3s ease;
    color: var(--text-muted); background: rgba(255,255,255,0.02); font-size: 0.95rem; line-height: 1.7;
}
.faq-item.active .faq-answer { padding: 20px 24px; max-height: 200px; border-top: 1px solid var(--border); }
.faq-item.active .faq-question i { transform: rotate(180deg); }

/* ── Loader ── */
.loader { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.copy-toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--primary-gradient); color: white; padding: 12px 28px; border-radius: 50px; box-shadow: 0 10px 30px rgba(124,58,237,0.4); font-weight: 600; font-size: 0.9rem; display: none; z-index: 1000; animation: slideUp 0.3s ease-out; }
.copy-toast.error-toast { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 10px 30px rgba(239,68,68,0.4); }
@keyframes slideUp { from { bottom: -50px; opacity: 0; } to { bottom: 30px; opacity: 1; } }

/* ── Responsive ── */
@media (max-width: 768px) {
    .step-connector { display: none; }
    .hero { padding: 60px 0 80px; }
    .main-card { padding: 24px; }
    .hero__title { font-size: 2.2rem; }
}
