/* Custom Styling and Animations for BraviGenitori.it */

:root {
    --sage: #8BA888;
    --sage-dark: #4A5D4A;
    --terracotta: #D98E73;
    --cream: #FDFBF7;
}

html {
    scroll-behavior: smooth;
}

/* Custom Fade Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.sponsor-ticker {
    white-space: nowrap;
    will-change: transform;
    animation: ticker 18s linear infinite;
    display: inline-block;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 1.2s ease-out forwards;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Academy Grid Responsive Adjustments */
@media (max-width: 640px) {
    .academy-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 2rem;
        gap: 1rem;
        scroll-snap-type: x mandatory;
    }
    .academy-grid > div {
        min-width: 250px;
        scroll-snap-align: start;
    }
}

/* Glassmorphism effects */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Standard Chat Scroll Behavior */
::-webkit-scrollbar {
    width: 4px; /* Thin, modern scrollbar */
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 168, 136, 0.3); /* Sage transparent */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sage);
}

/* Dedicated Chat Page Layout */
.chat-page-body {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-page-header {
    flex-shrink: 0;
    z-index: 50;
}

.chat-page-messages {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem;
}

.chat-page-footer {
    flex-shrink: 0;
    padding-bottom: env(safe-area-inset-bottom, 1rem);
    background: white;
    border-top: 1px solid rgba(139, 168, 136, 0.1);
}
