/* ============================================
   BRANDO ARABIC FONT FAMILY
   ============================================ */
@font-face {
    font-family: 'Brando Arabic';
    src: url('/static/fonts/alfont_com_Brando-Arabic-Hairline_1770286283643.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Brando Arabic';
    src: url('/static/fonts/alfont_com_Brando-Arabic-ExtraLight_1770286283646.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Brando Arabic';
    src: url('/static/fonts/alfont_com_Brando-Arabic-Light_1770286283644.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Brando Arabic';
    src: url('/static/fonts/alfont_com_Brando-Arabic-Regular_1770286283646.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Brando Arabic';
    src: url('/static/fonts/alfont_com_Brando-Arabic-Text_1770286283646.ttf') format('truetype');
    font-weight: 450;
    font-style: normal;
}

@font-face {
    font-family: 'Brando Arabic';
    src: url('/static/fonts/alfont_com_Brando-Arabic-SemiBold_1770286283645.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Brando Arabic';
    src: url('/static/fonts/alfont_com_Brando-Arabic-Bold_1770286283642.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Brando Arabic';
    src: url('/static/fonts/alfont_com_Brando-Arabic-Black_1770286283643.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* ============================================
   CSS DESIGN TOKENS — Platform Shell
   Dark (default) + Light overrides
   ============================================ */
:root {
    /* Backgrounds */
    --bg-base:      #0a1628;
    --bg-base-grad: linear-gradient(135deg, #0a1628 0%, #0d1a2d 50%, #0f1f3a 100%);
    --bg-surface:   rgba(17, 25, 45, 0.85);
    --bg-card:      rgba(17, 25, 45, 0.6);
    --bg-ghost:     rgba(255, 255, 255, 0.04);
    --bg-ghost-hov: rgba(255, 255, 255, 0.08);
    /* Borders */
    --border-subtle:  rgba(255, 255, 255, 0.09);
    --border-divider: rgba(255, 255, 255, 0.06);
    --border-soft:    rgba(255, 255, 255, 0.12);
    /* Text */
    --text-primary:   #f1f5f9;
    --text-body:      #e2e8f0;
    --text-secondary: rgba(148, 163, 184, 0.75);
    --text-muted:     rgba(100, 116, 139, 0.65);
    /* Header */
    --header-bg:     linear-gradient(180deg, rgba(10, 22, 40, 0.98) 0%, rgba(13, 26, 45, 0.95) 100%);
    --header-border: rgba(255, 255, 255, 0.06);
    /* Hero */
    --hero-gradient: linear-gradient(135deg, #f1f5f9 40%, #93c5fd 100%);
    --hero-sub:      rgba(148, 163, 184, 0.7);
    /* Chips */
    --chip-bg:         rgba(59, 130, 246, 0.08);
    --chip-border:     rgba(59, 130, 246, 0.18);
    --chip-text:       rgba(148, 163, 184, 0.85);
    --chip-hov-bg:     rgba(59, 130, 246, 0.14);
    --chip-hov-border: rgba(59, 130, 246, 0.35);
    --chip-hov-text:   #93c5fd;
    /* Ghost buttons */
    --ghost-bg:     rgba(255, 255, 255, 0.04);
    --ghost-border: rgba(255, 255, 255, 0.1);
    --ghost-color:  rgba(148, 163, 184, 0.7);
}

.light-mode {
    /* Backgrounds */
    --bg-base:      #f1f5f9;
    --bg-base-grad: #f1f5f9;
    --bg-surface:   rgba(255, 255, 255, 0.96);
    --bg-card:      rgba(255, 255, 255, 0.9);
    --bg-ghost:     rgba(0, 0, 0, 0.03);
    --bg-ghost-hov: rgba(0, 0, 0, 0.06);
    /* Borders */
    --border-subtle:  rgba(0, 0, 0, 0.10);
    --border-divider: rgba(0, 0, 0, 0.07);
    --border-soft:    rgba(0, 0, 0, 0.12);
    /* Text */
    --text-primary:   #0f172a;
    --text-body:      #334155;
    --text-secondary: rgba(71, 85, 105, 0.75);
    --text-muted:     rgba(100, 116, 139, 0.65);
    /* Header */
    --header-bg:     linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    --header-border: rgba(0, 0, 0, 0.08);
    /* Hero */
    --hero-gradient: linear-gradient(135deg, #0f172a 35%, #1d4ed8 100%);
    --hero-sub:      rgba(71, 85, 105, 0.75);
    /* Chips */
    --chip-bg:         rgba(59, 130, 246, 0.06);
    --chip-border:     rgba(59, 130, 246, 0.20);
    --chip-text:       #334155;
    --chip-hov-bg:     rgba(59, 130, 246, 0.12);
    --chip-hov-border: rgba(59, 130, 246, 0.35);
    --chip-hov-text:   #1e40af;
    /* Ghost buttons */
    --ghost-bg:     rgba(0, 0, 0, 0.03);
    --ghost-border: rgba(0, 0, 0, 0.10);
    --ghost-color:  rgba(71, 85, 105, 0.7);
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Brando Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base-grad);
    color: var(--text-body);
    min-height: 100vh;
    line-height: 2;
    overflow-x: hidden;
}

.app-container {
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   ENHANCED HEADER
   ============================================ */
.header {
    position: relative;
    text-align: center;
    padding: 4rem 2rem 5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1628 0%, #0d1a2d 30%, #111d35 60%, #0f1f3a 100%);
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(34, 197, 94, 0.06) 0%, transparent 50%);
    animation: meshRotate 30s linear infinite;
    z-index: 0;
}

@keyframes meshRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    bottom: -150px;
    left: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #22c55e, #06b6d4);
    top: 50%;
    left: 10%;
    animation-delay: -10s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    bottom: 20%;
    right: 15%;
    animation-delay: -15s;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: pulse-glow 4s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(59, 130, 246, 0.15);
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(34, 197, 94, 0.1);
    bottom: -200px;
    right: -100px;
    animation-delay: -2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(20px) rotate(-5deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

.header-content {
    position: relative;
    z-index: 10;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo {
    font-size: 3.5rem;
    font-weight: 900;
    color: #f8fafc;
    font-family: 'Brando Arabic', sans-serif;
    letter-spacing: 0.15em;
    text-shadow: 0 4px 30px rgba(59, 130, 246, 0.3);
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { text-shadow: 0 4px 30px rgba(59, 130, 246, 0.3); }
    50% { text-shadow: 0 4px 40px rgba(59, 130, 246, 0.5), 0 0 60px rgba(59, 130, 246, 0.2); }
}

.logo span {
    color: #22c55e;
    text-shadow: 0 4px 30px rgba(34, 197, 94, 0.4);
}

.logo-badge {
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
    position: relative;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(59, 130, 246, 0.5), 0 0 40px rgba(34, 197, 94, 0.3); }
}

.tagline {
    color: #e2e8f0;
    font-size: 1.5rem;
    font-family: 'Brando Arabic', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tagline-sub {
    color: #94a3b8;
    font-size: 1rem;
    font-family: 'Brando Arabic', sans-serif;
    font-weight: 400;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    padding: 0 2rem 3rem;
    position: relative;
    z-index: 5;
}

/* ============================================
   PATH SELECTOR
   ============================================ */
.path-selector {
    max-width: 860px;
    margin: -2rem auto 2rem;
    text-align: center;
    animation: pathSelectorIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.path-selector-exit {
    animation: pathSelectorOut 0.28s ease forwards;
}

@keyframes pathSelectorOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-12px); }
}

.path-selector-title {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.path-selector-subtitle {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.path-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

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

.path-card {
    position: relative;
    background: rgba(15, 31, 58, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem 1.5rem 1.5rem;
    text-align: right;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.path-card-jack {
    border: 1.5px solid rgba(245, 158, 11, 0.2);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.04);
}

.path-card-trendx {
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.04);
}

.path-card-jack:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 28px 50px -12px rgba(0, 0, 0, 0.5), 0 0 60px rgba(245, 158, 11, 0.1);
}

.path-card-trendx:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 28px 50px -12px rgba(0, 0, 0, 0.5), 0 0 60px rgba(59, 130, 246, 0.1);
}

.path-card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.12;
    top: -60px;
    left: -60px;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.path-card:hover .path-card-glow { opacity: 0.22; }

.path-glow-jack  { background: radial-gradient(circle, #f59e0b, #d97706); }
.path-glow-trendx { background: radial-gradient(circle, #3b82f6, #22c55e); }

.path-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

.path-icon-jack {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(217,119,6,0.15));
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.25);
}

.path-icon-trendx {
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(34,197,94,0.15));
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,0.25);
}

.path-card-content {
    flex: 1;
    text-align: right;
}

.path-card-name {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.path-card-name span {
    color: #3b82f6;
}

.path-card-jack .path-card-name { color: #fde68a; }
.path-card-jack .path-card-name span { color: #f59e0b; }

.path-card-desc {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.path-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.path-feature {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.72rem;
    color: #64748b;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 2rem;
    padding: 0.2rem 0.55rem;
}

.path-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 0.875rem;
    border: none;
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    direction: rtl;
    margin-top: 0.25rem;
}

.path-btn-jack {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0a1628;
    box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}

.path-btn-jack:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 6px 20px rgba(245,158,11,0.45);
    transform: translateY(-1px);
}

.path-btn-trendx {
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.path-btn-trendx:hover {
    background: linear-gradient(135deg, #2563eb, #16a34a);
    box-shadow: 0 6px 20px rgba(59,130,246,0.45);
    transform: translateY(-1px);
}

/* Path badge in input-card header */
.selected-path-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.2rem;
    flex-wrap: wrap;
}

.selected-path-badge {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 2rem;
}

.badge-jack {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-trendx {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.change-path-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #475569;
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.4rem;
    transition: color 0.2s ease, background 0.2s ease;
    direction: rtl;
}

.change-path-btn:hover {
    color: #94a3b8;
    background: rgba(255,255,255,0.05);
}

/* Input card enter animation */
.input-card-enter {
    animation: inputCardEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* ============================================
   INPUT CARD - GLASSMORPHISM STYLE
   ============================================ */
.input-card {
    width: 100%;
    max-width: 860px;
    margin: -2rem auto 2rem;
    background: rgba(15, 31, 58, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 1.5rem;
    padding: 2rem;
    box-sizing: border-box;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.input-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 25px 60px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 80px rgba(59, 130, 246, 0.1);
}

.input-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.input-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 197, 94, 0.2));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.input-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    font-family: 'Brando Arabic', sans-serif;
}

.input-section {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.input-group {
    width: 100%;
    min-width: 0;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.9rem;
    font-family: 'Brando Arabic', sans-serif;
}

.label-icon {
    color: #3b82f6;
}

.chat-input-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1.5px solid rgba(59, 130, 246, 0.25);
    border-radius: 1.25rem;
    background: rgba(10, 22, 40, 0.5);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.chat-input-container > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.chat-input-container:focus-within {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(10, 22, 40, 0.7);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 0 30px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(0, 0, 0, 0.15);
}

.chat-textarea {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    min-height: 56px;
    max-height: 240px;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    line-height: 1.6;
    border: none;
    border-radius: 1.25rem 1.25rem 0 0;
    background: transparent;
    color: #f1f5f9;
    font-family: 'Brando Arabic', sans-serif;
    resize: none;
    overflow-y: hidden;
    outline: none;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.3) transparent;
}

.chat-textarea::-webkit-scrollbar {
    width: 5px;
}

.chat-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.chat-textarea::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 10px;
}

.chat-textarea::placeholder {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

.chat-input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.75rem 0.5rem;
    direction: ltr;
}

.chat-char-count {
    font-size: 0.7rem;
    color: #475569;
    min-width: 2rem;
    padding-left: 0.5rem;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.chat-input-container:focus-within .chat-char-count {
    color: #64748b;
}

.chat-input-hint {
    font-size: 0.7rem;
    color: #475569;
    transition: opacity 0.2s ease;
    opacity: 0;
}

.chat-input-container:focus-within .chat-input-hint {
    opacity: 1;
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 0.875rem;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.chat-send-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.chat-send-btn:hover::after {
    opacity: 1;
}

.chat-send-btn:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.chat-send-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.2);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chat-send-btn .btn-text,
.chat-send-btn .btn-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn .spinner-ring {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.chat-input-glow {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, #8b5cf6, #22c55e, transparent);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    pointer-events: none;
}

.chat-input-container:focus-within .chat-input-glow {
    width: 80%;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}


.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.spinner-ring {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.input-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #94a3b8;
    font-family: 'Brando Arabic', sans-serif;
}

.feature-tag svg {
    color: #3b82f6;
}

.topic-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.9rem;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    border-radius: 9999px;
    font-size: 0.8rem;
    color: var(--chip-text);
    cursor: pointer;
    transition: all 0.25s ease, opacity 0.4s ease;
    font-family: 'Brando Arabic', sans-serif;
    animation: chipEntrance 0.35s ease both;
}

@keyframes chipEntrance {
    from { opacity: 0; transform: translateY(6px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.topic-chips-section .topic-chip:nth-child(1) { animation-delay: 0.05s; }
.topic-chips-section .topic-chip:nth-child(2) { animation-delay: 0.10s; }
.topic-chips-section .topic-chip:nth-child(3) { animation-delay: 0.15s; }
.topic-chips-section .topic-chip:nth-child(4) { animation-delay: 0.20s; }
.topic-chips-section .topic-chip:nth-child(5) { animation-delay: 0.25s; }

.topic-chip:hover {
    background: var(--chip-hov-bg);
    border-color: var(--chip-hov-border);
    color: var(--chip-hov-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.topic-chip svg {
    width: 12px;
    height: 12px;
    color: #3b82f6;
    flex-shrink: 0;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */
.progress-container {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.progress-card {
    background: rgba(15, 31, 58, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
}

.progress-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-icon {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.progress-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    font-family: 'Brando Arabic', sans-serif;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
    font-family: 'Brando Arabic', sans-serif;
    transition: all 0.3s ease;
}

.step-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.15);
    border: 2px solid rgba(100, 116, 139, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-step.completed .step-indicator::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    margin-top: -2px;
}

.progress-step.active .step-indicator {
    background: rgba(59, 130, 246, 0.15);
    border-color: transparent;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
    overflow: visible;
}

/* Spinning ring on active step */
.progress-step.active .step-indicator::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    border-top-color: #3b82f6;
    border-right-color: rgba(59, 130, 246, 0.4);
    animation: stepSpin 0.8s linear infinite;
}

.progress-step.active .step-indicator::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    animation: dotBlink 1.2s ease-in-out infinite;
}

@keyframes stepSpin {
    to { transform: rotate(360deg); }
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.progress-step.active {
    color: #3b82f6;
}

.progress-step.completed .step-indicator {
    background: #22c55e;
    border-color: #22c55e;
}

.progress-step.completed {
    color: #22c55e;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.progress-bar-container {
    height: 6px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #6366f1, #22c55e);
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-message {
    color: #94a3b8;
    font-size: 0.9rem;
    font-family: 'Brando Arabic', sans-serif;
}

/* ============================================
   ERROR MESSAGE
   ============================================ */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-family: 'Brando Arabic', sans-serif;
    max-width: 700px;
    margin: 0 auto 2rem;
    backdrop-filter: blur(10px);
}

.error-message svg {
    flex-shrink: 0;
    color: #ef4444;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.3) 0%, rgba(10, 22, 40, 0.8) 100%);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 900;
    color: #f8fafc;
    letter-spacing: 0.1em;
}

.footer-logo span {
    color: #22c55e;
}

.footer-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.footer-tagline {
    color: #64748b;
    font-size: 0.9rem;
}

.footer-features {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    color: #475569;
    font-size: 0.8rem;
}

.footer-features .dot {
    width: 4px;
    height: 4px;
    background: #475569;
    border-radius: 50%;
}

.report-container {
    margin-top: 1rem;
    animation: fadeInUp 0.5s ease;
}

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

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .header {
        padding: 3rem 1.5rem 4rem;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.25rem;
    }
    
    .input-card {
        margin: -1.5rem 1rem 1.5rem;
        padding: 1.5rem;
    }
    
    .progress-steps {
        gap: 1rem;
    }
    
    .progress-step span {
        font-size: 0.75rem;
    }
    
    .topic-suggestions {
        gap: 0.4rem;
    }
    
    .topic-chip {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }
    
    .report-actions {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .export-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   INFOGRAPHIC SECTIONS - VERTICAL LAYOUT
   ============================================ */
.infographic-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ============================================
   SECTION 1: HERO HEADER
   ============================================ */
.hero-section {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.2) 0%, rgba(10, 22, 40, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 5rem 3rem;
    max-width: 900px;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.2em;
    margin-bottom: 2.5rem;
    font-family: 'Brando Arabic', sans-serif;
}

.brand-logo span {
    color: #22c55e;
}

.hero-title {
    font-size: 6.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    font-family: 'Brando Arabic', sans-serif;
    text-shadow: 0 8px 50px rgba(0, 0, 0, 0.9), 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 3rem;
    direction: rtl;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.hero-subtitle {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.98);
    line-height: 1.9;
    font-family: 'Brando Arabic', sans-serif;
    font-weight: 500;
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

/* ============================================
   SECTION 2: HERO STATISTIC
   ============================================ */
.stat-hero-section {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-hero-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.stat-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.3) 0%, rgba(10, 22, 40, 0.65) 100%);
    z-index: 2;
}

.stat-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 5rem 3rem;
}

.stat-hero-label {
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'Brando Arabic', sans-serif;
    font-weight: 500;
    margin-bottom: 2.5rem;
    direction: rtl;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.02em;
}

.stat-hero-number {
    font-size: 10rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1;
    margin-bottom: 2.5rem;
    text-shadow: 0 10px 60px rgba(0, 0, 0, 0.7);
    background: linear-gradient(180deg, #ffffff 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 6px 30px rgba(34, 197, 94, 0.4));
}

.stat-hero-context {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'Brando Arabic', sans-serif;
    font-weight: 500;
    direction: rtl;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    line-height: 1.8;
}

/* ============================================
   SECTION 3: STATISTICS CARDS - VERTICAL
   ============================================ */
.stats-section {
    padding: 5rem 3rem;
    position: relative;
    overflow: hidden;
}

.stats-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.stats-section .stats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.3) 0%, rgba(10, 22, 40, 0.6) 100%);
    z-index: 2;
}

.stats-section .section-heading,
.stats-section .stats-cards-grid {
    position: relative;
    z-index: 3;
}

/* ============================================
   COLOR PALETTES
   ============================================ */

/* Classic Blue */
.color-blue {
    background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%);
}

.color-blue-dark {
    background: linear-gradient(180deg, #1e3a5f 0%, #0f1f3a 100%);
}

/* Emerald Green */
.color-green {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
}

.color-green-dark {
    background: linear-gradient(180deg, #065f46 0%, #064e3b 100%);
}

.color-green-light {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

/* Light Background */
.color-light {
    background: #f0f9ff;
}

.color-light-warm {
    background: linear-gradient(180deg, #fefce8 0%, #fef9c3 100%);
}

/* Royal Gold */
.color-gold {
    background: linear-gradient(180deg, #b45309 0%, #92400e 100%);
}

.color-gold-light {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.color-gold-dark {
    background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
}

/* Deep Purple */
.color-purple {
    background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
}

.color-purple-dark {
    background: linear-gradient(180deg, #5b21b6 0%, #4c1d95 100%);
}

.color-purple-light {
    background: linear-gradient(180deg, #a78bfa 0%, #8b5cf6 100%);
}

/* Coral Red */
.color-coral {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.color-coral-dark {
    background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%);
}

.color-coral-light {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
}

/* Ocean Teal */
.color-teal {
    background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%);
}

.color-teal-dark {
    background: linear-gradient(180deg, #115e59 0%, #134e4a 100%);
}

.color-teal-light {
    background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
}

/* Slate Gray */
.color-slate {
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
}

.color-slate-dark {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

/* Rose Pink */
.color-rose {
    background: linear-gradient(180deg, #e11d48 0%, #be123c 100%);
}

.color-rose-light {
    background: linear-gradient(180deg, #fb7185 0%, #f43f5e 100%);
}

/* Indigo */
.color-indigo {
    background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%);
}

.color-indigo-dark {
    background: linear-gradient(180deg, #3730a3 0%, #312e81 100%);
}

/* ============================================
   OVERLAY VARIATIONS (Low opacity - show images!)
   ============================================ */
.overlay-gold {
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.25) 0%, rgba(146, 64, 14, 0.5) 100%);
}

.overlay-purple {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.25) 0%, rgba(109, 40, 217, 0.5) 100%);
}

.overlay-coral {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.5) 100%);
}

.overlay-teal {
    background: linear-gradient(180deg, rgba(13, 148, 136, 0.25) 0%, rgba(15, 118, 110, 0.5) 100%);
}

.overlay-green {
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.25) 0%, rgba(21, 128, 61, 0.5) 100%);
}

.overlay-indigo {
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.25) 0%, rgba(67, 56, 202, 0.5) 100%);
}

.overlay-rose {
    background: linear-gradient(180deg, rgba(225, 29, 72, 0.25) 0%, rgba(190, 18, 60, 0.5) 100%);
}

.overlay-dark {
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.2) 0%, rgba(10, 22, 40, 0.55) 100%);
}

.overlay-subtle {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 100%);
}

/* ============================================
   CARD STYLE VARIATIONS
   ============================================ */

/* Card styles removed - using transparent text-on-image design */

/* ============================================
   PATTERN BACKGROUNDS
   ============================================ */
.pattern-dots {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.pattern-grid {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.pattern-diagonal {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
}

.pattern-waves {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,213.3C1248,235,1344,213,1392,202.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ============================================
   TEXT COLOR VARIATIONS
   ============================================ */
.text-gold {
    color: #f59e0b;
}

.text-purple {
    color: #a78bfa;
}

.text-coral {
    color: #f87171;
}

.text-teal {
    color: #5eead4;
}

.text-rose {
    color: #fb7185;
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-blue {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
}

.glow-green {
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.4);
}

.glow-gold {
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.4);
}

.glow-purple {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

.glow-coral {
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.4);
}

.glow-teal {
    box-shadow: 0 0 40px rgba(20, 184, 166, 0.4);
}

.section-heading {
    font-size: 4.5rem;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin-bottom: 4rem;
    font-family: 'Brando Arabic', sans-serif;
    direction: rtl;
    text-shadow: 0 6px 40px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.section-heading-light {
    font-size: 4.5rem;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin-bottom: 4rem;
    font-family: 'Brando Arabic', sans-serif;
    direction: rtl;
    text-shadow: 0 8px 50px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.section-heading-dark {
    font-size: 4.5rem;
    font-weight: 900;
    color: #1e3a8a;
    text-align: center;
    margin-bottom: 4rem;
    font-family: 'Brando Arabic', sans-serif;
    direction: rtl;
    line-height: 1.3;
}

/* Golden heading style like TrendX reference */
.section-heading-gold {
    font-size: 5rem;
    font-weight: 900;
    color: #f59e0b;
    text-align: center;
    margin-bottom: 3.5rem;
    font-family: 'Brando Arabic', sans-serif;
    direction: rtl;
    text-shadow: 0 6px 35px rgba(245, 158, 11, 0.5);
    background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 20px rgba(245, 158, 11, 0.4));
    line-height: 1.3;
}

/* VERTICAL STACKED LAYOUT */
.stats-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    direction: rtl;
}

/* NO BOX STYLE - Text floats directly on background */
.stat-card-infographic {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.stat-card-infographic:hover {
    transform: translateX(-5px);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.stat-card-infographic:last-child {
    border-bottom: none;
}

.stat-card-value {
    font-size: 5rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    text-shadow: 0 6px 35px rgba(0, 0, 0, 0.6);
    min-width: 200px;
    letter-spacing: -0.02em;
}

.stat-card-label {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.9;
    direction: rtl;
    font-weight: 500;
    flex: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Golden stat value like TrendX */
.stat-card-value-gold {
    color: #f59e0b;
    text-shadow: 0 6px 30px rgba(245, 158, 11, 0.5);
    background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 15px rgba(245, 158, 11, 0.4));
}

/* Green stat value */
.stat-card-value-green {
    color: #22c55e;
    text-shadow: 0 6px 30px rgba(34, 197, 94, 0.5);
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 15px rgba(34, 197, 94, 0.4));
}

/* ============================================
   SECTION 4: DISTRIBUTION / PROGRESS BARS - VERTICAL
   ============================================ */
.distribution-section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
}

.distribution-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.distribution-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.25) 0%, rgba(10, 22, 40, 0.55) 100%);
    z-index: 2;
}

.distribution-content {
    position: relative;
    z-index: 3;
    padding: 4rem 3rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.progress-bars-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.progress-bar-item {
    direction: rtl;
    background: transparent;
    padding: 1.5rem 0;
    border-radius: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.progress-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    align-items: center;
}

.progress-bar-label {
    font-size: 1.5rem;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    font-weight: 600;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.progress-bar-value {
    font-size: 2rem;
    font-weight: 900;
    color: #22c55e;
    font-family: 'Brando Arabic', sans-serif;
    text-shadow: 0 2px 15px rgba(34, 197, 94, 0.4);
}

.progress-bar-track {
    height: 18px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 9px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 1s ease;
}

/* ============================================
   SECTION 5: PIE CHART - VERTICAL LAYOUT
   ============================================ */
.breakdown-section {
    padding: 5rem 3rem;
    position: relative;
    overflow: hidden;
}

.breakdown-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.breakdown-section .breakdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.45) 0%, rgba(224, 242, 254, 0.55) 100%);
    z-index: 2;
}

.breakdown-section .section-heading-dark,
.breakdown-section .breakdown-container {
    position: relative;
    z-index: 3;
}

/* VERTICAL STACKED LAYOUT */
.breakdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 700px;
    margin: 0 auto;
}

.pie-chart-container {
    position: relative;
}

.pie-chart {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 20px 60px rgba(30, 58, 138, 0.2);
    transition: transform 0.4s ease;
}

.pie-chart:hover {
    transform: scale(1.05);
}

.pie-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    border-radius: 50%;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    direction: rtl;
    width: 100%;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
    padding: 1rem 0;
    border-radius: 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(30, 58, 138, 0.15);
}

.pie-legend-item:hover {
    background: transparent;
    transform: translateX(-5px);
}

.pie-legend-item:last-child {
    border-bottom: none;
}

.pie-legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    flex-shrink: 0;
}

.pie-legend-label {
    font-size: 1.4rem;
    color: #1e3a8a;
    font-family: 'Brando Arabic', sans-serif;
    flex: 1;
    font-weight: 600;
}

.pie-legend-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #1e3a8a;
    font-family: 'Brando Arabic', sans-serif;
}

/* ============================================
   SECTION 6: IMPACT NUMBER
   ============================================ */
.impact-section {
    padding: 6rem 3rem;
    position: relative;
    overflow: hidden;
}

.impact-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.impact-section .impact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.3) 0%, rgba(21, 128, 61, 0.55) 100%);
    z-index: 2;
}

.impact-section .impact-content {
    position: relative;
    z-index: 3;
}

.impact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.impact-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    font-family: 'Brando Arabic', sans-serif;
    direction: rtl;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

.impact-number {
    font-size: 9rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.1;
    margin-bottom: 2.5rem;
    text-shadow: 0 10px 50px rgba(0, 0, 0, 0.4);
    background: linear-gradient(180deg, #ffffff 0%, #bbf7d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 6px 25px rgba(34, 197, 94, 0.4));
}

.impact-label {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'Brando Arabic', sans-serif;
    direction: rtl;
    font-weight: 500;
    line-height: 1.9;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION 7: TIMELINE - VERTICAL
   ============================================ */
.timeline-section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
}

.timeline-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.timeline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.25) 0%, rgba(10, 22, 40, 0.55) 100%);
    z-index: 2;
}

.timeline-content {
    position: relative;
    z-index: 3;
    padding: 4rem 3rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.infographic-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    direction: rtl;
    position: relative;
}

.infographic-timeline::before {
    content: '';
    position: absolute;
    right: 40px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #22c55e 0%, #3b82f6 100%);
    border-radius: 2px;
}

.timeline-milestone {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
    background: transparent;
    border-radius: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    margin-right: 60px;
}

.timeline-milestone::before {
    content: '';
    position: absolute;
    right: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid #0f1f3a;
}

.milestone-year {
    font-size: 2.2rem;
    font-weight: 900;
    color: #22c55e;
    font-family: 'Brando Arabic', sans-serif;
    min-width: 100px;
    text-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.milestone-event {
    font-size: 1.7rem;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.8;
    font-weight: 500;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION 8: TRENDS - VERTICAL
   ============================================ */
.trends-section {
    padding: 5rem 3rem;
    position: relative;
    overflow: hidden;
}

.trends-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.trends-section .trends-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.25) 0%, rgba(10, 22, 40, 0.55) 100%);
    z-index: 2;
}

.trends-section .section-heading,
.trends-section .trends-grid {
    position: relative;
    z-index: 3;
}

/* VERTICAL STACKED LAYOUT */
.trends-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    direction: rtl;
}

