/* =========================================================================
   AI Skyforge - Stylesheet
   ========================================================================= */

/* Root variables & design tokens */
:root {
    --bg-dark: #050508;
    --bg-card: rgba(14, 15, 23, 0.7);
    --bg-card-hover: rgba(22, 23, 35, 0.8);
    --border-color: rgba(46, 51, 78, 0.4);
    --border-color-hover: rgba(0, 242, 254, 0.4);
    
    /* Brand Gradients & Accents */
    --accent-cyan: #00f2fe;
    --accent-violet: #9b51e0;
    --accent-orange: #ff5e62;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --grad-primary: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
    --grad-primary-alt: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
    --shadow-glow-cyan: 0 0 20px rgba(0, 242, 254, 0.25);
    --shadow-glow-violet: 0 0 20px rgba(155, 81, 224, 0.25);
    
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

/* Base Styles & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients & Grids */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.22;
    mix-blend-mode: screen;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-cyan);
    top: -200px;
    right: -100px;
    animation: float-slow 25s infinite alternate;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-violet);
    bottom: -150px;
    left: -100px;
    animation: float-slow 30s infinite alternate-reverse;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-orange);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    animation: float-slow 20s infinite alternate;
}

@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.15); }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    z-index: -1;
    pointer-events: none;
}

/* Typography Utilities */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-alt {
    background: var(--grad-primary-alt);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism Panel styles */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.glass-panel:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation Header */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    color: var(--accent-cyan);
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.6));
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Drawer / Mobile Menu */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: #090a10;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 200;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-drawer {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drawer-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 500;
}

.drawer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 10px 0;
}

/* Button UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
}

.btn-icon {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

.btn-icon-right {
    margin-left: 8px;
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.btn:hover .btn-icon-right {
    transform: translateX(4px);
}

.btn-primary {
    background: var(--grad-primary);
    color: #000;
    box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.5);
    background: linear-gradient(135deg, #00f2fe 30%, #a25df5 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

/* Badge Utility */
.badge-container {
    display: inline-block;
    margin-bottom: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--accent-cyan);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Hero Section */
.hero-section {
    padding-top: 180px;
    padding-bottom: 120px;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 64px;
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 40px auto;
    font-weight: 400;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Section Common Header */
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 64px auto;
}

.section-title {
    font-size: 38px;
    margin-bottom: 16px;
    font-weight: 800;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
}

/* Features Section */
.features-section {
    padding: 100px 0;
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature-card {
    background: rgba(14, 15, 23, 0.5);
    border: 1px solid var(--border-color);
    padding: 40px 32px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: var(--bg-card-hover);
}

.feature-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.feature-icon {
    width: 28px;
    height: 28px;
}

.cyan-glow {
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.violet-glow {
    background: rgba(155, 81, 224, 0.08);
    border: 1px solid rgba(155, 81, 224, 0.2);
    color: var(--accent-violet);
    box-shadow: 0 0 15px rgba(155, 81, 224, 0.1);
}

.orange-glow {
    background: rgba(255, 94, 98, 0.08);
    border: 1px solid rgba(255, 94, 98, 0.2);
    color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 94, 98, 0.1);
}

.feature-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
}

.feature-card-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Forge Section */
.forge-section {
    padding: 100px 0;
    position: relative;
}

.forge-grid {
    display: grid;
    grid-template-columns: 430px 1fr;
    gap: 32px;
    align-items: stretch;
}

.forge-panel-control {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
    margin-bottom: 8px;
}

.panel-header-icon {
    color: var(--accent-cyan);
    width: 22px;
    height: 22px;
}

.panel-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.specialty-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.specialty-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.specialty-btn i {
    width: 18px;
    height: 18px;
}

.specialty-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.specialty-btn.active {
    background: rgba(0, 242, 254, 0.06);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

.select-input {
    background: #090a10;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.select-input:focus {
    border-color: var(--accent-cyan);
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-cyan);
}

.slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 8px var(--accent-cyan);
    transition: transform 0.1s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    color: var(--text-secondary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-cyan);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.btn-glow-anim {
    position: relative;
    overflow: hidden;
}

.btn-glow-anim:after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
}

.btn-glow-anim:hover:after {
    left: 150%;
}

