body {
    transition: background-color 0.3s ease, color 0.3s ease;
}
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.dark .glass-panel {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.gradient-text {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.dark .gradient-text {
    background: none;
    -webkit-text-fill-color: white;
    color: white;
}

/* Notification System Styles */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid #3b82f6;
}

.dark .toast {
    background: #1f2937;
    color: white;
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-content i {
    font-size: 1.2em;
}

.toast-success i { color: #10b981; }
.toast-error i { color: #ef4444; }

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 4px;
}

.toast-close:hover {
    color: #4b5563;
}

/* Modal Styles */
.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    /* Escape any flex parent */
    flex: none !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-box {
    background: #ffffff;
    padding: 32px;
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.dark .modal-box {
    background: #1f2937;
    background: linear-gradient(145deg, #1f2937, #111827);
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

/* Landing Page Styles */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1a 100%);
    overflow: hidden;
}

#bg-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.landing-hero {
    position: relative;
    z-index: 10;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.landing-logo {
    width: 150px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(79, 172, 254, 0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.landing-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.landing-subtitle {
    font-size: 1.5rem;
    color: #cbd5e1;
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.cta-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-weight: bold;
    padding: 1rem 3rem;
    border-radius: 9999px;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
    border: 2px solid rgba(255,255,255,0.1);
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.6);
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #60a5fa;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.dark .typing-indicator span {
    background-color: #93c5fd;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Message Content Formatting */
.message-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.message-content strong {
    font-weight: 700;
}

.message-content em {
    font-style: italic;
}
