/* Custom slider styling */
.slider {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #E5E7EB, #0A66C2);
    border-radius: 9999px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0A66C2;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0A66C2;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Focus states */
.slider:focus {
    outline: none;
}

.slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(10, 102, 194, 0.2), 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Toast animation */
@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#toast:not(.hidden) {
    animation: slide-in 0.3s ease-out;
}

/* Modal backdrop blur (optional enhancement) */
#email-modal {
    backdrop-filter: blur(4px);
}

/* LinkedIn post styling */
#generated-post {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
}

/* Smooth transitions for sections */
#form-section,
#result-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#form-section.hiding {
    opacity: 0;
    transform: translateY(-10px);
}

#result-section.showing {
    animation: fade-in 0.4s ease-out;
}

/* Button states */
button:active {
    transform: scale(0.98);
}

#copy-btn.copied {
    background-color: #059669;
}

/* Mobile touch improvements */
@media (max-width: 640px) {
    .slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    .slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
}

/* Prevent zoom on iOS input focus */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select,
    input[type="text"],
    input[type="email"] {
        font-size: 16px;
    }
}

/* High cringe shake animation (optional fun effect) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.shake {
    animation: shake 0.1s ease-in-out infinite;
}

/* Spin animation for loading */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}
