/* ============================================
   CYFER TECH AI — Design System
   Premium Light Theme with Brand Colors
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ── */
:root {
    /* Brand Colors — derived from Cyfer Tech logo (deep blue/teal) */
    --brand-primary: #0A2540;
    --brand-accent: #00D4FF;
    --brand-accent-2: #635BFF;
    --brand-gradient: linear-gradient(135deg, #0A2540 0%, #1B3A5C 40%, #0D7377 100%);
    --brand-gradient-accent: linear-gradient(135deg, #00D4FF 0%, #635BFF 100%);
    --brand-gradient-subtle: linear-gradient(135deg, #f0f9ff 0%, #e8f4f8 50%, #f3f0ff 100%);
    --brand-gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 255, 0.9) 100%);

    /* Neutral Palette */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* Semantic */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.04);
    --shadow-md: 0 4px 12px rgba(10, 37, 64, 0.08);
    --shadow-lg: 0 8px 30px rgba(10, 37, 64, 0.12);
    --shadow-xl: 0 20px 60px rgba(10, 37, 64, 0.15);
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);
    --shadow-glow-accent: 0 0 60px rgba(99, 91, 255, 0.12);
    --shadow-card-hover: 0 20px 60px rgba(10, 37, 64, 0.18), 0 0 40px rgba(0, 212, 255, 0.08);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 150ms var(--ease-out-expo);
    --transition-base: 300ms var(--ease-out-expo);
    --transition-slow: 500ms var(--ease-out-expo);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

input,
textarea {
    font-family: inherit;
}

/* ── Keyframe Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes dotBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(0, 212, 255, 0.2);
    }

    50% {
        border-color: rgba(0, 212, 255, 0.5);
    }
}

@keyframes orb-float-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(80px, -60px) scale(1.1);
    }

    50% {
        transform: translate(-40px, -100px) scale(0.95);
    }

    75% {
        transform: translate(60px, -30px) scale(1.05);
    }
}

@keyframes orb-float-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-60px, 50px) scale(1.05);
    }

    50% {
        transform: translate(80px, 80px) scale(0.9);
    }

    75% {
        transform: translate(-30px, 20px) scale(1.1);
    }
}

@keyframes orb-float-3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, -80px) scale(1.15);
    }

    66% {
        transform: translate(-60px, 40px) scale(0.85);
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes typingDot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

@keyframes statCountUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Layout Utilities ── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Particle Canvas ── */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LANDING PAGE STYLES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Background Orbs ── */
.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.25), transparent 70%);
    top: -10%;
    right: -5%;
    animation: orb-float-1 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 91, 255, 0.2), transparent 70%);
    bottom: -5%;
    left: -5%;
    animation: orb-float-2 25s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15), transparent 70%);
    top: 40%;
    left: 30%;
    animation: orb-float-3 18s ease-in-out infinite;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: all var(--transition-base);
    animation: fadeInDown 0.6s var(--ease-out-expo);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(10, 37, 64, 0.06);
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo {
    height: 38px;
    width: auto;
    transition: transform var(--transition-base);
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

.navbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-primary);
    letter-spacing: -0.02em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.navbar-title span {
    background: var(--brand-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--brand-gradient-accent);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

/* ── Hero Section ── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 120px 24px 60px;
}

.hero-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s var(--ease-out-expo);
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero-tag svg {
    width: 16px;
    height: 16px;
    color: var(--brand-accent);
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-title .highlight {
    background: var(--brand-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--gray-500);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

/* ── Stats Bar ── */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    padding: 18px 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    margin-bottom: 48px;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.15s both;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--brand-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stat-suffix {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-accent);
}

.stat-icon {
    font-size: 1.1rem;
}

.stat-highlight {
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--brand-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-400);
    letter-spacing: -0.01em;
}

.stat-divider {
    width: 1px;
    height: 28px;
    background: var(--gray-200);
}