.trend-card-infographic {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    padding: 2rem 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: none;
}

.trend-card-infographic:hover {
    transform: translateX(-5px);
    box-shadow: none;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.trend-card-infographic:last-child {
    border-bottom: none;
}

.trend-card-infographic h4 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-family: 'Brando Arabic', sans-serif;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.trend-card-infographic p {
    font-size: 1.7rem;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.8;
    font-weight: 500;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION 9: REGIONAL - VERTICAL
   ============================================ */
.regional-section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
}

.regional-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.regional-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.25) 0%, rgba(10, 22, 40, 0.55) 100%);
    z-index: 2;
}

.regional-content {
    position: relative;
    z-index: 3;
    padding: 4rem 3rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* VERTICAL STACKED LAYOUT */
.regional-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    direction: rtl;
}

.regional-card-infographic {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    padding: 2rem 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: none;
}

.regional-card-infographic:hover {
    transform: translateX(-5px);
    box-shadow: none;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.regional-card-infographic:last-child {
    border-bottom: none;
}

.regional-card-infographic h4 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-family: 'Brando Arabic', sans-serif;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.regional-card-infographic p {
    font-size: 1.7rem;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.8;
    font-weight: 500;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION 10: METRICS - VERTICAL
   ============================================ */
.metrics-section {
    padding: 5rem 3rem;
    position: relative;
    overflow: hidden;
}

.metrics-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.metrics-section .metrics-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.45) 0%, rgba(224, 242, 254, 0.55) 100%);
    z-index: 2;
}

