/* Custom styles for Krishna - Divine Spiritual Guidance */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400;1,600&display=swap');

* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Cosmic Background */
.cosmic-bg {
    background: linear-gradient(135deg, #0f0c29 0%, #24243e 50%, #2b2d66 100%);
    background-size: 400% 400%;
    animation: cosmicShift 20s ease infinite;
    position: relative;
    overflow: hidden;
}

.cosmic-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
    animation: cosmicPulse 15s ease infinite alternate;
}

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

@keyframes cosmicPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

/* Smooth scrolling for chat container */
#chat-container {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
#chat-container::-webkit-scrollbar {
    width: 4px;
}

#chat-container::-webkit-scrollbar-track {
    background: transparent;
}

#chat-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

#chat-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-animate {
    animation: fadeIn 0.3s ease-out;
}

/* Focus styles */
#message-input:focus {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Enhanced button hover effects */
button {
    transition: all 0.3s ease-in-out;
}

button:hover:not(.ask-krishna-button) {
    transform: translateY(-2px);
}

button:active:not(.ask-krishna-button) {
    transform: translateY(0);
}

/* Chat message styling */
#chat-container .bg-gradient-to-r {
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Enhanced scrollbar for chat */
#chat-container::-webkit-scrollbar {
    width: 8px;
}

#chat-container::-webkit-scrollbar-track {
    background: rgba(251, 191, 36, 0.1);
    border-radius: 4px;
}

#chat-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #fbbf24, #ff6b35);
    border-radius: 4px;
}

#chat-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff6b35, #fbbf24);
}

/* Language toggle buttons */
.lang-btn {
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.lang-btn.active {
    background-color: white;
    color: #1e40af;
    font-weight: 600;
}

/* Voice button states */
#voice-btn.listening {
    background-color: #ef4444;
    animation: pulse 1.5s infinite;
}

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

/* Menu panel animation */
#menu-panel {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop-first responsive adjustments */
@media (max-width: 1024px) {
    .cosmic-text {
        font-size: 1.5rem;
    }
    
    .ask-krishna-button {
        font-size: 1.1rem;
        padding: 0.875rem 2rem;
    }
}

@media (max-width: 768px) {
    .quote-container {
        padding: 2rem;
    }
    
    #chat-modal .bg-white {
        width: 95%;
        height: 90%;
        margin: 1rem;
    }
    
    .cosmic-text {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    .ask-krishna-button {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .flute-decoration {
        width: 150px;
    }
}

/* PWA specific styles */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-gray-100 {
        background-color: #374151;
        color: white;
    }
    
    .text-gray-800 {
        color: #f3f4f6;
    }
    
    .text-gray-700 {
        color: #d1d5db;
    }
    
    .border-gray-300 {
        border-color: #4b5563;
    }
}

/* Loading animation for typing indicator */
@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.animate-bounce {
    animation: bounce 1.4s infinite;
}

/* Sanskrit/Devanagari font support */
.verse-text {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    line-height: 1.6;
}

/* Spiritual UI enhancements */
.om-glow {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.6), 0 0 60px rgba(251, 191, 36, 0.4);
    animation: omPulse 3s ease infinite;
}

@keyframes omPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.6), 0 0 60px rgba(251, 191, 36, 0.4); }
    50% { box-shadow: 0 0 50px rgba(251, 191, 36, 0.8), 0 0 80px rgba(251, 191, 36, 0.6); }
}

.cosmic-text {
    font-family: 'Crimson Text', serif;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    animation: textGlow 4s ease infinite alternate;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 20px rgba(251, 191, 36, 0.5); }
    100% { text-shadow: 0 0 30px rgba(251, 191, 36, 0.8), 0 0 40px rgba(251, 191, 36, 0.6); }
}

/* Ask Krishna Button */
.ask-krishna-button {
    background: linear-gradient(135deg, #fbbf24, #ff6b35);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.ask-krishna-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ask-krishna-button:hover::before {
    left: 100%;
}

.ask-krishna-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(251, 191, 36, 0.4);
}

/* Flute Decoration */
.flute-decoration {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, #fbbf24, #ff6b35, #fbbf24);
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
    animation: fluteGlow 3s ease infinite alternate;
}

.flute-decoration::before,
.flute-decoration::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #fbbf24, #ff6b35);
    border-radius: 50%;
    top: -4px;
}

.flute-decoration::before {
    left: 20%;
    animation: fluteNote 2s ease infinite;
}

.flute-decoration::after {
    right: 20%;
    animation: fluteNote 2s ease infinite 0.5s;
}

@keyframes fluteGlow {
    0% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
    100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.8); }
}

@keyframes fluteNote {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-lotus {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.lotus-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.lotus-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.lotus-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(-10px) rotate(-5deg); }
}

/* Quote Container */
.quote-container {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.quote-container:hover {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.wisdom-highlight {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    border-left: 4px solid #fbbf24;
    backdrop-filter: blur(5px);
}