/* ── Cards Grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 920px;
    width: 100%;
}

.support-card {
    position: relative;
    background: var(--brand-gradient-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    padding: 44px 36px;
    transition: all var(--transition-slow);
    overflow: hidden;
    cursor: pointer;
}

.support-card .card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.support-card:hover .card-glow {
    opacity: 1;
}

.support-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-gradient-accent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.support-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, rgba(99, 91, 255, 0.03) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.support-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(0, 212, 255, 0.2);
}

.support-card:hover::before {
    opacity: 1;
}

.support-card:hover::after {
    opacity: 1;
}

.support-card:first-child {
    animation: slideInLeft 0.8s var(--ease-out-expo) 0.3s both;
}

.support-card:last-child {
    animation: slideInRight 0.8s var(--ease-out-expo) 0.45s both;
}

.card-icon-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    z-index: 1;
}

.card-icon-bg {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    opacity: 0.1;
    transition: all var(--transition-base);
}

.support-card:hover .card-icon-bg {
    opacity: 0.15;
    transform: scale(1.1);
}

.card-icon-wrapper svg {
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-base);
}

.support-card:hover .card-icon-wrapper svg {
    transform: scale(1.1);
}

.card-ai .card-icon-bg {
    background: var(--brand-gradient-accent);
}

.card-ai .card-icon-wrapper svg {
    color: #00B4D8;
}

.card-portal .card-icon-bg {
    background: linear-gradient(135deg, #635BFF, #8B5CF6);
}

.card-portal .card-icon-wrapper svg {
    color: #7C3AED;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.card-description {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.65;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-base);
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.card-cta svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-base);
}

.support-card:hover .card-cta svg {
    transform: translateX(4px);
}

.card-ai .card-cta {
    background: var(--brand-gradient-accent);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.25);
}

.card-ai:hover .card-cta {
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.35);
}

.card-portal .card-cta {
    background: linear-gradient(135deg, #635BFF 0%, #8B5CF6 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 91, 255, 0.25);
}

.card-portal:hover .card-cta {
    box-shadow: 0 6px 25px rgba(99, 91, 255, 0.35);
}

/* ── Card Features ── */
.card-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.card-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 500;
}

.card-feature svg {
    width: 16px;
    height: 16px;
    color: var(--success);
    flex-shrink: 0;
}

/* ── Footer ── */
.landing-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px 24px;
    animation: fadeIn 1s var(--ease-out-expo) 0.6s both;
}

.landing-footer p {
    font-size: 0.8rem;
    color: var(--gray-400);
    font-weight: 500;
}

.landing-footer a {
    color: var(--brand-accent);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.landing-footer a:hover {
    color: var(--brand-accent-2);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHAT PAGE STYLES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.chat-app {
    display: flex;
    height: 100vh;
    background: var(--gray-50);
    overflow: hidden;
}

/* ── Chat Sidebar ── */
.chat-sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.chat-sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
    z-index: 50;
    height: 100%;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.sidebar-logo {
    height: 28px;
    width: auto;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.sidebar-title span {
    background: var(--brand-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.new-chat-btn {
    margin: 16px 16px 8px;
    padding: 11px 16px;
    background: var(--brand-gradient-accent);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.2);
}

.new-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
}

.new-chat-btn svg {
    width: 16px;
    height: 16px;
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-history-list::-webkit-scrollbar {
    width: 4px;
}

.chat-history-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.history-item {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 0.83rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item:hover {
    background: var(--gray-100);
    color: var(--brand-primary);
}

.history-item.active {
    background: rgba(0, 212, 255, 0.08);
    color: var(--brand-primary);
    font-weight: 600;
}

.history-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.5;
}

.history-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-back {
    padding: 16px;
    border-top: 1px solid var(--gray-100);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 0.83rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    width: 100%;
}

.back-btn:hover {
    background: var(--gray-100);
    color: var(--brand-primary);
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

/* ── Chat Main Area ── */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    padding: 14px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}

/* Gradient accent bar at top of chat header */
.chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand-gradient-accent);
    background-size: 200% 100%;
    animation: gradientShift 4s ease-in-out infinite;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--gray-100);
    color: var(--brand-primary);
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-ring 2s ease-in-out infinite;
}

.chat-status-text {
    font-size: 0.83rem;
    color: var(--gray-500);
    font-weight: 500;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-action-btn {
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

.header-action-btn:hover {
    background: var(--gray-100);
    color: var(--brand-primary);
}

.header-action-btn svg {
    width: 18px;
    height: 18px;
}

/* ── Messages Area ── */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: var(--radius-full);
}

/* Welcome state */
.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    animation: fadeInUp 0.6s var(--ease-out-expo);
}

.welcome-icon {
    width: 72px;
    height: 72px;
    background: var(--brand-gradient-accent);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.2);
    animation: float 4s ease-in-out infinite;
}

