/* ===== USER MENU (PROFILE) ===== */
.user-menu {
    position: absolute;
    top: 56px;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.10);
    z-index: 120;
    min-width: 250px;
    overflow: hidden;
    animation: fadeIn 0.2s;
    border: 1px solid var(--border);
    transition: all 0.2s;
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
    z-index: 110;
}
.user-menu-header {
    background: linear-gradient(135deg, #FF6B35, #f57c00);
    color: white;
    padding: 15px;
    text-align: center;
}
.user-menu-header #userEmail {
    font-weight: 600;
    font-size: 14px;
}
.user-menu-header #userPlan {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
}
.user-menu-body {
    padding: 15px;
}
.user-menu-body #generationsInfo {
    font-size: 12px;
    color: #666;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 15px;
}
.user-menu .btn-secondary {
    width: 100%;
    margin-bottom: 10px;
}
.user-menu .btn-secondary:last-child {
    margin-bottom: 0;
    background: #fee;
    color: #c33;
}

@media (max-width: 768px) {
        .header-inner {
            gap: 10px;
        }
        .user-menu-trigger {
            margin-left: 0;
        }
    .user-menu {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        min-width: unset;
        width: 100vw;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.13);
        margin: 0;
        border: none;
        animation: slideUp 0.25s;
    }
    .user-menu-header {
        border-radius: 18px 18px 0 0;
    }
}
/* ===== conTgen — Premium UI ===== */

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

:root {
    /* Surface system */
    --bg-page: #f8f5f1;
    --bg-panel: #ffffff;
    --bg-card: #fafafa;
    --bg-card-hover: #f5f0f8;
    --bg-input: #f7f5f3;
    --bg-elevated: #ffffff;

    /* Brand — subtle Instagram DNA */
    --accent: #7c3aed;
    --accent-soft: rgba(124, 58, 237, 0.08);
    --accent-medium: rgba(124, 58, 237, 0.15);
    --accent-hover: #6d28d9;
    --pink: #e11d72;
    --pink-soft: rgba(225, 29, 114, 0.08);
    --orange: #ea580c;
    --green: #16a34a;
    --green-soft: rgba(22, 163, 74, 0.08);
    --blue: #2563eb;

    /* Text hierarchy */
    --text-1: #1a1a2e;
    --text-2: #4a4a5a;
    --text-3: #8b8b9e;

    /* Borders & shadows */
    --border: #e8e5e0;
    --border-hover: #d5d0ca;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 0 3px rgba(124, 58, 237, 0.12);

    /* Radius */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-full: 999px;

    /* Transition */
    --ease: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Space Grotesk', -apple-system, system-ui, sans-serif;
    background: #f8f5f1;
    color: var(--text-1);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow: hidden;
}

body.auth-mode {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ===== HEADER ===== */
.header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 56px;
    background: var(--bg-panel);
}
.header-inner {
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    cursor: default;
    user-select: none;
}
.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(225, 29, 114, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.logo:hover .logo-icon {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 4px 16px rgba(225, 29, 114, 0.4);
}
.logo-wordmark {
    font-family: 'Syne', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-1);
}
.logo-accent {
    background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header-tagline {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tagline-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.header-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: var(--r-full);
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-medium);
}

/* ===== SPLIT LAYOUT ===== */
.split-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 400px 1fr;
    height: calc(100vh - 56px);
    gap: 12px;
    padding: 12px;
}

/* ===== LEFT PANEL ===== */
.panel-input {
    background: rgba(255, 255, 255, 0.95);
    border-right: none;
    overflow-y: auto;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}
.panel-inner {
    padding: 24px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== MOTIVATIONAL BANNER ===== */
.moti-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.04), rgba(225, 29, 114, 0.03));
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: var(--r-md);
}
.moti-banner .moti-emoji {
    font-size: 24px;
    flex-shrink: 0;
}
.moti-banner .moti-text {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.4;
}
.moti-banner .moti-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

/* ===== INPUT BLOCKS ===== */
.input-block {
    /* gap handled by parent flex gap */
}
.input-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.input-label i {
    color: var(--accent);
    font-size: 12px;
    width: 14px;
    text-align: center;
}

/* ===== FORMAT GRID ===== */
.format-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.format-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all var(--ease);
    cursor: pointer;
    color: var(--text-3);
    position: relative;
}
.format-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.format-card.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text-1);
    box-shadow: var(--shadow-glow);
}
.format-card::after { display: none; }