.metrics-section .section-heading-dark,
.metrics-section .metrics-row {
    position: relative;
    z-index: 3;
}

/* VERTICAL STACKED LAYOUT */
.metrics-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    direction: rtl;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(30, 58, 138, 0.08);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.metric-item:hover {
    background: rgba(30, 58, 138, 0.12);
    transform: translateX(-5px);
}

.metric-value {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.metric-item:hover .metric-value {
    transform: scale(1.08);
    box-shadow: 0 18px 50px rgba(59, 130, 246, 0.5);
}

.metric-label {
    font-size: 1.5rem;
    color: #1e3a8a;
    font-family: 'Brando Arabic', sans-serif;
    direction: rtl;
    font-weight: 600;
    flex: 1;
    line-height: 1.8;
}

/* ============================================
   SECTION 11: RESEARCH STATS - VERTICAL
   ============================================ */
.research-section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
}

.research-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.research-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.25) 0%, rgba(10, 22, 40, 0.55) 100%);
    z-index: 2;
}

.research-content {
    position: relative;
    z-index: 3;
    padding: 4rem 3rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* VERTICAL STACKED LAYOUT */
.research-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    direction: rtl;
}

.research-stat-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: none;
}

.research-stat-item:hover {
    transform: translateX(-5px);
    box-shadow: none;
}

