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

:root {
    /* Batman Theme (Dark/Gritty) Variables */
    --bg-color-batman: #0a0a0d;
    --text-color-batman: #e0e0e0;
    --primary-color-batman: #f0c330;
    /* Bat Yellow */
    --secondary-color-batman: #262626;
    --accent-color-batman: #f0c330;
    --card-bg-batman: rgba(20, 20, 24, 0.85);
    --border-batman: 1px solid #f0c330;
    --shadow-batman: 0 4px 15px rgba(240, 195, 48, 0.15);
    --font-heading-batman: 'Syne', sans-serif;

    /* Superman Theme (Light/Heroic) Variables */
    --bg-color-superman: #f4f7f6;
    --text-color-superman: #1a2530;
    --primary-color-superman: #ed1d24;
    /* Super Red */
    --secondary-color-superman: #005b9f;
    /* Super Blue */
    --accent-color-superman: #ffc900;
    /* Super Yellow */
    --card-bg-superman: #ffffff;
    --border-superman: 1px solid #e0e0e0;
    --shadow-superman: 0 10px 30px rgba(0, 91, 159, 0.1);
    --font-heading-superman: 'Bebas Neue', sans-serif;

    /* Base Variables (Will be overwritten by JS toggle) */
    --bg-color: var(--bg-color-batman);
    --text-color: var(--text-color-batman);
    --primary-color: var(--primary-color-batman);
    --secondary-color: var(--secondary-color-batman);
    --accent-color: var(--accent-color-batman);
    --card-bg: var(--card-bg-batman);
    --border: var(--border-batman);
    --shadow: var(--shadow-batman);
    --font-heading: var(--font-heading-batman);
    --font-body: 'Outfit', sans-serif;
}

/* Base Superman class applied to body when switched */
body.superman-theme {
    --bg-color: var(--bg-color-superman);
    --text-color: var(--text-color-superman);
    --primary-color: var(--primary-color-superman);
    --secondary-color: var(--secondary-color-superman);
    --accent-color: var(--accent-color-superman);
    --card-bg: var(--card-bg-superman);
    --border: var(--border-superman);
    --shadow: var(--shadow-superman);
    --font-heading: var(--font-heading-superman);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor for custom cursor */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mt-4 {
    margin-top: 2rem;
}

/* Custom Cursor */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    pointer-events: none;
    z-index: 10002;
    /* above everything including chatbot */
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: width 0.2s, height 0.2s, background-color 0.5s ease;
}

#custom-cursor.click-effect {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
}

/* Theme Switcher */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 1000;
}

.theme-label {
    margin-left: 10px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    transition: color 0.5s ease;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #333;
    bottom: 0;
    cursor: pointer !important;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: var(--primary-color);
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    z-index: 2;
}

input:checked+.slider {
    background-color: #ccc;
}

input:checked+.slider:before {
    transform: translateX(26px);
    background-color: var(--secondary-color);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.emblem-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vh;
    height: 60vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05;
    transition: opacity 1s, background-image 1s;
}

/* Batman Emblem (CSS Only approximation or placeholder) */
body:not(.superman-theme) .emblem-bg {
    background-image: radial-gradient(circle, var(--primary-color) 0%, transparent 60%);
    filter: blur(50px);
}

/* Superman Emblem */
body.superman-theme .emblem-bg {
    background-image: radial-gradient(circle, var(--secondary-color) 0%, transparent 60%);
    filter: blur(50px);
}

/* Typography & Layout */
.flex-hero {
    display: flex;
    align-items: center;
    gap: 60px;
}

.profile-wrapper {
    flex-shrink: 0;
    transition: filter 0.5s ease;
    filter: drop-shadow(0 0 15px rgba(240, 195, 48, 0.4));
}

.profile-wrapper:hover {
    filter: drop-shadow(0 0 25px var(--primary-color));
}

body.superman-theme .profile-wrapper {
    filter: drop-shadow(0 0 15px rgba(0, 91, 159, 0.3));
}

body.superman-theme .profile-wrapper:hover {
    filter: drop-shadow(0 0 25px var(--secondary-color));
}

