/* Word Counter Specific Styles */

.page-header {
    text-align: center;
    padding: 2rem 0 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.page-header p,
.page-header .lead-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

/* Counter Container */
.word-counter-section {
    margin-bottom: 4rem;
}

.counter-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

/* Input Section */
.input-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.platform-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.platform-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}

.platform-tab:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.platform-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.input-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-file {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    display: inline-block;
}

.btn-file:hover {
    background: #45b369;
}

.text-input {
    flex: 1;
    width: 100%;
    border: none;
    padding: 1.5rem;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    min-height: 400px;
    line-height: 1.8;
}

.text-input:focus {
    outline: none;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quick-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.quick-stats strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Stats Section */
.stats-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stats-card h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Analysis List */
.analysis-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 6px;
}

.analysis-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.analysis-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Platform Limit */
.platform-limit {
    text-align: center;
}

.limit-bar {
    width: 100%;
    height: 24px;
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.limit-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 12px;
}

.limit-progress.warning {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.limit-progress.danger {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.limit-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.limit-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Guide Section */
.guide-section {
    margin-bottom: 4rem;
}

.guide-section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.guide-card h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.guide-range {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.guide-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .counter-container {
        grid-template-columns: 1fr;
    }

    .stats-section {
        order: -1;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .platform-tabs {
        width: 100%;
    }

    .platform-tab {
        flex: 1;
        min-width: 80px;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .text-input {
        min-height: 300px;
    }

    .input-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-stats {
        justify-content: space-around;
        width: 100%;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .platform-tab {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
}