.research-stat-item:last-child {
    border-bottom: none;
}

.research-stat-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    min-width: 140px;
}

.research-stat-label {
    font-size: 1.7rem;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.8;
    font-weight: 500;
    flex: 1;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION 12: PERCENTAGE BARS - VERTICAL
   ============================================ */
.percentages-section {
    padding: 5rem 3rem;
    position: relative;
    overflow: hidden;
}

.percentages-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.percentages-section .percentages-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.25) 0%, rgba(10, 22, 40, 0.55) 100%);
    z-index: 2;
}

.percentages-section .section-heading,
.percentages-section .percentage-bars {
    position: relative;
    z-index: 3;
}

.percentage-bars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    direction: rtl;
}

.percentage-bar-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: none;
}

.percentage-bar-item:hover {
    background: transparent;
    transform: translateX(-5px);
}

.percentage-bar-item:last-child {
    border-bottom: none;
}

.percentage-bar-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: #22c55e;
    font-family: 'Brando Arabic', sans-serif;
    min-width: 140px;
    text-shadow: 0 4px 25px rgba(34, 197, 94, 0.5);
}

.percentage-bar-label {
    font-size: 1.7rem;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.8;
    font-weight: 500;
    flex: 1;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION 13: MARKET OVERVIEW
   ============================================ */
.overview-section {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overview-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.overview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.35) 0%, rgba(10, 22, 40, 0.65) 100%);
    z-index: 2;
}

.overview-content {
    position: relative;
    z-index: 3;
    padding: 4rem 3rem;
    max-width: 900px;
    text-align: center;
}

.overview-text {
    font-size: 1.3rem;
    line-height: 2.2;
    color: white;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION 14: FUTURE OUTLOOK
   ============================================ */
.outlook-section {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outlook-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.outlook-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(30, 10, 40, 0.35) 0%, rgba(30, 10, 40, 0.65) 100%);
    z-index: 2;
}

.outlook-content {
    position: relative;
    z-index: 3;
    padding: 4rem 3rem;
    max-width: 900px;
    text-align: center;
}

.outlook-text {
    font-size: 1.3rem;
    line-height: 2.2;
    color: white;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION 15: CLOSING
   ============================================ */
.closing-section {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closing-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.closing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.25) 0%, rgba(10, 22, 40, 0.55) 100%);
    z-index: 2;
}

