/* === Word Counter Specific CSS === */
:root {
    --wc-primary: #0066cc;
    --wc-secondary: #00bcd4;
    --wc-gradient: linear-gradient(135deg, var(--wc-primary), var(--wc-secondary));
    --wc-text-dark: #1e293b;
    --wc-text-light: #64748b;
    --wc-bg-light: #f1f5f9;
    --wc-surface: #ffffff;
    --wc-border: #e2e8f0;
    --wc-success: #10b981;
    --wc-danger: #ef4444;
    --wc-radius: 12px;
    --wc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wc-font-family: 'Poppins', sans-serif;
}

/* Wrapper */
.word-counter-wrapper {
    font-family: var(--wc-font-family);
    color: var(--wc-text-dark);
    line-height: 1.6;
    max-width: 1000px;
}

/* Typography Overrides */
.word-counter-wrapper h1 {
    font-size: 2.25rem;
    font-weight: 700 !important;
    background: var(--wc-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-align: center;
}

.word-counter-wrapper h2 {
    font-size: 1.5rem;
    font-weight: 600 !important;
    color: var(--wc-primary);
    margin-bottom: 1rem;
}

.word-counter-wrapper h3 {
    font-size: 1.25rem;
    font-weight: 600 !important;
    color: var(--wc-text-dark);
    margin-bottom: 0.5rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}
.tool-header p {
    color: var(--wc-text-light);
}

/* Card Styles */
.tool-card, .content-card { 
    background-color: var(--wc-surface); 
    padding: 2rem; 
    border-radius: var(--wc-radius); 
    box-shadow: var(--wc-shadow); 
    margin-bottom: 2rem; 
    border: 1px solid var(--wc-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Layout for Details & Keywords */
@media (min-width: 768px) {
    .grid-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

/* Stats Grid */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); 
    gap: 1rem; 
    margin-bottom: 1.5rem; 
    text-align: center; 
}

.stat-item { 
    background-color: var(--wc-bg-light); 
    padding: 1rem; 
    border-radius: var(--wc-radius); 
    border: 1px solid var(--wc-border);
}

.stat-item .count { 
    font-size: 2rem; 
    font-weight: 700; 
    color: var(--wc-primary); 
    line-height: 1.2;
}

.stat-item .label { 
    font-size: 0.85rem; 
    color: var(--wc-text-light); 
    font-weight: 500; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Text Area */
#text-input { 
    width: 100%; 
    min-height: 300px; 
    padding: 1.25rem; 
    font-family: var(--wc-font-family); 
    font-size: 1rem; 
    border: 1px solid var(--wc-border); 
    border-radius: var(--wc-radius); 
    resize: vertical; 
    margin-bottom: 1.5rem; 
    transition: all 0.3s; 
    background: #fff;
}

#text-input:focus { 
    outline: none; 
    border-color: var(--wc-primary); 
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15); 
}

/* Buttons */
.actions-toolbar { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.75rem; 
    align-items: center; 
    justify-content: center;
}

.btn { 
    padding: 0.6rem 1.2rem; 
    font-size: 0.9rem; 
    font-weight: 500; 
    border: 1px solid transparent; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem; 
}

.btn-primary { 
    background: var(--wc-gradient); 
    color: white; 
    border: none;
    box-shadow: 0 4px 6px rgba(0, 102, 204, 0.2);
}
.btn-primary:hover { 
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0, 102, 204, 0.3);
}

.btn-secondary { 
    background-color: var(--wc-bg-light); 
    color: var(--wc-text-dark); 
    border: 1px solid var(--wc-border);
}
.btn-secondary:hover { 
    background-color: #e2e8f0; 
}

.btn-outline { 
    background: transparent; 
    border: 1px solid var(--wc-border); 
    color: var(--wc-text-light); 
}
.btn-outline:hover { 
    border-color: var(--wc-primary);
    color: var(--wc-primary);
}

.btn-danger { 
    background: transparent; 
    border: 1px solid #fee2e2; 
    color: var(--wc-danger); 
}
.btn-danger:hover { 
    background: #fef2f2; 
    border-color: var(--wc-danger);
}

/* Detail Info */
.detail-grid { 
    display: flex; 
    flex-direction: column;
    gap: 0.75rem; 
}
.detail-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--wc-bg-light); 
}
.detail-item:last-child { border-bottom: none; }

.detail-item span { 
    color: var(--wc-text-light); 
    font-size: 0.95rem;
}
.detail-item strong { 
    color: var(--wc-text-dark); 
    font-weight: 600; 
}

/* Keyword Table */
.keyword-table-wrapper { 
    max-height: 350px; 
    overflow-y: auto; 
    border: 1px solid var(--wc-border); 
    border-radius: 8px; 
}
#keyword-table { width: 100%; border-collapse: collapse; }
#keyword-table th { 
    background-color: var(--wc-bg-light); 
    padding: 0.75rem; 
    text-align: left; 
    font-size: 0.9rem;
    color: var(--wc-text-dark);
    position: sticky; 
    top: 0; 
}
#keyword-table td { 
    padding: 0.75rem; 
    font-size: 0.9rem;
    border-bottom: 1px solid var(--wc-border); 
    color: var(--wc-text-light);
}

/* Features List */
.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--wc-text-light);
}
.feature-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--wc-secondary);
}

/* FAQ Styles */
.faq-item details { 
    background: var(--wc-bg-light); 
    border-radius: 8px; 
    margin-bottom: 0.75rem; 
    overflow: hidden;
}
.faq-item summary { 
    padding: 1rem; 
    font-weight: 600; 
    color: var(--wc-text-dark);
    cursor: pointer; 
    position: relative; 
    list-style: none; 
    transition: background 0.3s;
}
.faq-item summary:hover { background: #e2e8f0; }
.faq-item summary::after { 
    content: '\f078'; 
    font-family: 'Font Awesome 6 Free'; 
    font-weight: 900; 
    position: absolute; 
    right: 1rem; 
    font-size: 0.8rem;
    color: var(--wc-primary);
    transition: transform 0.3s ease; 
}
.faq-item details[open] summary::after { transform: rotate(180deg); }
.faq-item .faq-content { 
    padding: 1rem; 
    border-top: 1px solid var(--wc-border); 
    color: var(--wc-text-light);
}

.separator { width: 1px; height: 24px; background: var(--wc-border); margin: 0 0.5rem; }
.space-before { margin-top: 1.5rem; }

/* Mobile */
@media (max-width: 768px) {
    .actions-toolbar { flex-direction: column; align-items: stretch; }
    .separator { display: none; }
    .grid-layout { grid-template-columns: 1fr; }
}