.textflare-admin {
    font-family: Arial, sans-serif;
    padding: 20px;
    max-width: 800px;
}

.textflare-admin h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.config-section {
    margin-bottom: 20px;
}

.config-section h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.config-section label {
    display: block;
    margin-top: 10px;
}

.config-section input,
.config-section select {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
}

button {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #005a87;
}

.dashicons-trash {
    font-size: 20px;
    color: #ff0000;
}

.textflare-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px; /* Adjust as needed */
    overflow: hidden; /* Ensure the display area does not change size */
}

.textflare-item {
    animation-fill-mode: both;
    animation-iteration-count: infinite; /* Infinite iteration for continuous animation */
    opacity: 0;
}

@keyframes zoom {
    0% {
        transform: scale(0.2);
        opacity: 0;
    }
    50% {
        transform: scale(1.0);
        opacity: 1;
    }
    100% {
        transform: scale(0.2);
        opacity: 0;
    }
}

@keyframes fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.textflare-item.zoom {
    animation: zoom-in-out var(--zoom-duration) infinite;
}

.textflare-item.cube {
    animation: cube-rotate var(--cube-duration) infinite;
}

.textflare-item.fade {
    animation-name: fade;
}

.textflare-item.typewriter {
    opacity: 1;
}

@keyframes zoom-in-out {
    0%, 100% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes cube-rotate {
    0% {
        transform: rotateY(0);
        opacity: 0.75;
    }
    25% {
        transform: rotateY(90deg);
        opacity: 1;
    }
    50% {
        transform: rotateY(180deg);
        opacity: 1;
    }
    75% {
        transform: rotateY(270deg);
        opacity: 1;
    }
    100% {
        transform: rotateY(360deg);
        opacity: 0.75;
    }
}

/* Nowe CSS typewriter animacje - znacznie lepsze niż JavaScript */
.textflare-animation {
    position: relative;
}

.textflare-item.typewriter-css {
    /* font-family: 'Courier New', monospace; */
    border-right: 2px solid;
    white-space: nowrap;
    overflow: hidden;
    width: fit-content;
    animation: 
        typing-simple calc(var(--reveal-duration, 2000) * 0.7) steps(30, end),
        blink-cursor 0.75s step-end infinite,
        show-hide-cycle var(--reveal-duration, 2000) infinite;
    opacity: 0;
}

@keyframes typing-simple {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes show-hide-cycle {
    0%, 15% { opacity: 0; width: 0; }
    20%, 80% { opacity: 1; }
    85%, 100% { opacity: 0; }
}

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

/* Alternatywna animacja typewriter z efektem kasowania */
.textflare-item.typewriter-advanced {
    /* font-family: 'Courier New', monospace; */
    border-right: 2px solid;
    white-space: nowrap;
    overflow: hidden;
    width: fit-content;
    animation: 
        type-and-delete var(--reveal-duration, 3000) infinite,
        blink-cursor 0.75s step-end infinite;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes type-and-delete {
    0%, 10% { width: 0; opacity: 1; }
    40%, 60% { width: 100%; opacity: 1; }
    90%, 100% { width: 0; opacity: 0; }
}

/* Gładka animacja reveal */
.textflare-item.reveal {
    overflow: hidden;
    white-space: nowrap;
    width: fit-content;
    animation: reveal-smooth var(--reveal-duration, 2000) infinite;
    opacity: 0;
}

@keyframes reveal-smooth {
    0%, 20% { width: 0; opacity: 0; }
    50%, 70% { width: 100%; opacity: 1; }
    90%, 100% { width: 0; opacity: 0; }
}
