/* ========================================================
   Word Counter Specific Tool Styles
   ======================================================== */

.tool-main {
    padding-top: 4rem;
    padding-bottom: 6rem;
    max-width: 900px; /* Slimmer for reading lines naturally */
}

/* Tool Hero Block */
.tool-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.tool-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.tool-header .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    flex-shrink: 0;
}

.tool-header .icon-wrapper i {
    width: 28px;
    height: 28px;
}

/* Inner App Structure */
.tool-layout {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

/* Statistics Flex Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Textarea Layout */
.textarea-wrapper {
    margin-bottom: 2rem;
}

#textInput {
    width: 100%;
    min-height: 350px;
    resize: vertical;
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.1rem;
    line-height: 1.6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#textInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Actions Ribbon */
.tool-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.action-btn i {
    width: 18px;
    height: 18px;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
    border: none;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px 0 rgba(59, 130, 246, 0.4);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    background-color: var(--bg);
    border-color: var(--text-muted);
}

/* ========================================================
   Responsive Media Queries
   ======================================================== */
@media (max-width: 800px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tool-header h1 {
        font-size: 2.1rem;
    }
}

@media (max-width: 500px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .tool-actions {
        flex-direction: column;
    }
    .action-btn {
        width: 100%;
    }
    .tool-layout {
        padding: 1.5rem;
    }
}