.closing-content {
    position: relative;
    z-index: 3;
    padding: 5rem 3rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.closing-text {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.8;
    direction: rtl;
    text-shadow: 0 6px 35px rgba(0, 0, 0, 0.6);
    background: linear-gradient(180deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.report-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1.5rem 2rem;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    bottom: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.export-btn {
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Brando Arabic', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.export-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.export-btn-secondary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.export-btn-secondary:hover {
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
}

.export-btn svg {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.btn-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 2rem;
    background: #0a1628;
    border-top: 1px solid #1e3a5f;
}

.footer p {
    color: #64748b;
    font-size: 0.875rem;
    font-family: 'Brando Arabic', sans-serif;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem;
    }

    .logo {
        font-size: 2rem;
    }

    .main-content {
        padding: 0 1rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .stat-hero-number {
        font-size: 4.5rem;
    }

    .stat-hero-label,
    .stat-hero-context {
        font-size: 1.3rem;
    }

    .impact-number {
        font-size: 5rem;
    }

    .impact-title,
    .impact-label {
        font-size: 1.4rem;
    }

    .section-heading,
    .section-heading-light,
    .section-heading-dark {
        font-size: 2rem;
    }

    .section-heading-gold {
        font-size: 2.2rem;
    }

    .stat-card-value {
        font-size: 3rem;
    }

    .stat-card-label {
        font-size: 1.3rem;
    }

    .progress-bar-label {
        font-size: 1.4rem;
    }

    .progress-bar-value {
        font-size: 1.8rem;
    }

    .trend-card-infographic h4,
    .regional-card-infographic h4 {
        font-size: 1.6rem;
    }

    .trend-card-infographic p,
    .regional-card-infographic p {
        font-size: 1.4rem;
    }

    .milestone-year {
        font-size: 1.8rem;
    }

    .milestone-event {
        font-size: 1.4rem;
    }

    .closing-text {
        font-size: 2rem;
    }

    .research-stat-value {
        font-size: 2.8rem;
    }

    .research-stat-label {
        font-size: 1.4rem;
    }

    .percentage-bar-value {
        font-size: 2.5rem;
    }

    .percentage-bar-label {
        font-size: 1.4rem;
    }

    .stat-card-infographic {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .stat-card-value {
        min-width: auto;
    }

    .breakdown-container {
        gap: 2rem;
    }

    .pie-chart {
        width: 220px;
        height: 220px;
    }

    .pie-chart::after {
        width: 80px;
        height: 80px;
    }

    .metric-item {
        flex-direction: column;
        text-align: center;
    }

    .metric-value {
        width: 90px;
        height: 90px;
        font-size: 1.5rem;
    }

    .infographic-timeline::before {
        display: none;
    }

    .timeline-milestone {
        margin-right: 0;
        flex-direction: column;
        gap: 1rem;
    }

    .timeline-milestone::before {
        display: none;
    }

    .percentage-bar-item,
    .research-stat-item {
        flex-direction: column;
        text-align: center;
    }

    .percentage-bar-value,
    .research-stat-value {
        min-width: auto;
    }
}

/* ============================================
   SPEECH BUBBLE STYLES (Like TrendX Reference)
   ============================================ */
.speech-bubble {
    position: relative;
    background: #ffffff;
    border: 3px solid #1e293b;
    border-radius: 1.5rem;
    padding: 1.5rem 2.5rem;
    display: inline-block;
    direction: rtl;
    font-family: 'Brando Arabic', sans-serif;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 30px;
    border-width: 20px 15px 0;
    border-style: solid;
    border-color: #ffffff transparent transparent;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -25px;
    right: 27px;
    border-width: 23px 18px 0;
    border-style: solid;
    border-color: #1e293b transparent transparent;
}

.speech-bubble-dark {
    background: #1e293b;
    border-color: #ffffff;
    color: #ffffff;
}

.speech-bubble-dark::after {
    border-color: #1e293b transparent transparent;
}

.speech-bubble-dark::before {
    border-color: #ffffff transparent transparent;
}

.speech-bubble-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.speech-bubble-dark .speech-bubble-text {
    color: #ffffff;
}

/* Year badge in speech bubble style */
.year-badge {
    display: inline-block;
    background: #ffffff;
    border: 2px solid #1e293b;
    border-radius: 0.75rem;
    padding: 0.5rem 1.5rem;
    font-size: 1.6rem;
    font-weight: 900;
    font-family: 'Brando Arabic', sans-serif;
    color: #1e293b;
}

.year-badge-dark {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
}

.year-badge-gold {
    background: transparent;
    border-color: #f59e0b;
    color: #f59e0b;
}

/* ============================================
   CREATIVE TIMELINE (Like TrendX Reference)
   ============================================ */
.creative-timeline {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.creative-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    direction: rtl;
}

.creative-timeline-year {
    flex-shrink: 0;
    background: #ffffff;
    border: 2px solid #1e293b;
    border-radius: 0.75rem;
    padding: 0.6rem 1.5rem;
    font-size: 1.4rem;
    font-weight: 900;
    font-family: 'Brando Arabic', sans-serif;
    color: #1e293b;
    min-width: 100px;
    text-align: center;
}

.creative-timeline-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.creative-timeline-logo {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: contain;
    background: #ffffff;
    padding: 0.5rem;
}

.creative-timeline-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Brando Arabic', sans-serif;
    line-height: 1.8;
}

.creative-timeline-text-light {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Notebook/Paper style section */
.notebook-section {
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    position: relative;
}

.notebook-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 40px;
    bottom: 0;
    width: 2px;
    background: #dc2626;
}

.notebook-lines {
    background-image: repeating-linear-gradient(
        transparent,
        transparent 39px,
        #d1d5db 39px,
        #d1d5db 40px
    );
}

/* ============================================
   FLOATING TEXT STYLES (No boxes)
   ============================================ */
.floating-stat {
    text-align: center;
    padding: 3rem 2rem;
}

.floating-stat-number {
    font-size: 6rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
    line-height: 1;
    margin-bottom: 1rem;
}

.floating-stat-number-gold {
    color: #f59e0b;
    text-shadow: 0 6px 30px rgba(245, 158, 11, 0.5);
}

.floating-stat-number-green {
    color: #22c55e;
    text-shadow: 0 6px 30px rgba(34, 197, 94, 0.5);
}

.floating-stat-label {
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Brando Arabic', sans-serif;
    font-weight: 400;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    direction: rtl;
}

/* Icon with stat (like TrendX reference) */
.icon-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    direction: rtl;
}

.icon-stat-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.icon-stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #22c55e;
    font-family: 'Brando Arabic', sans-serif;
}

.icon-stat-label {
    font-size: 1.5rem;
    color: #475569;
    font-family: 'Brando Arabic', sans-serif;
    font-weight: 500;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header,
    .input-section,
    .error-message,
    .report-actions,
    .footer {
        display: none !important;
    }

    .report-container {
        margin: 0;
        padding: 0;
    }

    .infographic-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .hero-overlay,
    .stat-hero-overlay,
    .distribution-overlay,
    .timeline-overlay,
    .regional-overlay,
    .research-overlay,
    .closing-overlay {
        background: rgba(0, 0, 0, 0.6) !important;
    }
}

/* ============================================
   DYNAMIC COLOR THEMES
   ============================================ */

/* Gaming Theme - Neon Green/Purple */
.theme-gaming {
    --theme-primary: #00ff88;
    --theme-secondary: #7c3aed;
    --theme-accent: #ff0080;
    --theme-glow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.theme-gaming .hero-title,
.theme-gaming .section-heading,
.theme-gaming .stat-card-value {
    text-shadow: var(--theme-glow);
}

.theme-gaming .stat-card-value {
    color: var(--theme-primary);
}

/* Technology Theme - Blue/Cyan */
.theme-technology {
    --theme-primary: #3b82f6;
    --theme-secondary: #06b6d4;
    --theme-accent: #8b5cf6;
    --theme-glow: 0 0 30px rgba(59, 130, 246, 0.6);
}

.theme-technology .stat-card-value {
    color: var(--theme-secondary);
    text-shadow: var(--theme-glow);
}

/* Ecommerce Theme - Orange/Blue */
.theme-ecommerce {
    --theme-primary: #f59e0b;
    --theme-secondary: #3b82f6;
    --theme-accent: #10b981;
    --theme-glow: 0 0 30px rgba(245, 158, 11, 0.6);
}

.theme-ecommerce .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* Food Theme - Red/Orange */
.theme-food {
    --theme-primary: #ef4444;
    --theme-secondary: #f97316;
    --theme-accent: #fbbf24;
    --theme-glow: 0 0 30px rgba(239, 68, 68, 0.6);
}

.theme-food .stat-card-value {
    color: var(--theme-secondary);
    text-shadow: var(--theme-glow);
}

/* Healthcare Theme - Green/Cyan */
.theme-healthcare {
    --theme-primary: #10b981;
    --theme-secondary: #06b6d4;
    --theme-accent: #ffffff;
    --theme-glow: 0 0 30px rgba(16, 185, 129, 0.6);
}

.theme-healthcare .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* Finance Theme - Gold/Green */
.theme-finance {
    --theme-primary: #f59e0b;
    --theme-secondary: #22c55e;
    --theme-accent: #3b82f6;
    --theme-glow: 0 0 30px rgba(245, 158, 11, 0.6);
}

.theme-finance .stat-card-value {
    color: var(--theme-secondary);
    text-shadow: var(--theme-glow);
}

/* Education Theme - Purple/Blue */
.theme-education {
    --theme-primary: #8b5cf6;
    --theme-secondary: #3b82f6;
    --theme-accent: #f59e0b;
    --theme-glow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.theme-education .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* Sports Theme - Green/Blue */
.theme-sports {
    --theme-primary: #22c55e;
    --theme-secondary: #3b82f6;
    --theme-accent: #ef4444;
    --theme-glow: 0 0 30px rgba(34, 197, 94, 0.6);
}

.theme-sports .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* Fashion Theme - Pink/Purple */
.theme-fashion {
    --theme-primary: #ec4899;
    --theme-secondary: #8b5cf6;
    --theme-accent: #f59e0b;
    --theme-glow: 0 0 30px rgba(236, 72, 153, 0.6);
}

.theme-fashion .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* Travel Theme - Sky Blue/Orange */
.theme-travel {
    --theme-primary: #0ea5e9;
    --theme-secondary: #f97316;
    --theme-accent: #22c55e;
    --theme-glow: 0 0 30px rgba(14, 165, 233, 0.6);
}

.theme-travel .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* Real Estate Theme - Teal/Cyan */
.theme-realestate {
    --theme-primary: #14b8a6;
    --theme-secondary: #0891b2;
    --theme-accent: #f59e0b;
    --theme-glow: 0 0 30px rgba(20, 184, 166, 0.6);
}

.theme-realestate .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* Automotive Theme - Red/Gray */
.theme-automotive {
    --theme-primary: #ef4444;
    --theme-secondary: #1f2937;
    --theme-accent: #fbbf24;
    --theme-glow: 0 0 30px rgba(239, 68, 68, 0.6);
}

.theme-automotive .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* General Theme - Blue/Purple */
.theme-general {
    --theme-primary: #3b82f6;
    --theme-secondary: #8b5cf6;
    --theme-accent: #f59e0b;
    --theme-glow: 0 0 30px rgba(59, 130, 246, 0.6);
}

.theme-general .stat-card-value {
    color: var(--theme-primary);
    text-shadow: var(--theme-glow);
}

/* ============================================
   FLOATING PRODUCT IMAGES
   ============================================ */

.floating-products {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.floating-product {
    position: absolute;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    animation: floatProduct 6s ease-in-out infinite;
    opacity: 0.9;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    backdrop-filter: blur(5px);
    mix-blend-mode: luminosity;
}

.floating-product:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    max-width: 150px;
}

.floating-product:nth-child(2) {
    top: 60%;
    left: 8%;
    animation-delay: 2s;
    max-width: 120px;
}

.floating-product:nth-child(3) {
    bottom: 15%;
    left: 3%;
    animation-delay: 4s;
    max-width: 100px;
}

@keyframes floatProduct {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(3deg);
    }
}

.product-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
    z-index: 3;
}

.product-strip img {
    max-height: 80px;
    max-width: 100px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    backdrop-filter: blur(5px);
}

.product-strip img:hover {
    transform: scale(1.1) translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

/* Product Showcase Section */
.product-showcase {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem;
    position: relative;
    z-index: 5;
}

.product-showcase-item {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-showcase-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-showcase-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

/* Corner Product Display */
.corner-product {
    position: absolute;
    z-index: 4;
    pointer-events: none;
}

.corner-product.top-left {
    top: 5%;
    left: 3%;
}

.corner-product.top-right {
    top: 5%;
    right: 3%;
}

.corner-product.bottom-left {
    bottom: 5%;
    left: 3%;
}

.corner-product.bottom-right {
    bottom: 5%;
    right: 3%;
}

.corner-product img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.4));
    animation: gentleFloat 4s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}


