:root{
    --bg:            #1F1B23;
    --bg-alt:        #17131B;
    --surface:       #29222F;
    --surface-2:     #241E2A;
    --surface-hover: #342B3C;
    --border:        #3E3448;
    --border-strong: #5B4A72;
 
    --accent:        #A879FF;
    --accent-dim:    #6B4FA8;
    --accent-soft:   rgba(168,121,255,0.14);
 
    --gold:          #F0C36B;
 
    --text:          #F3EFF8;
    --text-dim:      #A99AB8;
    --text-faint:    #6E6180;
}

body{
    background: var(--bg);
    color: var(--text);
}

.Juhj-searc {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center; 
    gap:3px;
    & input {
        border: none;
        flex-grow: 1; 
        height: 100%; 
        outline: none;
        border-radius: 100px;
        background: var(--surface);
        border: 1px solid var(--border);
        color: var(--text);

        transition: all 0.2s ease-in-out;
        &::placeholder{
            color: var(--text-faint);
        }
        &:focus{
            border-color: var(--accent);
        }
    }
    & button {
        height: 100%;
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
        border-radius: 100px;
        border: none;
        cursor: pointer;
        transition: 0.2s ease;

        background-image:
            url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 7L7 17M7 7L17 17' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
            linear-gradient(-45deg, var(--accent) 10%, var(--accent-dim));

        background-repeat: no-repeat, no-repeat;
        background-position: center, center;
        background-size: 60%, cover;
    }
}

.Juhj-btn.filter{
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--surface);
    border: none;
    outline: 1px solid var(--border);
    outline-offset: -1px;
    border-radius: 100px;
    color: var(--text-dim);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out, outline-color 0.2s ease-in-out;
    &:hover{
        color: var(--text);
        outline-color: var(--accent);
    }
    &:focus-visible{
        outline-color: var(--accent);
    }
    &.active{
        outline-color: transparent;  
        background: linear-gradient(-45deg, var(--accent) 40%, var(--accent-dim));
        color: var(--text);

        &:hover{
            outline-color: transparent;
        }
        &:focus-visible{
            outline-color: transparent;
        }
    }
}


.Juhj-btn.radio{
    position: relative;
    display: flex; 
    align-items: center;
    background: var(--surface-2);
    border: none;
    outline: 1px solid var(--border);
    outline-offset: -1px;
    border-radius: 100px;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s;
    & input{ position: absolute; opacity: 0; pointer-events: none; }
    &:has(input:checked){
        background: linear-gradient(-45deg, var(--accent) 40%, var(--accent-dim));
        color: var(--text);
        border: none;
        outline-color: transparent; 
    }
}

.Juhj-btn.generate{
    background: linear-gradient(-45deg, var(--accent) 30%, var(--accent-dim));
    color: var(--text);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    letter-spacing: normal;
    text-transform: none;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.2s ease-in-out, background 0.2s ease-in-out;
    width: 100%;

    &.ghost{
        background: var(--surface-2);
        color: var(--text);
        border: 1px solid var(--border-strong);
        font-weight: 500;
        &:hover{ 
            background: var(--surface-hover); 
            filter: none; 
        }
    }

    &:hover { filter: brightness(1.12); }
    &:active { transform: scale(0.98); }
}

.Juhj-btn.action{
    position: relative;
    aspect-ratio: 1/1;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: var(--surface-2);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;

    &:hover{ 
        background: var(--surface-hover); 
        border-color: var(--accent);
    }

    &.download::after,
    &.copy::after,
    &.clear::after,
    &.refresh::after{
        content: "";
        position: absolute;
        inset: 0;
        margin: auto;
        width: 55%;
        height: 55%;

        background-color: var(--text-dim);
        transition: background-color 0.2s;

        mask-repeat: no-repeat;
        mask-position: center;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
        -webkit-mask-size: contain;
    }

    &.download::after{
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z'/%3E%3C/svg%3E");
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z'/%3E%3C/svg%3E");
    }
    &.copy::after{
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
    }
    &.clear::after{
        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M29.4384,16.5715l-7.985-7.9856a2.0014,2.0014,0,0,0-2.8291,0l-5.3584,5.3584L9,2H7L2,16H4l.999-3h6l.8035,2.4077L4.5858,22.6244a2,2,0,0,0,0,2.8282L9.1316,30h9.5908l10.716-10.717A1.9173,1.9173,0,0,0,29.4384,16.5715ZM5.6653,11l2.331-7,2.3355,7Zm12.229,17H9.96L6,24.0381l6.3123-6.3115L20.24,25.6538Zm3.76-3.76-7.9275-7.9272L20.0393,10l7.9268,7.9272Z'/></svg>");
        -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M29.4384,16.5715l-7.985-7.9856a2.0014,2.0014,0,0,0-2.8291,0l-5.3584,5.3584L9,2H7L2,16H4l.999-3h6l.8035,2.4077L4.5858,22.6244a2,2,0,0,0,0,2.8282L9.1316,30h9.5908l10.716-10.717A1.9173,1.9173,0,0,0,29.4384,16.5715ZM5.6653,11l2.331-7,2.3355,7Zm12.229,17H9.96L6,24.0381l6.3123-6.3115L20.24,25.6538Zm3.76-3.76-7.9275-7.9272L20.0393,10l7.9268,7.9272Z'/></svg>");
    }
    &.refresh::after{
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3Cpath d='M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16'/%3E%3Cpath d='M8 16H3v5'/%3E%3C/svg%3E");
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3Cpath d='M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16'/%3E%3Cpath d='M8 16H3v5'/%3E%3C/svg%3E");
    }

    &.download:hover::after,
    &.copy:hover::after,
    &.clear:hover::after,
    &.refresh:hover::after{
        background-color: var(--accent);
    }
}

