:root {
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --secondary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --dark-bg: #0a0a0a;
    --card-bg: rgba(15, 23, 42, 0.8);
    --glass-bg: rgba(30, 41, 59, 0.4);
    --neon-blue: #3b82f6;
    --neon-purple: #8b5cf6;
    --text-light: #f8fafc;
    --border-color: rgba(148, 163, 184, 0.2);
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
}

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

body {
    background: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0a 0%, #111827 100%);
}

.bg-animated::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 49%, rgba(59, 130, 246, 0.03) 50%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, rgba(16, 185, 129, 0.03) 50%, transparent 51%);
    background-size: 40px 40px;
    animation: subtle-move 30s ease-in-out infinite;
}

@keyframes subtle-move {

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

    50% {
        transform: translateX(20px) translateY(-20px);
        opacity: 0.8;
    }
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px -3px rgba(0, 0, 0, 0.2),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.navbar-custom {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.ai-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.2),
        0 0 0 8px rgba(59, 130, 246, 0.1),
        0 8px 32px rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
}

.ai-avatar::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--neon-blue), transparent);
    animation: rotate-ring 8s linear infinite;
    z-index: -1;
}

.ai-avatar::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: pulse-inner 3s ease-in-out infinite;
}

@keyframes rotate-ring {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-inner {

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

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.call-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    background: var(--glass-bg);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    margin: 24px 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    box-shadow: 0 0 12px var(--success-color);
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {

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

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.control-button {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.control-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-call {
    background: var(--success-color);
    color: white;
}

.btn-call:hover {
    background: #059669;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-end {
    background: var(--danger-color);
    color: white;
}

.btn-end:hover {
    background: #dc2626;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

.btn-mute {
    background: var(--glass-bg);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-mute:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: var(--neon-blue);
}

.conversation-area {
    max-height: 420px;
    overflow-y: auto;
    padding: 24px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.conversation-area::-webkit-scrollbar {
    width: 6px;
}

.conversation-area::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 3px;
}

.conversation-area::-webkit-scrollbar-thumb {
    background: var(--neon-blue);
    border-radius: 3px;
}

.conversation-area::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

.message {
    margin-bottom: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    max-width: 85%;
    animation: message-slide 0.3s ease-out;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message.ai {
    background: linear-gradient(135deg, var(--neon-blue) 0%, #1e40af 100%);
    margin-left: 0;
    margin-right: auto;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.message.user {
    background: var(--glass-bg);
    margin-left: auto;
    margin-right: 0;
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

@keyframes message-slide {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.form-control {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-light) !important;
    transition: all 0.2s ease;
}

.form-control:focus {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: var(--neon-blue) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
}

.btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-1px);
}

.stats-card {
    text-align: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.stats-card:hover {
    background: rgba(30, 41, 59, 0.6);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
    background-clip: text;
    margin-bottom: 4px;
}

.floating-particles {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--neon-blue);
    border-radius: 50%;
    animation: float-particle 20s infinite linear;
    opacity: 0.4;
}

.particle:nth-child(even) {
    background: var(--success-color);
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.4;
    }

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

.voice-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 16px 0;
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.wave-bar {
    width: 3px;
    background: linear-gradient(to top, var(--neon-blue), #60a5fa);
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1) {
    height: 16px;
    animation-delay: 0s;
}

.wave-bar:nth-child(2) {
    height: 28px;
    animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
    height: 20px;
    animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
    height: 32px;
    animation-delay: 0.3s;
}

.wave-bar:nth-child(5) {
    height: 24px;
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.7;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Feature cards styling */
.glass-card .fa-3x {
    margin-bottom: 16px !important;
    /* filter: drop-shadow(0 0 8px currentColor); */
}

h5 {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light);
}

.text-muted {
    color: #94a3b8 !important;
    font-size: 0.875rem;
}


footer {
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin-top: 40px;
    font-size: 0.95rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .ai-avatar {
        width: 140px;
        height: 140px;
        margin-top: 25px;
        margin-bottom: 60px;
    }

    .control-button {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }

    .conversation-area {
        max-height: 300px;
        padding: 16px;
    }

    .navbar-nav {
        display: none;
    }
}

#aiMood {
    /* display: inline-block; */
    transition: transform 0.25s, filter 0.25s;
}

#aiMood.mood-animate {
    animation: mood-bounce 0.4s;
    filter: drop-shadow(0 0 8px var(--neon-blue));
}

@keyframes mood-bounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.3) rotate(-8deg);}
    60%  { transform: scale(0.95) rotate(6deg);}
    100% { transform: scale(1); }
}