/* ===== PREVIEW / MIDDLE PHASE UI ===== */

.preview-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 14px;
    margin-bottom: 1.5rem;
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.15); }
    100% { box-shadow: none; }
}

.preview-brand-badge {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 2rem;
    margin-right: auto;
    flex-shrink: 0;
    align-items: center;
}

.preview-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #22c55e;
}

.preview-header-text {
    flex: 1;
}

.preview-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f0f0f0;
    margin: 0 0 0.3rem 0;
}

.preview-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.preview-actions-top {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.preview-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    flex: 1;
    justify-content: center;
}

.preview-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.preview-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.preview-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.preview-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.preview-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner-inline {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Sources Panel */
.preview-sources-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.preview-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.preview-section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.preview-sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
}

.preview-source-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.preview-source-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(59, 130, 246, 0.3);
}

.preview-source-provider {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

.provider-perplexity {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.provider-gemini {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.preview-source-title {
    flex: 1;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-source-url {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    direction: ltr;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-source-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.2s;
}

.preview-source-item:hover .preview-source-arrow {
    color: #60a5fa;
}

.preview-no-sources {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 1rem;
    font-size: 0.85rem;
}

/* Report Data Preview */
.preview-data-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-data-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    transition: all 0.3s ease;
    animation: slideInSection 0.4s ease both;
}

.preview-data-section:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

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

.preview-data-section:nth-child(1) { animation-delay: 0.05s; }
.preview-data-section:nth-child(2) { animation-delay: 0.1s; }
.preview-data-section:nth-child(3) { animation-delay: 0.15s; }
.preview-data-section:nth-child(4) { animation-delay: 0.2s; }
.preview-data-section:nth-child(5) { animation-delay: 0.25s; }
.preview-data-section:nth-child(6) { animation-delay: 0.3s; }
.preview-data-section:nth-child(7) { animation-delay: 0.35s; }
.preview-data-section:nth-child(8) { animation-delay: 0.4s; }

.preview-data-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.8rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-headline-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f0f0f0;
    line-height: 1.6;
    margin: 0;
}

.preview-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem 0;
}

.preview-stat-big {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.preview-stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Stats Grid */
.preview-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
}

.preview-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.preview-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.preview-stat-card .preview-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.3rem;
}

.preview-stat-card .preview-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}

/* Distribution / Breakdown Bars */
.preview-distribution-list,
.preview-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.preview-bar-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.preview-bar-label {
    min-width: 100px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

.preview-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.preview-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.preview-bar-value {
    min-width: 45px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    direction: ltr;
    text-align: left;
}

/* Impact */
.preview-impact-data {
    text-align: center;
    padding: 1rem 0;
}

.preview-impact-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #22c55e;
}

.preview-impact-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.3rem;
}

/* Timeline */
.preview-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.preview-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-timeline-year {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
    direction: ltr;
}

.preview-timeline-event {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Trends */
.preview-trends-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.preview-trend-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-trend-item strong {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.preview-trend-item p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
    margin: 0.3rem 0 0 0;
    line-height: 1.6;
}

.preview-severity-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 0.5rem;
}
.severity-high { background: #fecaca; color: #dc2626; }
.severity-medium { background: #fef3c7; color: #d97706; }
.severity-low { background: #d1fae5; color: #059669; }

/* Text blocks */
.preview-text-block {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 2;
    margin: 0;
}

.preview-closing {
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-size: 1rem;
}

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

@media (max-width: 640px) {
    .preview-actions-top {
        flex-direction: column;
    }
    .preview-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .preview-source-url {
        display: none;
    }
    .preview-bar-label {
        min-width: 70px;
        font-size: 0.75rem;
    }
    .report-actions {
        flex-direction: column;
    }
    
    .export-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   INLINE TEXT EDITING
   ============================================ */

.edit-mode-toggle {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2rem;
    cursor: pointer;
    color: #94a3b8;
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.edit-mode-toggle.visible {
    display: inline-flex;
}

.edit-mode-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #e2e8f0;
}

.edit-mode-toggle.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.edit-mode-toggle svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.editable-text {
    transition: outline 0.2s ease, background 0.2s ease;
    outline: 2px solid transparent;
    outline-offset: 4px;
    border-radius: 4px;
}

.edit-mode-active .editable-text {
    cursor: text;
    outline: 2px dashed rgba(59, 130, 246, 0.3);
}

.edit-mode-active .editable-text:hover {
    outline: 2px dashed rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.05);
}

.edit-mode-active .editable-text:focus {
    outline: 2px solid rgba(59, 130, 246, 0.8);
    background: rgba(59, 130, 246, 0.08);
}

.edit-mode-active .editable-text[contenteditable="true"]::after {
    display: none;
}

.edit-unsaved-dot {
    position: fixed;
    bottom: 80px;
    left: calc(50% + 100px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    z-index: 102;
    display: none;
    animation: unsavedPulse 1.5s ease-in-out infinite;
}

.edit-unsaved-dot.visible {
    display: block;
}

@keyframes unsavedPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.edit-save-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 103;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    color: #ffffff;
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.edit-save-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
    .edit-mode-toggle {
        bottom: 70px;
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* ============================================
   FILE UPLOAD SECTION
   ============================================ */

.file-upload-section {
    padding: 1rem 1.5rem 0.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.file-drop-zone {
    border: 1.5px dashed rgba(99, 102, 241, 0.35);
    border-radius: 0.875rem;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(99, 102, 241, 0.04);
    position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: rgba(99, 102, 241, 0.7);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.12);
}

.file-drop-zone.drag-over {
    border-style: solid;
    transform: scale(1.01);
}

.file-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.file-drop-text {
    font-size: 0.85rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
}

.file-drop-browse {
    color: #818cf8;
    cursor: pointer;
    text-decoration: underline;
    pointer-events: all;
}

.file-drop-browse:hover {
    color: #a5b4fc;
}

.file-drop-hint {
    font-size: 0.72rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.3);
}

.file-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    min-height: 0;
}

.file-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 2rem;
    padding: 0.3rem 0.6rem 0.3rem 0.75rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 260px;
    animation: chipIn 0.2s ease;
}

@keyframes chipIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.file-chip-icon {
    display: flex;
    align-items: center;
    color: #818cf8;
    flex-shrink: 0;
}

.file-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.file-chip-type {
    font-size: 0.65rem;
    background: rgba(99, 102, 241, 0.25);
    border-radius: 0.25rem;
    padding: 0.1rem 0.3rem;
    color: #a5b4fc;
    flex-shrink: 0;
    font-weight: 600;
}

.file-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.1rem;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
    margin-right: -0.1rem;
}

.file-chip-remove:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
}

.file-data-notice {
    display: none;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #4ade80;
    font-family: 'Brando Arabic', sans-serif;
    animation: chipIn 0.25s ease;
}

/* Jack Al-Ilm Report Container */
#jack-report-container {
    margin-top: 2rem;
}

.jack-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: center;
}

#jack-report-frame {
    width: 100%;
    height: 100vh;
    border: none;
    display: block;
    background: #000;
}

/* ============================================
   PLATFORM HEADER (compact nav bar)
   ============================================ */
.platform-header {
    position: relative;
    border-bottom: 1px solid var(--header-border);
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.9rem 2rem;
    z-index: 100;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.platform-header-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.platform-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.platform-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(139,92,246,0.25));
    border: 1px solid rgba(59,130,246,0.3);
    color: #93c5fd;
    flex-shrink: 0;
}

.platform-logo-text {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.platform-logo-ai {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 0.9em;
    margin-right: 0.25rem;
}

.platform-cross-media {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.platform-tagline {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-align: left;
    flex: 1;
    transition: color 0.3s ease;
}

/* ============================================
   CHATBOX SECTION
   ============================================ */
.chatbox-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2rem;
    width: 100%;
}

/* ============================================
   CHATBOX WRAPPER
   ============================================ */
.chatbox-wrapper {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255,255,255,0.04) inset;
}

.chatbox-wrapper:focus-within {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow:
        0 4px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

/* Jack channel glow (amber/gold) */
.chatbox-wrapper[data-channel="jack"]:focus-within {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow:
        0 4px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(245, 158, 11, 0.22),
        0 0 40px rgba(245, 158, 11, 0.1);
}

/* TrendX channel glow (blue/purple) */
.chatbox-wrapper[data-channel="trendx"]:focus-within {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow:
        0 4px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.2),
        0 0 40px rgba(59, 130, 246, 0.08);
}

/* ── Textarea ── */
.chatbox-textarea {
    width: 100%;
    min-height: 90px;
    max-height: 280px;
    resize: none;
    background: transparent;
    border: none;
    outline: none;
    color: #f1f5f9;
    font-family: 'Brando Arabic', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    padding: 1.25rem 1.4rem 0.6rem;
    direction: rtl;
    text-align: right;
    overflow-y: auto;
    display: block;
}

.chatbox-textarea::placeholder {
    color: rgba(148, 163, 184, 0.45);
    font-weight: 300;
}

/* ── Inline file chips ── */
.chatbox-file-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0 1.4rem;
    min-height: 0;
}

.chatbox-file-chips:empty {
    padding: 0;
}

/* ── File data notice ── */
.chatbox-file-notice {
    display: none;
    align-items: center;
    gap: 0.45rem;
    padding: 0 1.4rem 0.5rem;
    font-size: 0.78rem;
    color: #4ade80;
    font-family: 'Brando Arabic', sans-serif;
    animation: chipIn 0.25s ease;
}

