/* Character Counter Styles */
.character-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;
}

.character-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;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-tiny {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    background: #e9ecef;
    border: 1px solid #dee2e6;
}

.btn-tiny:hover {
    background: #dee2e6;
}

.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;
    margin-bottom: 1rem;
}

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);
}

.character-limit-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #dee2e6;
}

.character-limit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.character-limit label {
    font-size: 0.9rem;
    color: #495057;
}

.character-limit input[type="number"] {
    width: 80px;
    padding: 0.4rem 0.6rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
}

.common-limits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.common-limits span {
    margin-right: 0.5rem;
}

.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;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3498db;
}

.stat-box:nth-child(2n)::before {
    background: #2ecc71;
}

.stat-box:nth-child(3n)::before {
    background: #e74c3c;
}

.stat-box:nth-child(4n)::before {
    background: #f39c12;
}

.stat-box:nth-child(5n)::before {
    background: #9b59b6;
}

.stat-box:nth-child(6n)::before {
    background: #1abc9c;
}

.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;
    margin-bottom: 0.5rem;
}

.stat-detail {
    font-size: 0.8rem;
    color: #95a5a6;
    line-height: 1.4;
}

.stat-detail span {
    display: block;
}

/* Progress Bar */
.progress-container {
    margin: 2rem 0;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #495057;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #3498db;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Social Media Limits */
.social-limits {
    margin-top: 3rem;
}

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

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

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

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

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

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.twitter .social-icon { background: #1DA1F2; }
.facebook .social-icon { background: #4267B2; }
.instagram .social-icon { background: #E1306C; }
.linkedin .social-icon { background: #0077B5; }

.social-info {
    flex-grow: 1;
}

.social-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.social-limit {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.social-status {
    font-size: 0.85rem;
}

.social-progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.social-progress-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.twitter .social-progress-bar { background: #1DA1F2; }
.facebook .social-progress-bar { background: #4267B2; }
.instagram .social-progress-bar { background: #E1306C; }
.linkedin .social-progress-bar { background: #0077B5; }

/* SEO Content */
.seo-content {
    max-width: 900px;
    margin: 4rem auto 0;
    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);
    }
    
    .social-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stats-grid, .social-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;
    }
    
    .character-limit {
        flex-wrap: wrap;
    }
    
    .common-limits {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

.stat-box, .social-item, .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; }

.social-item:nth-child(1) { animation-delay: 0.3s; }
.social-item:nth-child(2) { animation-delay: 0.4s; }
.social-item:nth-child(3) { animation-delay: 0.5s; }
.social-item:nth-child(4) { animation-delay: 0.6s; }

/* Limit exceeded state */
.limit-exceeded {
    color: #e74c3c;
    font-weight: 600;
}

.limit-warning {
    color: #f39c12;
    font-weight: 600;
}

.limit-good {
    color: #2ecc71;
    font-weight: 600;
}

/* Progress bar states */
.progress-warning {
    background: #f39c12;
}

.progress-danger {
    background: #e74c3c;
}

.progress-success {
    background: #2ecc71;
}