/* ===== NICHE GRID ===== */
.niche-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.niche-tab {
    padding: 7px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-full);
    background: var(--bg-card);
    color: var(--text-2);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ease);
    outline: none;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.niche-tab i {
    font-size: 11px;
    opacity: 0.6;
}
.niche-tab:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}
.niche-tab.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.niche-tab.active i {
    opacity: 1;
}

.format-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform var(--ease);
}
.reel-icon { background: rgba(225, 29, 114, 0.08); color: var(--pink); }
.story-icon { background: var(--accent-soft); color: var(--accent); }
.post-icon { background: rgba(37, 99, 235, 0.08); color: var(--blue); }
.carousel-icon { background: var(--green-soft); color: var(--green); }

.format-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.format-hot {
    position: absolute;
    top: -6px;
    right: -4px;
    font-size: 8px;
    padding: 2px 6px;
    background: linear-gradient(135deg, #F77737, #E1306C);
    color: #ffffff;
    border-radius: var(--r-full);
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* ===== TEXTAREA ===== */
#content-idea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-1);
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: all var(--ease);
    line-height: 1.6;
}
#content-idea:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    background: #ffffff;
}
#content-idea::placeholder {
    color: var(--text-3);
    font-size: 13px;
}
.idea-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.idea-chip {
    padding: 5px 11px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: 11px;
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--ease);
    white-space: nowrap;
}
.idea-chip:hover {
    background: var(--accent-soft);
    border-color: var(--accent-medium);
    color: var(--accent);
}

/* ===== TONE PILLS ===== */
.tone-hint {
    font-weight: 400;
    font-size: 10px;
    color: var(--text-3);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 2px;
}
.tone-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tone-pill {
    padding: 7px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-full);
    background: var(--bg-card);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ease);
    outline: none;
    font-family: 'Inter', sans-serif;
}
.tone-pill:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}
.tone-pill.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* ===== OPTIONS ROW ===== */
.options-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.option-group {
    flex: 1;
    min-width: 100px;
}
.option-group.hidden { display: none; }
.option-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.option-group label i {
    font-size: 11px;
    color: var(--accent);
}
.option-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-1);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: all var(--ease);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238b8b9e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.option-group select:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

/* ===== GENERATE BUTTON ===== */
.btn-generate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--r-md);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: all var(--ease);
    position: relative;
    overflow: hidden;
}
.btn-generate::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}
.btn-generate:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    transform: translateY(-1px);
}
.btn-generate:hover::before {
    transform: translateX(100%);
}
.btn-generate:active {
    transform: translateY(0);
}
.btn-generate:disabled {
    opacity: 0.5;
    pointer-events: none;
}
.btn-generate.loading { pointer-events: none; }

.generate-hint {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 8px;
    text-align: center;
}

/* ===== RIGHT PANEL (Output) ===== */
.panel-output {
    overflow-y: auto;
    padding: 28px 32px 40px;
    background: rgba(255, 255, 255, 0.95);
    position: relative;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
}
.empty-icon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
}
.empty-icon-item {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-3);
    transition: all 0.3s;
}
.empty-icon-item:nth-child(1) { color: var(--accent); }
.empty-icon-item:nth-child(2) { color: var(--pink); }
.empty-icon-item:nth-child(3) { color: var(--green); }
.empty-icon-item:nth-child(4) { color: var(--orange); }

.empty-state h3 {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 14px;
    color: var(--text-3);
    max-width: 340px;
    line-height: 1.6;
}
.empty-state .empty-features {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
}
.empty-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
}
.empty-feature i {
    font-size: 11px;
    color: var(--accent);
}

/* Legacy support */
.empty-insta-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--r-lg);
    background: var(--accent-soft);
    border: 2px solid var(--accent-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}
.empty-insta-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

/* ===== LOADING STATE ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70%;
    text-align: center;
    padding: 40px;
}
.loading-state h3 {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 6px;
}
.loading-state p {
    font-size: 13px;
    color: var(--text-3);
}

/* Loading bar */
.loading-bar-track {
    width: 240px;
    height: 4px;
    background: var(--border);
    border-radius: var(--r-full);
    margin-top: 20px;
    overflow: hidden;
}
.loading-bar-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--accent), var(--pink));
    border-radius: var(--r-full);
    animation: loadBar 2.5s ease-in-out infinite;
}
@keyframes loadBar {
    0% { width: 5%; transform: translateX(0); }
    50% { width: 60%; }
    100% { width: 5%; transform: translateX(900%); }
}

.loading-steps {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.loading-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-3);
    transition: color 0.3s;
}
.loading-step.active { color: var(--accent); }
.loading-step.done { color: var(--green); }
.loading-step i { width: 16px; text-align: center; }