.profile-pic {
    width: 280px;
    height: 280px;
    object-fit: cover;
    clip-path: url(#batman-shape);
    transition: transform 0.5s ease, filter 0.5s ease, clip-path 0.5s ease;
    filter: grayscale(20%) contrast(1.1);
}

.profile-pic:hover {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1.1);
}

body.superman-theme .profile-pic {
    /* Exact polygon points extracted from Superman logo SVG */
    clip-path: polygon(50% 96.2%, 3.5% 24%, 19.2% 3.7%, 80.8% 3.7%, 96.5% 24%);
}

header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section {
    position: relative;
    z-index: 10;
}

h1,
h2.section-title,
h3.category-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

h1 {
    font-size: 5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
}

body.superman-theme h1 {
    font-size: 6rem;
    color: var(--secondary-color);
    text-shadow: 3px 3px 0 var(--primary-color);
    letter-spacing: 5px;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 400;
}

.summary {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 40px;
    color: #ccc;
    transition: color 0.5s;
}

body.superman-theme .summary {
    color: #444;
}

/* Buttons */
.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: none;
    /* due to custom cursor */
    position: relative;
    overflow: hidden;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--bg-color);
    font-weight: bold;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

body.superman-theme .primary-btn {
    background-color: var(--primary-color);
    color: white;
}

body.superman-theme .secondary-btn {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

body.superman-theme .secondary-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s, transform 0.3s;
    cursor: none;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.2) translateY(-3px);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background-color: var(--primary-color);
}

body.superman-theme .section-title {
    color: var(--secondary-color);
}

body.superman-theme .section-title::after {
    background-color: var(--primary-color);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.skill-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #bbb;
}

body.superman-theme .skill-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--secondary-color);
}

body.superman-theme .skill-card p {
    color: #555;
}

body.superman-theme .skill-icon {
    color: var(--secondary-color);
}

