/* Word Counter Styles */
.word-counter-page {
    padding: 2rem 0;
    background-color: #f8f9fa;
    min-height: 100vh;
}

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

.tool-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Tool Container */
.tool-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.word-counter-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.file-upload {
    position: relative;
    display: inline-block;
    margin-left: auto;
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.text-input-container {
    position: relative;
}

textarea#textInput {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea#textInput:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Results Section */
.results-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: white;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Advanced Stats */
.advanced-stats {
    margin-top: 2rem;
}

.advanced-stats h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.advanced-stats h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #3498db;
    border-radius: 3px;
}

.advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.advanced-stat {
    background: white;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.advanced-stat .stat-title {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.advanced-stat .stat-value {
    font-size: 1.5rem;
    color: #3498db;
    margin: 0;
}

/* Word Frequency */
.word-frequency {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.word-frequency h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.word-frequency-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.word-frequency-item {
    background: #f1f3f5;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.word-frequency-item .count {
    font-weight: 600;
    color: #3498db;
}

/* Unique Features Section */
.unique-features {
    margin: 4rem 0;
    padding: 3rem 0;
    background: #f8f9fa;
    border-radius: 10px;
}

.unique-features h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2.5rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.feature {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #3498db;
    font-size: 1.8rem;
}

.feature h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature p {
    color: #7f8c8d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* SEO Content */
.seo-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    color: #2c3e50;
}

.seo-content h2 {
    color: #2c3e50;
    margin: 2.5rem 0 1.5rem;
    font-size: 1.8rem;
}

.seo-content h3 {
    color: #2c3e50;
    margin: 2rem 0 1rem;
    font-size: 1.4rem;
}

.seo-content h4 {
    color: #2c3e50;
    margin: 1.5rem 0 0.75rem;
    font-size: 1.2rem;
}

.seo-content p {
    margin-bottom: 1.2rem;
    color: #4a5568;
}

.seo-content ul, .seo-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.use-case {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.use-case i {
    color: #3498db;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.faq {
    margin-top: 2rem;
}

.faq-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.faq-item h4 {
    color: #3498db;
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .tool-container {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stats-grid, .advanced-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .use-cases {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .tool-container {
        padding: 1rem;
    }
    
    .stats-grid, .advanced-grid {
        grid-template-columns: 1fr;
    }
    
    .toolbar, .action-buttons {
        justify-content: center;
    }
    
    .file-upload {
        width: 100%;
    }
    
    #uploadBtn {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-box, .advanced-stat, .feature, .use-case, .faq-item {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

/* Add delay to each item */
.stat-box:nth-child(1) { animation-delay: 0.1s; }
.stat-box:nth-child(2) { animation-delay: 0.2s; }
.stat-box:nth-child(3) { animation-delay: 0.3s; }
.stat-box:nth-child(4) { animation-delay: 0.4s; }
.stat-box:nth-child(5) { animation-delay: 0.5s; }
.stat-box:nth-child(6) { animation-delay: 0.6s; }

.advanced-stat:nth-child(1) { animation-delay: 0.3s; }
.advanced-stat:nth-child(2) { animation-delay: 0.4s; }
.advanced-stat:nth-child(3) { animation-delay: 0.5s; }

.feature:nth-child(1) { animation-delay: 0.2s; }
.feature:nth-child(2) { animation-delay: 0.4s; }
.feature:nth-child(3) { animation-delay: 0.6s; }
.feature:nth-child(4) { animation-delay: 0.8s; }

/* No data state */
.no-data {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #dee2e6;
}