/* ── Bottom toolbar ── */
.chatbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem 0.75rem 0.85rem;
    border-top: 1px solid var(--border-divider);
    gap: 0.5rem;
    transition: border-color 0.3s ease;
}

.chatbox-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
}

.chatbox-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Attach button ── */
.chatbox-attach-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--ghost-border);
    background: var(--ghost-bg);
    color: var(--ghost-color);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.chatbox-attach-btn:hover {
    background: var(--bg-ghost-hov);
    color: var(--text-primary);
    border-color: var(--border-soft);
}

/* ── Deep Search toggle ── */
.chatbox-deep-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--ghost-border);
    background: var(--ghost-bg);
    color: var(--ghost-color);
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

.chatbox-deep-toggle:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

.chatbox-deep-toggle.deep-toggle-active {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

/* ── Hint & char count ── */
.chatbox-hint {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.72rem;
    color: rgba(100, 116, 139, 0.6);
    white-space: nowrap;
    flex-shrink: 0;
}

.chatbox-char-count {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.72rem;
    color: rgba(100, 116, 139, 0.55);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Send button ── */
.chatbox-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(59,130,246,0.35);
    flex-shrink: 0;
}

.chatbox-send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(59,130,246,0.45);
}

.chatbox-send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.chatbox-send-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chatbox-send-btn .btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chatbox-send-btn .btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Glow overlay ── */
.chatbox-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.chatbox-wrapper:focus-within .chatbox-glow {
    opacity: 1;
}

.chatbox-wrapper[data-channel="jack"]:focus-within .chatbox-glow {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), transparent);
}

/* ============================================
   CHANNEL SELECTION ROW
   ============================================ */
.channel-section {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 0 0.25rem;
}

.channel-section-label {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.75rem;
    color: rgba(100, 116, 139, 0.65);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

.channel-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.2rem 0;
    flex: 1;
}

.channel-row::-webkit-scrollbar {
    display: none;
}

/* ── Channel card ── */
.channel-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.85rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    cursor: pointer;
    flex-shrink: 0;
    min-width: 200px;
    transition: all 0.25s ease;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.channel-card:hover {
    border-color: var(--border-soft);
    background: var(--bg-ghost);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.channel-card:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Channel icons */
.channel-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

.channel-icon-jack {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.channel-icon-trendx {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.channel-card-name {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.22s ease;
}

.channel-card-desc {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.71rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.45rem;
    transition: color 0.22s ease;
}

/* ── Feature list inside channel card ── */
.channel-card-features {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.1rem;
}

.channel-feature-item {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    transition: color 0.22s ease;
}

.channel-feature-item::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: 0.6;
}

.channel-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
    flex: 1;
}

/* Checkmark (only visible when selected) */
.channel-card-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s ease;
}

/* ── Jack Al-Ilm selected state ── */
.channel-card-jack.channel-selected {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.08);
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.2),
        0 4px 20px rgba(245, 158, 11, 0.12);
}

.channel-card-jack.channel-selected .channel-icon-jack {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
}

.channel-card-jack.channel-selected .channel-card-name {
    color: #fde68a;
}

.channel-card-jack.channel-selected .channel-card-check {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    opacity: 1;
    transform: scale(1);
}

/* ── TrendX selected state ── */
.channel-card-trendx.channel-selected {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.08);
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.2),
        0 4px 20px rgba(59, 130, 246, 0.12);
}

.channel-card-trendx.channel-selected .channel-icon-trendx {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.35);
}

.channel-card-trendx.channel-selected .channel-card-name {
    color: #bfdbfe;
}

.channel-card-trendx.channel-selected .channel-card-check {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   TOPIC CHIPS SECTION
   ============================================ */
.topic-chips-section {
    margin-top: 1.1rem;
    padding: 0 0.1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .chatbox-section {
        padding: 2rem 1rem 1.5rem;
    }

    .platform-header {
        padding: 0.75rem 1rem;
    }

    .platform-tagline {
        display: none;
    }

    .chatbox-hint {
        display: none;
    }

    .channel-card {
        min-width: 145px;
    }

    .channel-card-name {
        font-size: 0.8rem;
    }

    .channel-card-desc {
        font-size: 0.65rem;
    }

    .chatbox-deep-toggle {
        font-size: 0.72rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ============================================
   HERO TAGLINE BLOCK
   ============================================ */
.hero-tagline-block {
    text-align: center;
    padding: 3.5rem 1.5rem 0.5rem;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Animated gradient orbs */
.hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: orbFloat 8s ease-in-out infinite;
    opacity: 0.45;
}

.hero-orb-1 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
    top: -80px;
    right: 10%;
    animation-delay: 0s;
    animation-duration: 9s;
}

.hero-orb-2 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
    top: -60px;
    left: 15%;
    animation-delay: -3s;
    animation-duration: 11s;
}

.hero-orb-3 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 70%);
    top: 0;
    left: 45%;
    animation-delay: -6s;
    animation-duration: 7s;
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    33%       { transform: translateY(-12px) scale(1.04); }
    66%       { transform: translateY(8px) scale(0.97); }
}

/* Light mode: softer orbs */
.light-mode .hero-orb-1 {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 70%);
    opacity: 0.6;
}
.light-mode .hero-orb-2 {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.14), transparent 70%);
    opacity: 0.6;
}
.light-mode .hero-orb-3 {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 70%);
    opacity: 0.6;
}

/* Ensure hero text renders above orbs */
.hero-tagline-text,
.hero-tagline-sub {
    position: relative;
    z-index: 1;
}

.hero-tagline-text {
    font-family: 'Brando Arabic', sans-serif;
    font-size: clamp(1.7rem, 4.2vw, 2.6rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.85rem;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: background 0.3s ease;
}

.hero-tagline-sub {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.92rem;
    color: var(--hero-sub);
    font-weight: 300;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.8;
    transition: color 0.3s ease;
}

@media (max-width: 600px) {
    .hero-tagline-block {
        padding: 2rem 1rem 0.5rem;
    }

    .hero-tagline-text {
        font-size: 1.5rem;
    }

    .hero-tagline-sub {
        font-size: 0.82rem;
    }
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(148, 163, 184, 0.8);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.22s ease;
    padding: 0;
    line-height: 1;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #f1f5f9;
    transform: translateY(-1px);
}

.theme-toggle-btn:active {
    transform: translateY(0);
}

/* Dark mode: show sun (click to switch to light). Light mode: show moon (click to switch to dark) */
.theme-toggle-btn .icon-sun  { display: block; }
.theme-toggle-btn .icon-moon { display: none; }

.light-mode .theme-toggle-btn .icon-sun  { display: none; }
.light-mode .theme-toggle-btn .icon-moon { display: block; }

.light-mode .theme-toggle-btn {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.04);
    color: rgba(71, 85, 105, 0.9);
}

.light-mode .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.18);
    color: #1e293b;
}

/* ============================================
   LIGHT MODE — PLATFORM SHELL OVERRIDES
   All rules are scoped to .light-mode on <html>
   and only target platform shell elements.
   Report section HTML is unaffected.
   ============================================ */

/* ── Base ── */
.light-mode body {
    background: #f1f5f9;
    color: #0f172a;
}

.light-mode .app-container {
    background: #f1f5f9;
}

/* ── Header ── */
.light-mode .platform-header {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.96) 100%);
    border-bottom-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.light-mode .platform-logo-text {
    color: #0f172a;
}

.light-mode .platform-tagline {
    color: rgba(71, 85, 105, 0.7);
}

.light-mode .platform-logo-icon {
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
    border-color: rgba(59,130,246,0.25);
    color: #3b82f6;
}

/* ── Main content area ── */
.light-mode .main-content {
    background: transparent;
}

/* ── Hero tagline ── */
.light-mode .hero-tagline-text {
    background: linear-gradient(135deg, #0f172a 35%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.light-mode .hero-tagline-sub {
    color: rgba(71, 85, 105, 0.75);
}

/* ── Chatbox wrapper ── */
.light-mode .chatbox-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(0,0,0,0.03) inset;
}

.light-mode .chatbox-wrapper:focus-within {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.light-mode .chatbox-wrapper[data-channel="jack"]:focus-within {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(245, 158, 11, 0.2), 0 0 32px rgba(245, 158, 11, 0.06);
}

.light-mode .chatbox-wrapper[data-channel="trendx"]:focus-within {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(59, 130, 246, 0.2), 0 0 32px rgba(59, 130, 246, 0.06);
}

/* ── Chatbox textarea ── */
.light-mode .chatbox-textarea {
    color: #0f172a;
}

.light-mode .chatbox-textarea::placeholder {
    color: rgba(100, 116, 139, 0.5);
}

/* ── Chatbox toolbar ── */
.light-mode .chatbox-toolbar {
    border-top-color: rgba(0, 0, 0, 0.07);
}

/* ── Attach button ── */
.light-mode .chatbox-attach-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(71, 85, 105, 0.7);
}

.light-mode .chatbox-attach-btn:hover {
    background: rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.15);
    color: #1e293b;
}

/* ── Deep search toggle ── */
.light-mode .chatbox-deep-toggle {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(71, 85, 105, 0.8);
}

.light-mode .chatbox-deep-toggle:hover {
    background: rgba(59, 130, 246, 0.07);
    border-color: rgba(59, 130, 246, 0.3);
    color: #2563eb;
}

.light-mode .chatbox-deep-toggle.deep-toggle-active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    color: #2563eb;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.12);
}