/* Projects */
.category-title {
    font-size: 1.5rem;
    margin: 30px 0 20px;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

body.superman-theme .category-title {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border: var(--border);
    padding: 25px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #ccc;
    min-height: 60px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-stack span {
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.project-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.project-card:hover::before {
    left: 100%;
}

body.superman-theme .project-card h4 {
    color: var(--secondary-color);
}

body.superman-theme .project-card p {
    color: #555;
}

body.superman-theme .tech-stack span {
    background-color: var(--primary-color);
    color: white;
}

/* Leadership */
.leadership-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    border: 1px dashed var(--primary-color);
    transition: background 0.3s;
}

.leadership-card:hover {
    background: rgba(240, 195, 48, 0.05);
}

.leadership-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

body.superman-theme .leadership-card {
    border: 1px dashed var(--secondary-color);
}

body.superman-theme .leadership-card:hover {
    background: rgba(0, 91, 159, 0.05);
}

body.superman-theme .leadership-card h3 {
    color: var(--secondary-color);
}

/* Footer */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

body.superman-theme footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Particle Effects Canvas */
#effect-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
}

/* Responsive */
@media (max-width: 768px) {
    .flex-hero {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding-top: 60px;
    }

    .profile-pic {
        width: 180px;
        height: 180px;
    }

    h1 {
        font-size: 3.5rem;
    }

    body.superman-theme h1 {
        font-size: 4rem;
    }

    .theme-switch-wrapper {
        top: 10px;
        right: 10px;
    }

    .theme-label {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        text-align: center;
        justify-content: center;
    }
}

/* Glitch Effect for Batman Mode */
.glitch {
    position: relative;
}

body:not(.superman-theme) .glitch::before,
body:not(.superman-theme) .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

body:not(.superman-theme) .glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

body:not(.superman-theme) .glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(66px, 9999px, 34px, 0);
    }

    5% {
        clip: rect(25px, 9999px, 86px, 0);
    }

    10% {
        clip: rect(20px, 9999px, 20px, 0);
    }

    15% {
        clip: rect(100px, 9999px, 49px, 0);
    }

    20% {
        clip: rect(29px, 9999px, 66px, 0);
    }

    25% {
        clip: rect(48px, 9999px, 63px, 0);
    }

    30% {
        clip: rect(87px, 9999px, 14px, 0);
    }

    35% {
        clip: rect(38px, 9999px, 32px, 0);
    }

    40% {
        clip: rect(98px, 9999px, 68px, 0);
    }

    45% {
        clip: rect(31px, 9999px, 2px, 0);
    }

    50% {
        clip: rect(89px, 9999px, 55px, 0);
    }

    55% {
        clip: rect(51px, 9999px, 21px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 42px, 0);
    }

    65% {
        clip: rect(31px, 9999px, 52px, 0);
    }

    70% {
        clip: rect(17px, 9999px, 87px, 0);
    }

    75% {
        clip: rect(78px, 9999px, 33px, 0);
    }

    80% {
        clip: rect(71px, 9999px, 64px, 0);
    }

    85% {
        clip: rect(19px, 9999px, 90px, 0);
    }

    90% {
        clip: rect(2px, 9999px, 62px, 0);
    }

    95% {
        clip: rect(59px, 9999px, 92px, 0);
    }

    100% {
        clip: rect(45px, 9999px, 20px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(38px, 9999px, 73px, 0);
    }

    5% {
        clip: rect(15px, 9999px, 54px, 0);
    }

    10% {
        clip: rect(34px, 9999px, 83px, 0);
    }

    15% {
        clip: rect(27px, 9999px, 7px, 0);
    }

    20% {
        clip: rect(6px, 9999px, 35px, 0);
    }

    25% {
        clip: rect(21px, 9999px, 49px, 0);
    }

    30% {
        clip: rect(55px, 9999px, 14px, 0);
    }

    35% {
        clip: rect(85px, 9999px, 60px, 0);
    }

    40% {
        clip: rect(58px, 9999px, 9px, 0);
    }

    45% {
        clip: rect(36px, 9999px, 40px, 0);
    }

    50% {
        clip: rect(21px, 9999px, 23px, 0);
    }

    55% {
        clip: rect(81px, 9999px, 86px, 0);
    }

    60% {
        clip: rect(49px, 9999px, 20px, 0);
    }

    65% {
        clip: rect(20px, 9999px, 7px, 0);
    }

    70% {
        clip: rect(8px, 9999px, 84px, 0);
    }

    75% {
        clip: rect(93px, 9999px, 12px, 0);
    }

    80% {
        clip: rect(29px, 9999px, 44px, 0);
    }

    85% {
        clip: rect(19px, 9999px, 90px, 0);
    }

    90% {
        clip: rect(2px, 9999px, 62px, 0);
    }

    95% {
        clip: rect(59px, 9999px, 92px, 0);
    }

    100% {
        clip: rect(45px, 9999px, 20px, 0);
    }
}

/* Comic Book Style Halftone Theme Transition */
.comic-wipe {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 250vmax;
    height: 250vmax;
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    background-color: var(--comic-bg);
    background-image: radial-gradient(rgba(0, 0, 0, 0.5) 30%, transparent 35%);
    background-size: 40px 40px;
    background-position: 0 0;

    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    opacity: 0;
    will-change: transform, opacity;
    /* Hardware acceleration */
}

.comic-wipe.expanding {
    animation: comicPow 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.comic-wipe.contracting {
    animation: comicFade 0.4s ease-out forwards;
}

@keyframes comicPow {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1) rotate(45deg);
        opacity: 1;
    }
}

@keyframes comicFade {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(45deg);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5) rotate(90deg);
        opacity: 0;
    }
}

/* Background Floating Logos */
.floating-logos {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
    /* Keep above particles if preferred, but below main content */
}

.logobg {
    position: absolute;
    color: var(--primary-color);
    opacity: 0.05;
    animation: floatLogo 20s linear infinite;
    bottom: -150px;
}

body.superman-theme .logobg {
    color: var(--secondary-color);
    opacity: 0.08;
    /* Slightly stronger opacity for light theme */
}

