* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.logo-gradient {
    background: linear-gradient(135deg, #00f5d4 0%, #7209b7 50%, #f72585 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
}

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

.search-glow {
    background: linear-gradient(135deg, #00f5d4, #7209b7, #f72585, #00f5d4);
    background-size: 300% 300%;
    animation: glowPulse 4s ease infinite;
}

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

.thinking-orb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f5d4, #f72585);
    animation: orbPulse 1.5s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 245, 212, 0.4);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 30px 10px rgba(247, 37, 133, 0.3);
    }
}

.thinking-dot {
    animation: dotBounce 0.6s ease-in-out infinite;
}

@keyframes dotBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-slideUp {
    animation: slideUp 0.5s ease-out;
}

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

.explanation-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.explanation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 245, 212, 0.15);
}

.sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #00f5d4, transparent);
    border-radius: 50%;
    animation: sparkleFloat 1.5s ease-out forwards;
}

@keyframes sparkleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.tldr-section {
    position: relative;
    overflow: hidden;
}

.tldr-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 245, 212, 0.1) 0%, transparent 70%);
    animation: tldrGlow 3s ease-in-out infinite;
}

@keyframes tldrGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

button:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .logo-gradient {
        font-size: 2.5rem !important;
    }
    
    .explanation-card {
        padding: 1rem;
    }
}

/* Light mode adjustments */
.dark .explanation-card {
    background: #12121a;
}

body:not(.dark) .explanation-card {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

body:not(.dark) .tldr-section {
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(247, 37, 133, 0.1));
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}