/* Legacy loading dots */
.loading-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 60px 0 20px;
}
.loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out;
}
.loading-dots span:nth-child(1) { background: var(--pink); }
.loading-dots span:nth-child(2) { background: var(--accent); animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { background: var(--blue); animation-delay: 0.3s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* ===== SUCCESS BANNER ===== */
.success-banner {
    background: var(--green-soft);
    border: 1px solid rgba(22, 163, 74, 0.15);
    border-radius: var(--r-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.4s ease;
}
@keyframes slideDown {
    0% { transform: translateY(-12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
.success-banner .success-emoji {
    font-size: 22px;
}
.success-banner .success-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
}
.success-banner .success-sub {
    font-size: 12px;
    color: var(--text-3);
}

/* ===== OUTPUT SECTION ===== */
.output-section {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    animation: fadeUp 0.4s ease both;
}
.output-section:nth-child(2) { animation-delay: 0.03s; }
.output-section:nth-child(3) { animation-delay: 0.06s; }
.output-section:nth-child(4) { animation-delay: 0.09s; }
.output-section:nth-child(5) { animation-delay: 0.12s; }
.output-section:nth-child(6) { animation-delay: 0.15s; }
.output-section:nth-child(7) { animation-delay: 0.18s; }
.output-section:nth-child(8) { animation-delay: 0.21s; }

@keyframes fadeUp {
    0% { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.output-section:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}
.output-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-1);
    background: var(--bg-card);
}
.output-section-header i {
    color: var(--accent);
    font-size: 13px;
    /* Reset any gradient text from old CSS */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--accent);
    background-clip: unset;
}
.output-section-header .section-emoji {
    font-size: 16px;
    margin-left: auto;
}
.output-section-content {
    padding: 16px 18px;
}

/* ===== OUTPUT ITEM ===== */
.output-item {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.output-item:last-child { margin-bottom: 0; }
.output-item:hover {
    border-color: var(--border-hover);
}

.output-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.output-item-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    /* Reset gradient text */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--accent);
    background-clip: unset;
}
.output-item-actions {
    display: flex;
    gap: 6px;
}
.output-action-btn {
    background: var(--accent-soft);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--ease);
    font-weight: 600;
    cursor: pointer;
}
.output-action-btn:hover {
    background: var(--accent-medium);
    border-color: var(--accent-medium);
}
.output-action-btn.copied {
    background: #dcfce7;
    color: #16a34a;
}
.output-item-text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== TIP ITEMS ===== */
.tip-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.tip-item:last-child { border-bottom: none; }
.tip-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    color: var(--accent);
}
.tip-text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
}

/* ===== HASHTAG CLOUD ===== */
.hashtag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.hashtag-tag {
    display: inline-block;
    padding: 5px 13px;
    background: var(--green-soft);
    border: 1px solid rgba(22, 163, 74, 0.12);
    border-radius: var(--r-full);
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
    cursor: default;
    transition: all 0.2s;
}
.hashtag-tag:hover {
    background: rgba(22, 163, 74, 0.12);
}

/* ===== HOOK EXPLANATION ===== */
.hook-why {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
}
.hook-why i {
    color: var(--accent);
    margin-right: 5px;
}

/* ===== HOOK PATTERN TAG ===== */
.hook-pattern-tag {
    display: inline-block;
    padding: 2px 7px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-medium);
    border-radius: var(--r-full);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* ===== SCRIPT TEXT ===== */
.script-text {
    font-size: 14px;
    line-height: 2;
}

/* ===== KEYWORD LIST ===== */
.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(234, 88, 12, 0.06);
    border: 1px solid rgba(234, 88, 12, 0.12);
    border-radius: var(--r-full);
    font-size: 12px;
    color: var(--orange);
    font-weight: 600;
    cursor: default;
    transition: all 0.2s;
}
.keyword-tag:hover {
    background: rgba(234, 88, 12, 0.1);
}
.keyword-tag i {
    font-size: 10px;
    opacity: 0.6;
}