/* ── Hint & char count ── */
.light-mode .chatbox-hint,
.light-mode .chatbox-char-count {
    color: rgba(100, 116, 139, 0.65);
}

/* ── Channel section label ── */
.light-mode .channel-section-label {
    color: rgba(71, 85, 105, 0.65);
}

/* ── Channel cards ── */
.light-mode .channel-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.light-mode .channel-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.light-mode .channel-card-name {
    color: #1e293b;
}

.light-mode .channel-card-desc {
    color: rgba(71, 85, 105, 0.7);
}

/* Jack selected — light mode */
.light-mode .channel-card-jack.channel-selected {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18), 0 4px 16px rgba(245, 158, 11, 0.1);
}

.light-mode .channel-card-jack.channel-selected .channel-card-name {
    color: #92400e;
}

/* TrendX selected — light mode */
.light-mode .channel-card-trendx.channel-selected {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18), 0 4px 16px rgba(59, 130, 246, 0.1);
}

.light-mode .channel-card-trendx.channel-selected .channel-card-name {
    color: #1e40af;
}

/* ── Topic chips ── */
.light-mode .topic-chip {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.2);
    color: #334155;
}

.light-mode .topic-chip:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #1e40af;
}

/* ── Progress card ── */
.light-mode .progress-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.light-mode .progress-title {
    color: #0f172a;
}

.light-mode .progress-message {
    color: rgba(71, 85, 105, 0.8);
}

.light-mode .progress-step {
    color: rgba(100, 116, 139, 0.7);
}

.light-mode .step-indicator {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

/* ── Error messages ── */
.light-mode .error-message {
    background: rgba(239, 68, 68, 0.07);
    border-color: rgba(239, 68, 68, 0.25);
    color: #7f1d1d;
}

/* ── Preview container ── */
.light-mode .preview-title {
    color: #0f172a;
}

.light-mode .preview-subtitle {
    color: rgba(71, 85, 105, 0.7);
}

.light-mode .preview-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #334155;
    border-color: rgba(0, 0, 0, 0.12);
}

.light-mode .preview-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.09);
}

.light-mode .preview-sources-panel {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-mode .preview-data-section {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.07);
}

.light-mode .preview-data-section:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.12);
}

/* ── Footer ── */
.light-mode .footer:not(.report-footer) {
    background: linear-gradient(180deg, rgba(241,245,249,0) 0%, rgba(226,232,240,0.6) 100%);
    border-top-color: rgba(0, 0, 0, 0.08);
}

.light-mode .footer-logo {
    color: #1e293b;
}

.light-mode .footer-logo span {
    color: #3b82f6;
}

.light-mode .footer-tagline,
.light-mode .footer-features {
    color: rgba(71, 85, 105, 0.6);
}

.light-mode .footer-divider {
    background: rgba(0, 0, 0, 0.1);
}

/* ── File notice stays green in both modes ── */
.light-mode .chatbox-file-notice {
    color: #16a34a;
}

/* ── Preview sources & data panels — additional light mode ── */
.light-mode .preview-section-header {
    color: rgba(30, 41, 59, 0.75);
}

.light-mode .preview-section-header h3 {
    color: #1e293b;
}

.light-mode .preview-source-item {
    background: rgba(0, 0, 0, 0.025);
    border-color: rgba(0, 0, 0, 0.07);
}

.light-mode .preview-source-item:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
}

.light-mode .preview-source-url {
    color: #3b82f6;
}

.light-mode .preview-data-title {
    color: #1e293b;
}

/* ── Channel card select CTA row ── */
.channel-card-select-row {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.channel-select-btn {
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.22rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-ghost);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-block;
}

.channel-select-btn:hover {
    background: var(--bg-ghost-hov);
    color: var(--text-secondary);
    border-color: var(--border-soft);
}

/* Hide "اختر القناة" when card is selected; show badge instead */
.channel-selected .channel-select-btn     { display: none; }
.channel-selected .channel-selected-badge { display: inline-flex; }

/* Show "محدد" badge */
.channel-selected-badge {
    display: none;
    align-items: center;
    gap: 0.28rem;
    font-family: 'Brando Arabic', sans-serif;
    font-size: 0.67rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
}

/* Jack selected badge — amber */
.channel-card-jack.channel-selected .channel-selected-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* TrendX selected badge — blue */
.channel-card-trendx.channel-selected .channel-selected-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Light mode adjustments for select button */
.light-mode .channel-select-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(100, 116, 139, 0.8);
}

.light-mode .channel-select-btn:hover {
    background: rgba(0, 0, 0, 0.07);
    color: #475569;
}

.light-mode .channel-card-jack.channel-selected .channel-selected-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.25);
}

.light-mode .channel-card-trendx.channel-selected .channel-selected-badge {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.22);
}

/* ══════════════════════════════════════════════════════════════════
   CONCEPT EDITOR  —  Phase 1.5 visual review panel (Jack Al-Ilm)
   ══════════════════════════════════════════════════════════════════ */

#concept-editor {
    padding: 2rem 1rem;
    animation: fadeInUp 0.45s ease;
}

.concept-editor-card {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

/* ─── Header ─── */
.concept-editor-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.concept-editor-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(251,191,36,0.12));
    border: 1px solid rgba(245,158,11,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    flex-shrink: 0;
}

.concept-editor-header-text {
    flex: 1;
    min-width: 0;
}

.concept-editor-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 0.3rem;
}

.concept-editor-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary, rgba(255,255,255,0.55));
    margin: 0;
    line-height: 1.5;
}

.concept-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: var(--text-secondary, rgba(255,255,255,0.6));
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.concept-back-btn:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary, #fff);
}

/* ─── Sections ─── */
.concept-section {
    margin-bottom: 1.5rem;
}

.concept-section-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.concept-badge {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.concept-badge-global  { background: rgba(245,158,11,0.18); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.concept-badge-hero    { background: rgba(99,102,241,0.18);  color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.concept-badge-closing { background: rgba(16,185,129,0.18);  color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.concept-badge-chapters{ background: rgba(236,72,153,0.15);  color: #f9a8d4; border: 1px solid rgba(236,72,153,0.3); }

.concept-section-hint {
    font-size: 0.8rem;
    color: var(--text-secondary, rgba(255,255,255,0.4));
}

/* ─── Textareas ─── */
.concept-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-primary, #e5e7eb);
    font-size: 0.875rem;
    line-height: 1.65;
    padding: 0.85rem 1rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    direction: ltr;
}
.concept-textarea:focus {
    outline: none;
    border-color: rgba(245,158,11,0.55);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}
.concept-textarea::placeholder { color: rgba(255,255,255,0.2); }
.concept-textarea-sm { min-height: 70px; }

/* ─── Two-column grid ─── */
.concept-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
    .concept-two-col { grid-template-columns: 1fr; }
}

/* ─── Chapter list ─── */
.concept-chapters-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.concept-chapter-row {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

.concept-chapter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.concept-chapter-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.concept-chapter-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #e5e7eb);
}

.concept-loading-msg {
    padding: 1.25rem;
    text-align: center;
    color: var(--text-secondary, rgba(255,255,255,0.55));
    font-size: 0.9rem;
}

/* ─── Actions ─── */
.concept-editor-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.concept-confirm-btn {
    flex: 1;
    justify-content: center;
    min-width: 200px;
}

/* ─── Light mode overrides ─── */
.light-mode .concept-editor-card {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 4px 32px rgba(0,0,0,0.1);
}
.light-mode .concept-editor-title  { color: #111827; }
.light-mode .concept-editor-subtitle { color: #6b7280; }
.light-mode .concept-back-btn {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: #6b7280;
}
.light-mode .concept-back-btn:hover { background: rgba(0,0,0,0.08); color: #111827; }
.light-mode .concept-textarea {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #111827;
}
.light-mode .concept-textarea:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}
.light-mode .concept-textarea::placeholder { color: #9ca3af; }
.light-mode .concept-chapter-row {
    background: #f9fafb;
    border-color: #e5e7eb;
}
.light-mode .concept-chapter-title { color: #111827; }
.light-mode .concept-section-hint  { color: #9ca3af; }
.light-mode .concept-loading-msg   { color: #6b7280; }

/* ── Drag mode button ── */
.drag-mode-toggle { transition: background 0.2s, box-shadow 0.2s; }
.drag-mode-toggle.drag-active {
    background: linear-gradient(135deg, #f59e0b, #b45309) !important;
    box-shadow: 0 0 16px rgba(245,158,11,0.5) !important;
}
.drag-mode-toggle.drag-active svg { color: #fff !important; }

/* ── Drag handle affordance — shown on hover when drag mode is active ── */
[data-drag-enabled] {
    position: relative;
}
[data-drag-enabled]::before {
    content: '⠿';
    position: absolute;
    top: 50%;
    inset-inline-end: calc(100% + 4px);
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #f59e0b;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    line-height: 1;
}
[data-drag-enabled]:hover::before { opacity: 0.8; }

/* ── File-only notice (amber, no-search mode) ── */
.chatbox-file-notice--only {
    color: #f59e0b !important;
}

/* ── File-only sources panel ── */
.preview-file-only-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.83rem;
    margin: 0.25rem 0;
}
.preview-file-only-notice svg { flex-shrink: 0; margin-top: 2px; color: #f59e0b; }

.light-mode .preview-file-only-notice {
    background: rgba(245,158,11,0.06);
    border-color: rgba(245,158,11,0.3);
    color: #92400e;
}
.light-mode .preview-file-only-notice svg { color: #d97706; }
