/* css/tools/glitch-text-generator.css */

.tool-page-main {
    padding: 1.5rem 0 2.5rem 0;
}

.tool-article {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .tool-article {
        padding: 2rem;
    }
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.tool-header h1 .fas {
    margin-right: 0.5rem;
}

.tool-header .tool-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.6;
}

.tool-interactive-area {
    margin-bottom: 2.5rem;
}

.text-input-area {
    margin-bottom: 1.5rem;
}

.text-input-area textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #ccd0d5;
    border-radius: var(--border-radius);
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, .20);
}

.input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0 0.25rem;
}

#clearTextBtnGlitch {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

#clearTextBtnGlitch:hover {
    background-color: darken(var(--secondary-color), 10%);
}

/* Manual hex or SASS needed */
#charCountGlitch {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.glitch-controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--light-color, #f8f9fa);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius);
}

.glitch-controls fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.glitch-controls legend {
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    width: 100%;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.glitch-controls .control-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.glitch-controls .control-group:last-child {
    margin-bottom: 0;
}

.glitch-controls label {
    margin-right: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-basis: 40%;
    /* Give label some space */
}

.glitch-controls select {
    flex-grow: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #ced4da);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    background-color: var(--white-color);
}

.output-area-glitch {
    margin-top: 1.5rem;
}

.output-area-glitch .output-box-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

#glitchOutput {
    /* Textarea for output to handle complex text */
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    /* Can adjust if Zalgo makes it too big */
    border: 1px solid var(--border-color, #ced4da);
    border-radius: var(--border-radius);
    background-color: var(--light-color, #f8f9fa);
    min-height: 120px;
    line-height: 1.8;
    /* Increased line height for Zalgo */
    overflow-wrap: break-word;
    word-break: break-all;
    /* Important for Zalgo */
    white-space: pre-wrap;
    /* Preserve spaces and allow wrapping */
    resize: vertical;
}

#copyGlitchTextBtn {
    display: block;
    width: 100%;
    max-width: 300px;
    /* Or adjust as preferred */
    margin: 1rem auto 0 auto;
    /* Centered */
    font-size: 1.05rem;
}

#copyGlitchTextBtn .fas {
    margin-right: 0.5rem;
}

#copyGlitchTextBtn.copied {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: var(--white-color) !important;
}

#copyGlitchTextBtn:hover {
    background-color: #0056b3;
    /* Darker blue on hover */
}


/* Content Sections Styling */
.content-section {
    padding: 2.5rem 0;
    margin-top: 2rem;
}

.tool-interactive-area+.content-section {
    margin-top: 3rem;
}

.content-section h2 {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1.75rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.alt-bg-tool {
    background-color: var(--section-alt-bg);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    border-radius: var(--border-radius);
}

.steps-list,
.features-list {
    list-style: none;
    padding-left: 0;
    max-width: 800px;
    margin: 0 auto;
}

.steps-list li {
    background-color: #fff;
    padding: 1rem 1rem 1rem 3.5rem;
    margin-bottom: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    position: relative;
    border: 1px solid var(--border-color);
}

.steps-list {
    counter-reset: step-counter;
}

.steps-list li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 1rem;
    top: 1rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

.steps-list li strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.features-list li {
    background-color: #fff;
    padding: 1rem 1rem 1rem 2.5rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    position: relative;
    border: 1px solid var(--border-color);
}

.features-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 1rem;
    top: 0.9rem;
    font-size: 1.1rem;
}

.related-tools-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}