/* Output Terminal */
.forge-panel-output {
    display: flex;
    flex-direction: column;
    background: #040509 !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-header {
    height: 48px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.terminal-title {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.terminal-icon-indicator {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.terminal-body {
    flex-grow: 1;
    padding: 24px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #a9b2c3;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 450px;
    max-height: 520px;
}

.term-line {
    word-break: break-all;
    line-height: 1.5;
}

.term-line.system {
    color: var(--text-muted);
}

.term-line.command {
    color: var(--accent-cyan);
}

.term-line.success {
    color: #27c93f;
    font-weight: bold;
}

.term-line.process {
    color: var(--accent-violet);
}

.term-line.output {
    color: var(--text-primary);
}

/* Showcase Section */
.showcase-section {
    padding: 100px 0;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.agent-node-card {
    padding: 24px;
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 16px;
}

.node-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.node-name {
    font-size: 18px;
    font-weight: 700;
}

.node-class {
    font-size: 13px;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: rgba(39, 201, 63, 0.08);
    border: 1px solid rgba(39, 201, 63, 0.2);
    color: #27c93f;
}

.status-active .status-dot {
    width: 6px;
    height: 6px;
    background-color: #27c93f;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.status-idle {
    background: rgba(255, 189, 46, 0.08);
    border: 1px solid rgba(255, 189, 46, 0.2);
    color: #ffbd2e;
}

.status-idle .status-dot {
    width: 6px;
    height: 6px;
    background-color: #ffbd2e;
    border-radius: 50%;
}

.node-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.stat-val {
    font-size: 16px;
    font-weight: 700;
}

/* Footer Section */
.footer {
    background: #020306;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 80px 0 32px 0;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 320px;
}

.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links-group h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.footer-links-group a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links-group a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 13px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .forge-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 44px;
    }
    
    .hero-subtitle {
        font-size: 17px;
    }

    .features-grid, .showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links, .nav-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   AI Skyforge - Live Avatar Dashboard Styles
   ========================================================================= */

.avatar-hero-section {
    padding-top: 130px;
    padding-bottom: 80px;
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    position: relative;
}

.avatar-layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: stretch;
    width: 100%;
}

/* Avatar Canvas Panel */
.avatar-canvas-wrapper {
    display: flex;
    flex-direction: column;
    padding: 24px;
    height: 100%;
    min-height: 520px;
}

.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.connection-pulse {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

/* Connection States & Pulses */
.status-pulse-dot.offline {
    background-color: var(--accent-orange);
    box-shadow: 0 0 10px rgba(255, 94, 98, 0.6);
    animation: status-pulse-red 2s infinite;
}

.status-pulse-dot.connecting {
    background-color: #ffbd2e;
    box-shadow: 0 0 10px rgba(255, 189, 46, 0.6);
    animation: status-pulse-yellow 1.5s infinite;
}

.status-pulse-dot.listening {
    background-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
    animation: status-pulse-cyan 1.5s infinite;
}

.status-pulse-dot.speaking {
    background-color: var(--accent-violet);
    box-shadow: 0 0 10px rgba(155, 81, 224, 0.6);
    animation: status-pulse-violet 1s infinite;
}

@keyframes status-pulse-red {
    0% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(255, 94, 98, 0.6); }
    70% { opacity: 1; box-shadow: 0 0 0 8px rgba(255, 94, 98, 0); }
    100% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(255, 94, 98, 0); }
}
@keyframes status-pulse-yellow {
    0% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(255, 189, 46, 0.6); }
    70% { opacity: 1; box-shadow: 0 0 0 8px rgba(255, 189, 46, 0); }
    100% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(255, 189, 46, 0); }
}
@keyframes status-pulse-cyan {
    0% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.6); }
    70% { opacity: 1; box-shadow: 0 0 0 8px rgba(0, 242, 254, 0); }
    100% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}
@keyframes status-pulse-violet {
    0% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(155, 81, 224, 0.6); }
    70% { opacity: 1; box-shadow: 0 0 0 8px rgba(155, 81, 224, 0); }
    100% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(155, 81, 224, 0); }
}

.status-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.latency-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.latency-indicator i {
    width: 14px;
    height: 14px;
    color: var(--accent-cyan);
}

.canvas-body {
    position: relative;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(14, 15, 23, 0.3) 0%, transparent 70%);
}

#avatarCanvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    z-index: 1;
}

.canvas-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 2;
    background: rgba(5, 5, 8, 0.85);
    border: 1px solid var(--border-color);
    padding: 20px 24px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.canvas-hint.hidden {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.9);
}

.hint-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.6));
    animation: pulse 1.8s infinite;
}

.canvas-hint span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Console & Transcription Panel */
.avatar-console-wrapper {
    display: flex;
    flex-direction: column;
    padding: 24px;
    height: 100%;
    min-height: 520px;
    background: #040509 !important;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.console-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

.console-title i {
    width: 16px;
    height: 16px;
    color: var(--accent-cyan);
}

.console-settings-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.console-settings-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.console-settings-btn i {
    width: 18px;
    height: 18px;
}

.console-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 20px;
}

.transcript-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.transcript-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.transcript-box {
    background: #020306;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 16px;
    flex-grow: 1;
    min-height: 220px;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transcript-line {
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.transcript-line.system {
    color: var(--text-muted);
    font-style: italic;
    font-family: monospace;
    font-size: 12px;
}

.transcript-line.user {
    color: var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
    padding-left: 10px;
}

.transcript-line.model {
    color: var(--text-primary);
    border-left: 2px solid var(--accent-violet);
    padding-left: 10px;
}

.transcript-line .speaker-tag {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.02em;
    margin-right: 6px;
    display: inline-block;
}

/* Audio Feedback Meters */
.audio-feedback-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.audio-feedback-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.audio-feedback-item span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.audio-bar-wrapper {
    height: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.audio-bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.1s ease;
}

#micAudioBar {
    background: linear-gradient(90deg, #005f73 0%, var(--accent-cyan) 100%);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

#spkAudioBar {
    background: linear-gradient(90deg, #560bad 0%, var(--accent-violet) 100%);
    box-shadow: 0 0 8px rgba(155, 81, 224, 0.4);
}

.console-controls {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 12px;
}

/* Settings Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 3, 5, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.modal-close i {
    width: 18px;
    height: 18px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.help-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.help-text a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

/* Responsive Overrides */
@media (max-width: 968px) {
    .avatar-layout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .avatar-canvas-wrapper, .avatar-console-wrapper {
        min-height: auto;
    }
    
    .avatar-hero-section {
        padding-top: 110px;
        padding-bottom: 40px;
    }
}