@keyframes floatLogo {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    2% {
        opacity: 0.05;
    }

    90% {
        opacity: 0.05;
    }

    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

body.superman-theme .logobg {
    animation-name: floatLogoSuperman;
}

@keyframes floatLogoSuperman {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    2% {
        opacity: 0.08;
    }

    90% {
        opacity: 0.08;
    }

    100% {
        transform: translateY(-110vh) rotate(-360deg);
        opacity: 0;
    }
}

/* Individual Logo Settings */
.logo-1 {
    left: 10%;
    animation-duration: 25s;
    animation-delay: 0s;
    font-size: 6rem;
}

.logo-2 {
    left: 25%;
    animation-duration: 32s;
    animation-delay: 1s;
    font-size: 4rem;
}

.logo-3 {
    left: 40%;
    animation-duration: 18s;
    animation-delay: 0.5s;
    font-size: 5rem;
}

.logo-4 {
    left: 55%;
    animation-duration: 28s;
    animation-delay: 2s;
    font-size: 7rem;
}

.logo-5 {
    left: 70%;
    animation-duration: 22s;
    animation-delay: 0.2s;
    font-size: 4.5rem;
}

.logo-6 {
    left: 85%;
    animation-duration: 35s;
    animation-delay: 3s;
    font-size: 5.5rem;
}

.logo-7 {
    left: 15%;
    animation-duration: 20s;
    animation-delay: 4s;
    font-size: 3.5rem;
}

.logo-8 {
    left: 80%;
    animation-duration: 26s;
    animation-delay: 1.5s;
    font-size: 5rem;
}

/* ============================================================
   CHATBOT WIDGET
   ============================================================ */

/* ---- Floating Action Button ---- */
#chatbot-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    cursor: none;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
    filter: drop-shadow(0 8px 24px rgba(240, 195, 48, 0.6));
    transition: filter 0.4s ease, transform 0.3s ease;
}

#chatbot-fab:hover {
    transform: scale(1.1) translateY(-6px);
    filter: drop-shadow(0 14px 32px rgba(240, 195, 48, 0.85));
}

body.superman-theme #chatbot-fab {
    filter: drop-shadow(0 8px 24px rgba(0, 91, 159, 0.6));
}

body.superman-theme #chatbot-fab:hover {
    filter: drop-shadow(0 14px 32px rgba(237, 29, 36, 0.75));
}

/* Avatar character image - bigger */
#chatbot-fab-avatar {
    width: 140px;
    height: auto;
    object-fit: contain;
    position: absolute;
    bottom: -10px;
    right: -18px;
    pointer-events: none;
}

/* "Chat with me!" label badge */
.chatbot-label {
    position: absolute;
    bottom: 78px;
    right: -4px;
    background: var(--primary-color);
    color: #111;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    animation: labelBob 2.5s ease-in-out infinite;
    transform-origin: center bottom;
}

.chatbot-label::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 18px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary-color);
}

body.superman-theme .chatbot-label {
    background: var(--secondary-color);
    color: #fff;
}

body.superman-theme .chatbot-label::after {
    border-top-color: var(--secondary-color);
}

@keyframes labelBob {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-4px) scale(1.04);
    }
}

/* Pulsing ring around FAB - bigger */
.chatbot-pulse {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    animation: chatPulse 2s ease-out infinite;
    top: 0;
    left: 0;
    pointer-events: none;
}

body.superman-theme .chatbot-pulse {
    border-color: var(--secondary-color);
}

@keyframes chatPulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }

    70% {
        transform: scale(1.7);
        opacity: 0;
    }

    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

/* ---- Landing animation (page load) ---- */
@keyframes chatLanding {
    0% {
        transform: translate(160px, -300px) rotate(-25deg) scale(0.5);
        opacity: 0;
    }

    60% {
        transform: translate(0, 10px) rotate(4deg) scale(1.08);
        opacity: 1;
    }

    80% {
        transform: translate(0, -6px) rotate(-2deg) scale(0.97);
        opacity: 1;
    }

    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
}

