.cybrrr-word-counter {
    display: grid;
    gap: 22px;
}

.cybrrr-wc-header {
    max-width: 760px;
}

.cybrrr-wc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    gap: 20px;
}

.cybrrr-wc-input-wrap,
.cybrrr-wc-results {
    background: var(--cybrrr-panel);
    border: 1px solid rgba(210, 215, 220, .14);
    border-radius: 16px;
    padding: 18px;
}

.cybrrr-wc-input-wrap label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.cybrrr-wc-input {
    width: 100%;
    min-height: 260px;
    resize: vertical;
    color: var(--cybrrr-text);
    background: #000;
    border: 1px solid rgba(210, 215, 220, .2);
    border-radius: 14px;
    padding: 14px;
    font: inherit;
    line-height: 1.55;
}

.cybrrr-wc-input:focus {
    outline: 2px solid var(--cybrrr-green);
    border-color: var(--cybrrr-green);
}

.cybrrr-wc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.cybrrr-wc-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: var(--cybrrr-green);
    cursor: pointer;
    font-weight: 700;
}

.cybrrr-wc-btn:hover {
    background: var(--cybrrr-green-dark);
}

.cybrrr-wc-btn-secondary {
    background: #1E2B1A;
}

.cybrrr-wc-results {
    display: grid;
    gap: 12px;
}

.cybrrr-wc-results div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,.04);
    border-radius: 12px;
}

.cybrrr-wc-results strong {
    color: var(--cybrrr-green);
    font-size: 1.35rem;
}

.cybrrr-wc-results span,
.cybrrr-wc-message {
    color: var(--cybrrr-muted);
}

@media (max-width: 760px) {
    .cybrrr-wc-grid {
        grid-template-columns: 1fr;
    }

    .cybrrr-wc-input {
        min-height: 220px;
    }
}

/* Hele tool-container: vloeiende bewegende border */
.cybrrr-word-counter {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(57, 167, 81, .18);
}

.cybrrr-word-counter::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--cybrrr-border-angle),
        transparent 0deg,
        transparent 80deg,
        #39A751 120deg,
        #2F9946 155deg,
        transparent 210deg,
        transparent 360deg
    );
    animation: cybrrr-border-spin 7s linear infinite;
    pointer-events: none;

    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
}

.cybrrr-word-counter > * {
    position: relative;
    z-index: 1;
}

/* Tekstvak: zelfde animatie, blijft werken bij resize */
.cybrrr-wc-input {
    border: 1px solid transparent;
    background:
        linear-gradient(#000, #000) padding-box,
        conic-gradient(
            from var(--cybrrr-border-angle),
            transparent 0deg,
            transparent 80deg,
            #39A751 120deg,
            #2F9946 155deg,
            transparent 210deg,
            transparent 360deg
        ) border-box;
    animation: cybrrr-border-spin 4s linear infinite;
}

.cybrrr-wc-input:focus {
    outline: none;
}

/* Maakt --cybrrr-border-angle soepel animeerbaar */
@property --cybrrr-border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes cybrrr-border-spin {
    from {
        --cybrrr-border-angle: 0deg;
    }
    to {
        --cybrrr-border-angle: 360deg;
    }
}

/* Voorbeeldtekst dropdown */
.cybrrr-wc-sample-wrap {
    position: relative;
}

.cybrrr-wc-sample-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    display: grid;
    gap: 8px;
    min-width: 180px;
    opacity: 0;
    pointer-events: none;
}

.cybrrr-wc-sample-menu button {
    transform: translateY(10px) scale(.96);
    opacity: 0;
    border: 1px solid rgba(57, 167, 81, .35);
    border-radius: 999px;
    padding: 9px 13px;
    color: #fff;
    background: linear-gradient(135deg, #1E2B1A, #39A751);
    cursor: pointer;
    transition: transform .22s ease, opacity .22s ease, background .22s ease;
}

.cybrrr-wc-sample-wrap:hover .cybrrr-wc-sample-menu,
.cybrrr-wc-sample-wrap:focus-within .cybrrr-wc-sample-menu {
    opacity: 1;
    pointer-events: auto;
}

.cybrrr-wc-sample-wrap:hover .cybrrr-wc-sample-menu button,
.cybrrr-wc-sample-wrap:focus-within .cybrrr-wc-sample-menu button {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.cybrrr-wc-sample-menu button:nth-child(1) { transition-delay: .03s; }
.cybrrr-wc-sample-menu button:nth-child(2) { transition-delay: .08s; }
.cybrrr-wc-sample-menu button:nth-child(3) { transition-delay: .13s; }

/* Meldingen */
.cybrrr-wc-message.is-bounce {
    animation: cybrrr-message-bounce .45s ease;
    color: #fff;
}

@keyframes cybrrr-message-bounce {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.12); }
    65% { transform: scale(.94); }
}

/* Wissen-knop vlucht na spam */
.cybrrr-wc-btn.is-running-away {
    position: relative;
    transition: transform .16s ease;
}

/* Undo knop */
.cybrrr-wc-icon-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #1E2B1A;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.cybrrr-wc-icon-btn:not([hidden]) {
    display: inline-grid;
    place-items: center;
    animation: cybrrr-undo-pop .25s ease;
}

@keyframes cybrrr-undo-pop {
    from { transform: scale(.65) rotate(-18deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

/* Pacman spam animatie */
.cybrrr-wc-pacman {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    pointer-events: none;
    overflow: hidden;
}

.cybrrr-wc-pacman span {
    display: block;
    font-size: clamp(90px, 18vw, 240px);
    color: #39A751;
    transform: translateX(-120%);
}

.cybrrr-wc-pacman.is-active {
    display: flex;
}

.cybrrr-wc-pacman.is-active span {
    animation: cybrrr-pacman-eat 1.15s ease-in-out forwards;
}

@keyframes cybrrr-pacman-eat {
    0% { transform: translateX(-120%) scale(1); }
    55% { transform: translateX(42vw) scale(1.25); }
    100% { transform: translateX(120vw) scale(1); }
}