/* ============================================
   Help Me Post — Custom Styles
   ============================================ */

/* Animations */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out both;
}

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

.animate-pulse-slow {
    animation: pulse-slow 6s ease-in-out infinite;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-600 {
    animation-delay: 600ms;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* Scroll animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar styles */
#navbar {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Select styling */
select option {
    background: #1e293b;
    color: white;
    padding: 8px;
}

/* Textarea custom */
textarea::-webkit-scrollbar {
    width: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
}

/* Loading shimmer */
.loading-shimmer {
    background: linear-gradient(
        90deg,
        rgba(99, 102, 241, 0.05) 0%,
        rgba(99, 102, 241, 0.15) 50%,
        rgba(99, 102, 241, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Copy tooltip animation */
.copy-tooltip.show {
    opacity: 1 !important;
}

/* Typewriter effect for output */
.typewriter-char {
    display: inline;
    animation: typewriter 0.03s ease-out both;
}

/* Gradient border effect on hover */
.gradient-border-hover {
    position: relative;
}

.gradient-border-hover::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0) 0%, rgba(99, 102, 241, 0.3) 50%, rgba(236, 72, 153, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.gradient-border-hover:hover::before {
    opacity: 1;
}

/* Platform colors */
.platform-instagram { --platform-color: #E4405F; }
.platform-facebook { --platform-color: #1877F2; }
.platform-linkedin { --platform-color: #0A66C2; }
.platform-twitter { --platform-color: #000000; }
.platform-tiktok { --platform-color: #000000; }
.platform-threads { --platform-color: #000000; }

/* Button press effect */
#generate-btn:active {
    transform: scale(0.98);
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

/* Mobile improvements */
@media (max-width: 640px) {
    #output-text {
        font-size: 0.9375rem;
    }
}