.chat-landing {
    animation: chatLanding 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ---- Fly-away animation (when chat window closes) ---- */
@keyframes chatFlyAway {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    40% {
        transform: translate(20px, -60px) rotate(15deg) scale(1.15);
    }

    70% {
        transform: translate(60px, -30px) rotate(8deg) scale(0.9);
    }

    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
}

.chat-fly-away {
    animation: chatFlyAway 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ---- Chat Window ---- */
#chatbot-window {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 360px;
    max-height: 540px;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    transform-origin: bottom right;
    animation: chatSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;

    /* Batman dark variables (defaults) */
    --chat-bg: #111115;
    --chat-header-bg: #1a1a1f;
    --chat-border: rgba(240, 195, 48, 0.25);
    --chat-user-bubble: #f0c330;
    --chat-user-text: #111;
    --chat-bot-bubble: #232329;
    --chat-bot-text: #e0e0e0;
    --chat-input-bg: #1a1a1f;
    --chat-input-text: #e0e0e0;
    --chat-send-bg: #f0c330;
    --chat-send-text: #111;
    --chat-chip-bg: rgba(240, 195, 48, 0.12);
    --chat-chip-border: rgba(240, 195, 48, 0.35);
    --chat-chip-text: #f0c330;
    --chat-status: #4caf50;
    --chat-accent: #f0c330;
}

body.superman-theme #chatbot-window {
    --chat-bg: #f7f9fb;
    --chat-header-bg: #005b9f;
    --chat-border: rgba(0, 91, 159, 0.15);
    --chat-user-bubble: #ed1d24;
    --chat-user-text: #fff;
    --chat-bot-bubble: #e8eef5;
    --chat-bot-text: #1a2530;
    --chat-input-bg: #fff;
    --chat-input-text: #1a2530;
    --chat-send-bg: #005b9f;
    --chat-send-text: #fff;
    --chat-chip-bg: rgba(0, 91, 159, 0.08);
    --chat-chip-border: rgba(0, 91, 159, 0.3);
    --chat-chip-text: #005b9f;
    --chat-status: #4caf50;
    --chat-accent: #005b9f;
}

#chatbot-window.chatbot-hidden {
    display: none !important;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0px);
    }
}

/* ---- Header ---- */
#chatbot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--chat-header-bg);
    border-bottom: 1px solid var(--chat-border);
    flex-shrink: 0;
}

#chatbot-header-avatar {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    padding: 4px;
    flex-shrink: 0;
}

.chatbot-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#chatbot-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    letter-spacing: 1px;
    color: #fff;
}

.chatbot-status {
    font-size: 0.75rem;
    color: var(--chat-status);
    letter-spacing: 0.5px;
}

#chatbot-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: none;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

#chatbot-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ---- Message list ---- */
#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--chat-bg);
    scrollbar-width: thin;
    scrollbar-color: var(--chat-accent) transparent;
}

#chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--chat-accent);
    border-radius: 4px;
    opacity: 0.5;
}

.chat-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: msgPop 0.25s ease forwards;
    word-break: break-word;
}

@keyframes msgPop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-msg.bot {
    background: var(--chat-bot-bubble);
    color: var(--chat-bot-text);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-msg.user {
    background: var(--chat-user-bubble);
    color: var(--chat-user-text);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    font-weight: 500;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 12px 16px;
    background: var(--chat-bot-bubble);
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
    animation: msgPop 0.25s ease forwards;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--chat-accent);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ---- Quick-reply chips ---- */
#chatbot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    background: var(--chat-bg);
    border-top: 1px solid var(--chat-border);
    flex-shrink: 0;
}

.chip {
    background: var(--chat-chip-bg);
    border: 1px solid var(--chat-chip-border);
    color: var(--chat-chip-text);
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 0.78rem;
    font-family: var(--font-body);
    cursor: none;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.chip:hover {
    background: var(--chat-accent);
    color: var(--chat-bg);
    transform: translateY(-2px);
}

/* ---- Input area ---- */
#chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--chat-input-bg);
    border-top: 1px solid var(--chat-border);
    flex-shrink: 0;
}

#chatbot-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--chat-input-text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 6px 2px;
}

#chatbot-input::placeholder {
    color: rgba(128, 128, 128, 0.6);
}

#chatbot-send {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--chat-send-bg);
    color: var(--chat-send-text);
    font-size: 0.9rem;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

#chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    #chatbot-window {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 100px;
    }

    #chatbot-fab {
        right: 16px;
        bottom: 16px;
    }
}