/* CSS Text Animation Generator Styles */

/* General Styles */
.card {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    margin-bottom: 30px;
}

.card-header {
    padding: 15px 20px;
}

.card-body {
    padding: 25px;
}

/* Floating Preview Button */
.floating-preview-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #4361ee;
    color: white;
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-preview-btn:hover {
    background-color: #3a56d4;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* Preview Area */
#previewArea {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 5px;
}

#animationPreview, #modalPreview {
    font-size: 24px;
    display: inline-block;
    padding: 10px;
}

/* Code Container */
.code-container {
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
}

pre {
    margin: 0;
    white-space: pre-wrap;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.form-control-color {
    width: 50px;
    padding: 5px;
}

/* Enhanced Text Input */
.text-input-container {
    position: relative;
    margin-bottom: 2rem;
}

.text-input-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-control-lg {
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
}

.form-control-lg:focus {
    border-color: #4361ee;
    background: #ffffff;
    transform: translateY(-2px);
}

.text-input-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #4361ee, #7e3af2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.form-control-lg:focus + .text-input-decoration {
    transform: scaleX(1);
}

/* Range Sliders */
.range-slider-container {
    position: relative;
    padding: 0 10px;
    margin-bottom: 1.5rem;
}

.custom-range {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4361ee;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.custom-range::-webkit-slider-thumb:hover {
    background: #3a56d4;
    transform: scale(1.1);
}

.custom-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4361ee;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    border: none;
}

.custom-range::-moz-range-thumb:hover {
    background: #3a56d4;
    transform: scale(1.1);
}

.range-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Sticky Preview */
.sticky-top {
    position: sticky;
    top: 20px;
}

/* Info Boxes */
.info-box {
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.lead {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Animation Classes */
/* Fade Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Slide Animations */
@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes slideOutUp {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100%); opacity: 0; }
}

@keyframes slideOutDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(100%); opacity: 0; }
}

/* Zoom Animations */
@keyframes zoomIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes zoomOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0); opacity: 0; }
}

/* Rotate Animations */
@keyframes rotateIn {
    from { transform: rotate(-360deg) scale(0); opacity: 0; }
    to { transform: rotate(0) scale(1); opacity: 1; }
}

@keyframes rotateOut {
    from { transform: rotate(0) scale(1); opacity: 1; }
    to { transform: rotate(360deg) scale(0); opacity: 0; }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

/* Flip Animations */
@keyframes flipX {
    0% { transform: perspective(400px) rotateX(90deg); opacity: 0; }
    40% { transform: perspective(400px) rotateX(-10deg); }
    70% { transform: perspective(400px) rotateX(10deg); }
    100% { transform: perspective(400px) rotateX(0deg); opacity: 1; }
}

@keyframes flipY {
    0% { transform: perspective(400px) rotateY(90deg); opacity: 0; }
    40% { transform: perspective(400px) rotateY(-10deg); }
    70% { transform: perspective(400px) rotateY(10deg); }
    100% { transform: perspective(400px) rotateY(0deg); opacity: 1; }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Typing Animation */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: black; }
}

/* Rainbow Text Animation */
@keyframes rainbow {
    0% { color: red; }
    14% { color: orange; }
    28% { color: yellow; }
    42% { color: green; }
    57% { color: blue; }
    71% { color: indigo; }
    85% { color: violet; }
    100% { color: red; }
}

/* Glitch Animation */
@keyframes glitch {
    0% {
        transform: translate(0);
        text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9;
    }
    10% {
        transform: translate(-2px, -2px);
        text-shadow: 3px 0 #ff00c1, -3px 0 #00fff9;
    }
    20% {
        transform: translate(2px, 2px);
        text-shadow: -3px 0 #ff00c1, 3px 0 #00fff9;
    }
    30% {
        transform: translate(-2px, 2px);
        text-shadow: 3px 0 #ff00c1, -3px 0 #00fff9;
    }
    40% {
        transform: translate(2px, -2px);
        text-shadow: -3px 0 #ff00c1, 3px 0 #00fff9;
    }
    50% {
        transform: translate(0);
        text-shadow: 2px 0 #ff00c1, -2px 0 #00fff9;
    }
    60% {
        transform: translate(2px, 2px);
        text-shadow: -3px 0 #ff00c1, 3px 0 #00fff9;
    }
    70% {
        transform: translate(-2px, -2px);
        text-shadow: 3px 0 #ff00c1, -3px 0 #00fff9;
    }
    80% {
        transform: translate(0);
        text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9;
    }
    90% {
        transform: translate(2px, -2px);
        text-shadow: -3px 0 #ff00c1, 3px 0 #00fff9;
    }
    100% {
        transform: translate(0);
        text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9;
    }
}

/* Blur Animation */
@keyframes blur {
    0% {
        filter: blur(12px);
        opacity: 0;
    }
    100% {
        filter: blur(0px);
        opacity: 1;
    }
}

/* Neon Glow Animation */
@keyframes neon {
    0%, 100% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #0073e6, 0 0 20px #0073e6, 0 0 25px #0073e6, 0 0 30px #0073e6, 0 0 35px #0073e6;
    }
    50% {
        text-shadow: 0 0 2px #fff, 0 0 5px #fff, 0 0 7px #0073e6, 0 0 10px #0073e6, 0 0 12px #0073e6, 0 0 15px #0073e6, 0 0 17px #0073e6;
    }
}

/* Wave Animation */
@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    20% {
        transform: translateY(-10px);
    }
    40% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(-5px);
    }
    80% {
        transform: translateY(5px);
    }
}

/* 3D Flip Animation */
@keyframes flip3d {
    0% {
        transform: perspective(400px) rotateY(0);
        animation-timing-function: ease-out;
    }
    40% {
        transform: perspective(400px) translateZ(150px) rotateY(170deg);
        animation-timing-function: ease-out;
    }
    50% {
        transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
        animation-timing-function: ease-in;
    }
    80% {
        transform: perspective(400px) rotateY(360deg) scale(.95);
        animation-timing-function: ease-in;
    }
    100% {
        transform: perspective(400px) scale(1);
        animation-timing-function: ease-in;
    }
}

/* Letter by Letter Animation */
@keyframes letterByLetter {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient Flow Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
        background-size: 200% 200%;
    }
    50% {
        background-position: 100% 50%;
        background-size: 200% 200%;
    }
    100% {
        background-position: 0% 50%;
        background-size: 200% 200%;
    }
}

/* Shadow Dance Animation */
@keyframes shadow {
    0% {
        text-shadow: 0 0 5px rgba(0,0,0,0.1);
        transform: translateY(0);
    }
    25% {
        text-shadow: 5px 5px 10px rgba(0,0,0,0.2);
        transform: translateY(-5px);
    }
    50% {
        text-shadow: 10px 10px 15px rgba(0,0,0,0.3);
        transform: translateY(0);
    }
    75% {
        text-shadow: -5px 5px 10px rgba(0,0,0,0.2);
        transform: translateY(5px);
    }
    100% {
        text-shadow: 0 0 5px rgba(0,0,0,0.1);
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .card-body {
        padding: 15px;
    }

    .floating-preview-btn {
        bottom: 20px;
        right: 20px;
        padding: 8px 15px;
    }

    #animationPreview, #modalPreview {
        font-size: 20px;
    }
}