/* ===== STORY SLIDES ===== */
.story-slide {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.story-slide:last-child { margin-bottom: 0; }
.story-slide:hover { border-color: var(--border-hover); }
.story-slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.story-slide-num {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}
.story-slide-type {
    font-size: 10px;
    padding: 2px 10px;
    background: var(--accent-soft);
    border-radius: var(--r-full);
    color: var(--accent);
    font-weight: 700;
}
.story-slide-content {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 6px;
}
.story-slide-overlay {
    font-size: 13px;
    color: var(--orange);
    font-style: italic;
    margin-bottom: 4px;
}
.story-slide-note {
    font-size: 12px;
    color: var(--text-3);
}

/* ===== INTERACTIVE ELEMENTS ===== */
.interactive-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.interactive-card:last-child { margin-bottom: 0; }
.interactive-type {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    color: var(--pink);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.interactive-content {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 8px;
}
.interactive-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.interactive-option {
    padding: 6px 14px;
    background: var(--pink-soft);
    border: 1px solid rgba(225, 29, 114, 0.12);
    border-radius: var(--r-full);
    font-size: 12px;
    color: var(--pink);
    font-weight: 500;
}

/* ===== CAROUSEL SLIDES ===== */
.carousel-slide {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.carousel-slide:last-child { margin-bottom: 0; }
.carousel-slide:hover { border-color: var(--border-hover); }
.carousel-slide-num {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 6px;
}
.carousel-slide-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-1);
}
.carousel-slide-body {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 6px;
}
.carousel-slide-note {
    font-size: 12px;
    color: var(--text-3);
    font-style: italic;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 12px 24px;
    border-radius: var(--r-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(12px);
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.success {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(22, 163, 74, 0.2);
    box-shadow: var(--shadow-md);
}
.toast.error {
    background: var(--pink-soft);
    color: var(--pink);
    border: 1px solid rgba(225, 29, 114, 0.2);
    box-shadow: var(--shadow-md);
}

/* ===== ERROR STATE ===== */
.error-state {
    text-align: center;
    padding: 50px 40px;
}
.error-state i {
    font-size: 32px;
    color: var(--pink);
    margin-bottom: 14px;
}
.error-state p {
    color: var(--pink);
    font-size: 14px;
}
.error-state .retry-hint {
    color: var(--text-3);
    font-size: 13px;
    margin-top: 10px;
}

/* ===== SCROLLBAR ===== */
.panel-input::-webkit-scrollbar,
.panel-output::-webkit-scrollbar {
    width: 5px;
}
.panel-input::-webkit-scrollbar-track,
.panel-output::-webkit-scrollbar-track {
    background: transparent;
}
.panel-input::-webkit-scrollbar-thumb,
.panel-output::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
}
.panel-input::-webkit-scrollbar-thumb:hover,
.panel-output::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    body { overflow: auto; }
    #mainApp {
        height: auto;
        overflow: visible;
        padding: 0;
    }
    .split-layout {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        height: auto;
        max-height: none;
    }
    .panel-input {
        border-right: none;
        border-bottom: none;
        max-height: none;
        overflow-y: visible;
        padding: 20px;
        flex-shrink: 0;
        border-radius: 12px;
    }
    .panel-output {
        border-top: none;
        max-height: none;
        min-height: auto;
        overflow-y: visible;
        padding: 20px;
        flex-shrink: 0;
        border-radius: 12px;
    }
    .header-badge { display: none; }
    .header-tagline { display: none; }
    .format-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 480px) {
    .header {
        padding: 0 16px;
        height: 50px;
    }
    .header-inner {
        justify-content: center;
    }
    .logo {
        font-size: 18px;
        gap: 8px;
    }
    .logo-icon {
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }
    .logo-icon i { font-size: 14px; }
    .format-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .format-card {
        padding: 12px 6px 10px;
    }
    .format-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    .format-label { font-size: 10px; }
    .panel-inner {
        padding: 18px 14px 30px;
        gap: 16px;
    }
    .panel-output {
        padding: 18px 14px 30px;
    }
    .empty-state {
        padding: 24px 16px;
    }
    .empty-state .empty-features {
        flex-direction: column;
        align-items: center;
    }
    .moti-banner {
        padding: 12px 12px;
    }
    .tone-pill {
        padding: 6px 11px;
        font-size: 11px;
    }
    .btn-generate {
        padding: 13px 20px;
        font-size: 13px;
    }
    .output-section-header {
        padding: 12px 14px;
        font-size: 12px;
    }
    .output-section-content {
        padding: 12px 14px;
    }
    .output-item {
        padding: 12px 14px;
    }
    .output-item-text {
        font-size: 13px;
    }
    .script-text {
        font-size: 13px;
        line-height: 1.9;
    }
    .tip-item {
        padding: 8px 0;
    }
    .hook-pattern-tag {
        font-size: 7px;
    }
    .keyword-tag {
        font-size: 11px;
        padding: 5px 11px;
    }
    .hashtag-tag {
        font-size: 11px;
    }
    .success-banner {
        padding: 12px 14px;
    }
    textarea {
        font-size: 14px;
    }
    .input-label {
        font-size: 11px;
    }
    .idea-chip {
        font-size: 10px;
        padding: 4px 9px;
    }
    .empty-icon-item {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}