.welcome-icon svg {
    width: 32px;
    height: 32px;
    color: var(--white);
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 0.95rem;
    color: var(--gray-400);
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.welcome-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 500px;
}

.suggestion-chip {
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.83rem;
    color: var(--gray-600);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.suggestion-chip:hover {
    border-color: var(--brand-accent);
    color: var(--brand-primary);
    background: rgba(0, 212, 255, 0.04);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 12px;
    max-width: 75%;
    animation: messageSlideIn 0.3s var(--ease-out-expo);
}

.message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-ai {
    align-self: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
}

.message-ai .message-avatar {
    background: var(--brand-gradient-accent);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.2);
}

.message-ai .message-avatar svg {
    width: 16px;
    height: 16px;
    color: var(--white);
}

.message-user .message-avatar {
    background: var(--gray-200);
}

.message-user .message-avatar svg {
    width: 16px;
    height: 16px;
    color: var(--gray-600);
}

.message-bubble {
    padding: 12px 18px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.65;
    position: relative;
}

.message-user .message-bubble {
    background: var(--brand-primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.message-ai .message-bubble {
    background: var(--white);
    color: var(--gray-800);
    border: 1px solid var(--gray-100);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.message-time {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 4px;
    padding: 0 4px;
}

.message-user .message-time {
    text-align: right;
}

/* ── Code Block Styles ── */
.code-block-wrapper {
    position: relative;
    margin: 10px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-block-lang {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
}

.code-copy-btn.copied {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.code-block-content {
    padding: 14px 16px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
    color: #E2E8F0;
    white-space: pre;
    tab-size: 2;
}

.code-block-content::-webkit-scrollbar {
    height: 4px;
}

.code-block-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}

/* Inline code in messages */
.message-bubble code:not(.code-block-content code) {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
}

.message-ai .message-bubble ul,
.message-ai .message-bubble ol {
    padding-left: 20px;
    margin: 6px 0;
}

.message-ai .message-bubble li {
    margin-bottom: 4px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 12px;
    align-self: flex-start;
    animation: messageSlideIn 0.3s var(--ease-out-expo);
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 20px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--brand-accent);
    border-radius: 50%;
    animation: typingDot 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* ── Chat Input ── */
.chat-input-area {
    padding: 16px 24px 24px;
    border-top: 1px solid var(--gray-100);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 6px 6px 6px 20px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.chat-input-wrapper:focus-within {
    border-color: var(--brand-accent);
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-800);
    background: transparent;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    padding: 8px 0;
}

.chat-input::placeholder {
    color: var(--gray-400);
}

.send-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gradient-accent);
    border-radius: var(--radius-lg);
    color: var(--white);
    transition: all var(--transition-base);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.2);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-btn svg {
    width: 18px;
    height: 18px;
}

.chat-disclaimer {
    text-align: center;
    margin-top: 10px;
    font-size: 0.72rem;
    color: var(--gray-400);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE DESIGN
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 440px;
    }

    .support-card {
        padding: 32px 28px;
    }

    .support-card:first-child,
    .support-card:last-child {
        animation-name: fadeInUp;
    }

    .hero {
        padding: 100px 16px 40px;
    }

    .hero-header {
        margin-bottom: 28px;
    }

    .stats-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px 24px;
        border-radius: var(--radius-xl);
        margin-bottom: 32px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    /* Chat responsive */
    .chat-sidebar {
        position: absolute;
        z-index: 50;
        height: 100%;
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }

    .chat-sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
    }

    .message {
        max-width: 88%;
    }

    .chat-messages {
        padding: 16px;
    }

    .chat-input-area {
        padding: 12px 16px 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .support-card {
        padding: 24px 20px;
    }

    .card-title {
        font-size: 1.15rem;
    }

    .welcome-suggestions {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-bar {
        padding: 14px 20px;
    }

    .stat-number {
        font-size: 1.1rem;
    }
}

/* ── Sidebar overlay for mobile ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.3);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}