.Juhj-card{
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.Juhj-input.text{
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    outline: none;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--text);
    scrollbar-color: var(--accent) var(--surface-hover);
    scrollbar-width: thin;
    &:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
    }
}

.Juhj-input.count{
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    padding: 0.5rem 0.6rem;
    outline: none;

    &:focus{ border-color: var(--accent); }
}

.Juhj-toolinfo{
    width: 100%;
    margin: 0 auto 1rem;
    text-align: center;
    & h1{
        font-family: 'Space Grotesk', sans-serif;
        font-size: 2.5rem;
        font-weight: 600;
        letter-spacing: -0.02em;
        color: var(--text);
        margin: 0 0 0.5rem;
    }
    & p{
        font-family: 'Space Grotesk', sans-serif;
        font-size: 1.3rem;
        line-height: 1.5;
        color: var(--text-dim); 
        margin: 0;
    }
}


.display-off{
    display: none;
}

.Juhj-label{
    font-weight: 600;
    letter-spacing:1px;
    text-transform: uppercase;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    &.dashed::after{
        content: "";
        flex: 1;
        height: 1px;
        background: var(--border);
    }
}

.Juhj-output{
    flex: 1;
    min-width: 0;
    font-family: 'Space Mono', monospace;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    word-break: break-all;
    line-height: 1.5;
    display: flex;
    scrollbar-color: var(--accent) var(--surface-hover);
    scrollbar-width: thin;
}

.Juhj-faq{
    display:flex;
    flex-direction:column;
    align-items: flex-start;
    gap:1rem;
    & h2{
        width: 100%;
        text-align: center;
        color: var(--text);
    }
    & details{
        border:1px solid var(--border);
        border-radius:6px;
        overflow:hidden;
        width: 100%;
        background: var(--surface);
    }
    & summary{
        cursor:pointer;
        font-weight:600;
        list-style:none;
        user-select:none;
        color:  var(--text);
        &::-webkit-details-marker{display:none;}
        &::after{
            color: var(--accent);
            content:"+";
            float:right;
            transition:0.2s;
        }
    }
    & details[open] summary::after{
        content:"−";
    }
    & p{
        color: var(--text-dim);
        line-height:1.5;
    }
}
/*
*************************************************
******************** FOOTER *********************
*************************************************
*/
.Juhj-footer{
    width: 100%; 
    text-align: center; 
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    display: flex; 
    flex-direction: column; 
    align-items: center;
    color: var(--text-dim);
    & p{ letter-spacing: 1px; margin-bottom: 0.5rem; }
    & nav{ 
        display: flex; 
        align-items: center; 
        gap: 1rem; 
        & span{ 
            width: 7px; 
            height: 7px; 
            background: var(--text-faint); 
            border-radius: 100%; 
        }
        & a{ 
            color: var(--text-dim); 
            text-decoration: none; 
            &:hover{ color: var(--accent); }
        }
    }

}

/*
*************************************************
******************** HEADER *********************
*************************************************
*/
juhj-header{
    position: sticky;
    top: 0;
    z-index: 100;
}
.Juhj-header{
    background: rgba(23,19,27,0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 3.5rem;
    display: flex; align-items: center; justify-content: space-between;

    & .logo {
        font-family: 'Space Mono', monospace; 
        color: var(--text); 
        letter-spacing: -1px; 
        text-decoration: none; 
        & span { 
            color: var(--accent);
        }
    }
    & a{
        color: var(--text-dim); 
        text-decoration: none; 
        transition: color 0.2s;
        &:hover { color: var(--accent); }
    }
}

/*
*************************************************
******************** GRID ***********************
*************************************************
*/

.Juhj-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    background: var(--border);
    & .card{
        background: var(--surface);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        position: relative;
        transition: background 0.2s, box-shadow 0.2s;
        &:hover{
            background: var(--surface-hover);
            box-shadow: inset 0 0 0 1px var(--accent-soft), 0 0 24px -8px var(--accent);
            z-index: 1;
        }
    }
    & .card-title{
        font-family: 'Space Mono', monospace;
        color: var(--text);
        letter-spacing: -1px;
    }
    & .card-desc {
        color: var(--text-dim);
        line-height: 1.4;
    }
    & .card-tag {
        margin-top: auto;
        font-family: 'Space Mono', monospace;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: var(--gold);
    }
}

/*
*************************************************
******************** TOAST **********************
*************************************************
*/

.Juhj-toast{
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(4rem);
    background: var(--accent-dim);
    color: var(--text);
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    z-index: 999;
}