:root {
    --el-base: #0e0520;
    --el-base-hover: #1c0a3d;
    --el-base-active: #2a0f5c;
    --el-base-border: rgba(198, 169, 254, 0.28);
    --el-base-subtle: #c6a9fe;
    --el-base-primary: #ffffff;
    --el-accent: #ccff00;
    --el-accent-hover: #b8e600;
    --el-accent-primary: #080214;
}

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

body {
    background-color: var(--el-base);
    color: var(--el-base-primary);
    font-family: 'Tajawal', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 1rem 1.25rem 1.5rem;
    /* Tech grid background */
    background-image:
        linear-gradient(rgba(198, 169, 254, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(198, 169, 254, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Background Glow Elements */
.glow-effect {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    will-change: transform;
    contain: strict;
}

.purple-glow {
    width: min(650px, 90vw);
    height: min(650px, 90vw);
    background: radial-gradient(circle, rgba(122, 0, 255, 0.45) 0%, rgba(122, 0, 255, 0) 70%);
    top: -100px;
    right: -100px;
}

.lime-glow {
    width: min(550px, 80vw);
    height: min(550px, 80vw);
    background: radial-gradient(circle, rgba(200, 254, 52, 0.35) 0%, rgba(200, 254, 52, 0) 70%);
    bottom: -100px;
    left: -100px;
}

/* ========================================================
   TOP HEADER (Official Organizers & Technical Partner)
======================================================== */
.site-header {
    width: 100%;
    max-width: 1050px;
    background: rgba(14, 5, 32, 0.82);
    border: 1px solid var(--el-base-border);
    border-radius: 20px;
    padding: 0.65rem 1.4rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55), 0 0 25px rgba(122, 0, 255, 0.15);
    z-index: 50;
    position: relative;
    transition: all 0.3s ease;
}

.header-organizers {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-logo-link {
    display: flex;
    align-items: center;
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.95;
    text-decoration: none;
}

.header-logo-link:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.medai-header-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.chamber-header-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.mcit-header-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.header-divider {
    width: 1px;
    height: 26px;
    background: rgba(198, 169, 254, 0.25);
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Technical Partner Badge */
.tech-partner-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(122, 0, 255, 0.15);
    border: 1px solid rgba(198, 169, 254, 0.25);
    padding: 0.3rem 0.85rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tech-partner-box:hover {
    background: rgba(122, 0, 255, 0.25);
    border-color: rgba(204, 255, 0, 0.4);
    box-shadow: 0 0 15px rgba(204, 255, 0, 0.15);
}

.tech-partner-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--el-base-subtle);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.novay-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.novay-logo-img {
    height: 17px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.novay-logo-img:hover {
    transform: scale(1.08);
}

/* Language Switcher */
#lang-switch-btn {
    background: rgba(14, 5, 32, 0.85);
    border: 1px solid var(--el-base-border);
    color: var(--el-base-primary);
    padding: 0.4rem 1.05rem;
    border-radius: 18px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

#lang-switch-btn:hover {
    background: rgba(204, 255, 0, 0.12);
    border-color: var(--el-accent);
    color: var(--el-accent);
    box-shadow: 0 0 16px rgba(204, 255, 0, 0.25);
    transform: translateY(-1px);
}

/* ========================================================
   MAIN CONTENT & AGENT CARD
======================================================== */
.main-layout {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.agent-container {
    background: rgba(14, 5, 32, 0.78);
    border: 1px solid var(--el-base-border);
    border-radius: 26px;
    padding: 2rem 1.75rem 1.75rem;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(72, 0, 165, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
}

/* Avatar Section */
.avatar-wrapper {
    position: relative;
    width: 220px;
    height: 250px;
    margin-bottom: 1.15rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-image {
    width: 220px;
    height: 250px;
    border-radius: 18px;
    object-fit: cover;
    object-position: top;
    border: 3px solid var(--el-accent);
    box-shadow: 0 0 35px rgba(204, 255, 0, 0.35), 0 0 15px rgba(122, 0, 255, 0.5);
    z-index: 2;
    position: relative;
    transition: transform 0.3s ease;
    will-change: transform;
}

.avatar-wrapper:hover .avatar-image {
    transform: scale(1.02);
}

.avatar-ring {
    display: none;
}

/* ElevenLabs Widget Container */
.widget-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 10;
}

elevenlabs-convai {
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    inset: auto !important;
    z-index: 10 !important;
}

/* Agent Information */
.agent-info {
    text-align: center;
    z-index: 2;
    width: 100%;
}

.agent-info h1 {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 40%, var(--el-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.agent-info p {
    color: var(--el-base-subtle);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ========================================================
   FOOTER (Powered by Novay AI)
======================================================== */
.site-footer {
    width: 100%;
    max-width: 1050px;
    margin-top: 2.5rem;
    padding: 1.5rem 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    text-align: center;
    z-index: 10;
    position: relative;
    border-top: 1px solid rgba(198, 169, 254, 0.16);
}

.footer-powered {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer-novay-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.footer-novay-link:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 8px rgba(204, 255, 0, 0.4));
}

.footer-novay-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
}

.footer-meta {
    font-size: 0.84rem;
    color: rgba(198, 169, 254, 0.5);
    line-height: 1.6;
}

.footer-novay-highlight {
    color: var(--el-accent);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.footer-novay-highlight:hover {
    opacity: 0.85;
}

/* ========================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
======================================================== */
@media (max-width: 900px) {
    .site-header {
        flex-direction: column;
        padding: 1rem 1.25rem;
        gap: 1rem;
        border-radius: 18px;
    }

    .header-organizers {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(198, 169, 254, 0.14);
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem 0.75rem 2rem;
    }

    .site-header {
        margin-bottom: 1.5rem;
        padding: 0.85rem;
        gap: 0.85rem;
    }

    .header-organizers {
        gap: 0.85rem;
    }

    .medai-header-logo {
        height: 28px;
    }

    .chamber-header-logo {
        height: 26px;
    }

    .mcit-header-logo {
        height: 22px;
    }

    .header-divider {
        height: 20px;
    }

    .header-actions {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .tech-partner-box {
        padding: 0.3rem 0.65rem;
        gap: 0.5rem;
    }

    .tech-partner-label {
        font-size: 0.72rem;
    }

    .novay-logo-img {
        height: 15px;
    }

    #lang-switch-btn {
        padding: 0.4rem 0.85rem;
        font-size: 0.82rem;
    }

    .agent-container {
        padding: 2rem 1.25rem 1.75rem;
        border-radius: 22px;
    }

    .avatar-wrapper {
        width: 200px;
        height: 225px;
        margin-bottom: 1.25rem;
    }

    .avatar-image {
        width: 200px;
        height: 225px;
    }

    .agent-info h1 {
        font-size: 1.85rem;
    }

    .agent-info p {
        font-size: 0.95rem;
    }

    .site-footer {
        margin-top: 1.75rem;
        padding-top: 1.25rem;
    }

    .footer-meta {
        font-size: 0.75rem;
    }
}