/* Basic setup and background gradient animation */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #4f46e5 50%, #7c3aed 75%, #a855f7 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism effect for main containers */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Character selection card styling and hover effect */
.character-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 30px;
}

.character-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 1);
}

/* Trait tag styling for the modal */
.trait-tag {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trait-tag.selected {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border-color: transparent;
}

/* Animation for new messages appearing in the chat */
.message-bubble-animation {
    animation: messageSlideUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes messageSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* General fade-in and fade-out animations for screen transitions */
.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-out-down {
    animation: fadeOutDown 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes fadeOutDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(40px); }
}

/* Input field styling */
.form-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Chat-specific input styling */
.chat-input {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.chat-input:focus {
    background: white;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Custom scrollbar styling */
.scrollbar-custom::-webkit-scrollbar { width: 6px; }
.scrollbar-custom::-webkit-scrollbar-track { background: transparent; }
.scrollbar-custom::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 3px; }
.scrollbar-custom::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.5); }

/* Floating particle background effect */
.floating-particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float 25s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10%, 90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* Header and button styling */
.header-title {
    font-family: 'Poppins', sans-serif;
    color: white;
    text-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
}
.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
