/* =====================================================
   WORD COUNTER STYLES
   Basic Calculator Online - Word Counter Tool
   ===================================================== */

/* ======================= SECTION ======================= */
.word-counter-section {
    padding: 2rem 0 3rem;
    min-height: 60vh;
}

/* ======================= STATS BAR ======================= */
.wc-stats-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.wc-stat-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.25rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.wc-stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.wc-stat-item .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.wc-stat-item.primary .stat-icon { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.wc-stat-item.blue .stat-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.wc-stat-item.green .stat-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.wc-stat-item.purple .stat-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.wc-stat-item.orange .stat-icon { background: rgba(249, 115, 22, 0.1); color: #f97316; }

.wc-stat-item .stat-info {
    flex: 1;
    min-width: 0;
}

.wc-stat-item .stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.wc-stat-item .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* ======================= EDITOR CARD ======================= */
.wc-editor-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

.wc-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.editor-title {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

.editor-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.editor-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.wc-editor-body {
    flex: 1;
    display: flex;
    padding: 0;
}

.wc-textarea {
    width: 100%;
    min-height: 350px;
    padding: 1.25rem;
    border: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-primary);
    resize: none;
    outline: none;
}

.wc-textarea::placeholder {
    color: var(--text-muted);
}

.wc-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
}

.footer-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* ======================= SIDEBAR CARDS ======================= */
.wc-sidebar-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 1rem;
}

.wc-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

.wc-sidebar-header h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.keyword-filter select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: white;
    cursor: pointer;
}

.wc-sidebar-body {
    padding: 1rem 1.25rem;
}

/* Reading Time */
.reading-time-display {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.reading-time-main {
    margin-bottom: 1rem;
}

.reading-time-main .time-value {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: #6366f1;
    line-height: 1;
}

.reading-time-main .time-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.reading-time-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.time-detail i {
    color: #6366f1;
}

.time-detail strong {
    color: var(--text-primary);
}

.reading-speed-setting {
    text-align: center;
}

.reading-speed-setting label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.speed-slider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.speed-slider input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-body);
    outline: none;
    -webkit-appearance: none;
}

.speed-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.speed-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: none;
}

#speedValue {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6366f1;
    min-width: 60px;
}

/* Keywords */
.keywords-list {
    max-height: 200px;
    overflow-y: auto;
}

.keyword-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
}

.keyword-item:last-child {
    border-bottom: none;
}

.keyword-rank {
    width: 24px;
    height: 24px;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.keyword-word {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.keyword-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.keyword-bar {
    width: 60px;
    height: 6px;
    background: var(--bg-body);
    border-radius: 3px;
    overflow: hidden;
}

.keyword-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Empty State */
.wc-empty-state {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
}

.wc-empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.wc-empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* Density Stats */
.density-stats {
    display: grid;
    gap: 0.75rem;
}

.density-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
}

.density-item:last-child {
    border-bottom: none;
}

.density-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.density-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Page Estimates */
.page-estimates {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-estimate-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    background: var(--bg-body);
    border-radius: var(--radius-lg);
}

.page-estimate-item .estimate-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: #6366f1;
    flex-shrink: 0;
}

.page-estimate-item .estimate-info {
    flex: 1;
}

.page-estimate-item .estimate-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-estimate-item .estimate-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.page-estimate-item .estimate-note {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ======================= TOOLS SECTION ======================= */
.wc-tools-section {
    padding: 0 0 3rem;
}

.wc-tools-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.tools-header {
    padding: 1rem 1.25rem;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

.tools-header h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tools-body {
    padding: 1.25rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tool-btn i {
    font-size: 1.25rem;
    color: #6366f1;
}

.tool-btn:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    color: #6366f1;
    transform: translateY(-2px);
}

.tool-btn:active {
    transform: translateY(0);
}

/* ======================= FEATURES SECTION ======================= */
.wc-features-section {
    padding: 4rem 0;
    background: var(--bg-body);
}

.wc-section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--text-muted);
    margin: 0;
}

.wc-feature-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    height: 100%;
    transition: all var(--transition-normal);
}

.wc-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.wc-feature-card .feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.wc-feature-card .feature-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.wc-feature-card .feature-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.wc-feature-card .feature-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.wc-feature-card .feature-icon.orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }

.wc-feature-card h5 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.wc-feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ======================= INFO SECTION ======================= */
.wc-info-section {
    padding: 3rem 0 5rem;
}

.wc-info-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    height: 100%;
}

.wc-info-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li strong {
    color: var(--text-primary);
}

/* ======================= RESPONSIVE ======================= */
@media (max-width: 1199.98px) {
    .wc-stats-bar {
        flex-wrap: wrap;
    }

    .wc-stat-item {
        min-width: calc(33.333% - 1rem);
    }
}

@media (max-width: 991.98px) {
    .word-counter-section {
        padding: 1.5rem 0 2rem;
    }

    .wc-stat-item {
        min-width: calc(50% - 0.5rem);
    }

    .wc-stat-item .stat-value {
        font-size: 1.5rem;
    }

    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .wc-editor-card {
        min-height: 400px;
    }
}

@media (max-width: 767.98px) {
    .wc-stat-item {
        min-width: calc(50% - 0.5rem);
        padding: 1rem;
    }

    .wc-stat-item .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .wc-stat-item .stat-value {
        font-size: 1.25rem;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wc-features-section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .wc-stats-bar {
        gap: 0.75rem;
    }

    .wc-stat-item {
        min-width: calc(50% - 0.375rem);
        gap: 0.625rem;
    }

    .wc-editor-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-btn {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
}

/* ======================= SCROLLBARS ======================= */
.keywords-list::-webkit-scrollbar,
.wc-textarea::-webkit-scrollbar {
    width: 8px;
}

.keywords-list::-webkit-scrollbar-track,
.wc-textarea::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 4px;
}

.keywords-list::-webkit-scrollbar-thumb,
.wc-textarea::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.keywords-list::-webkit-scrollbar-thumb:hover,
.wc-textarea::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ======================= TOAST NOTIFICATION ======================= */
.wc-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.875rem 1.5rem;
    background: #1f2937;
    color: white;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.wc-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.wc-toast.success {
    background: #10b981;
}

.wc-toast.error {
    background: #ef4444;
}