/* Tool Pages Specific Styles */

.tool-main {
    padding-top: 100px;
    min-height: 100vh;
    background: #f8f9fa;
}

.tool-header {
    text-align: center;
    padding: 40px 0;
    background: white;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tool-header h1 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tool-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.tool-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Form Styles */
.tool-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fafafa;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}

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

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-area h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: #666;
    margin: 0;
}

.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #e8f4fd;
    border-radius: 8px;
    text-align: left;
}

.file-info p {
    margin: 0.25rem 0;
    color: #333;
}

/* Quality Slider */
.quality-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Result Section */
.result-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.compression-stats h3,
.text-stats h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.download-section {
    text-align: center;
    margin-top: 2rem;
}

.download-section .btn {
    margin: 0 0.5rem;
}

/* Text Formatter Specific */
.text-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.formatting-options h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

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

.btn-option {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-option:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.text-result {
    margin-bottom: 2rem;
}

.text-result textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
}

.result-actions {
    margin-top: 1rem;
    text-align: center;
}

.result-actions .btn {
    margin: 0 0.5rem 0.5rem 0;
}

/* Word Counter Specific */
.word-counter-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-section,
.stats-section,
.analysis-section,
.export-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.input-section {
    grid-column: 1 / -1;
}

.input-section textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
}

.input-actions {
    margin-top: 1rem;
    text-align: center;
}

.input-actions .btn {
    margin: 0 0.5rem 0.5rem 0;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.stat-icon {
    font-size: 2rem;
    color: #667eea;
    width: 50px;
    text-align: center;
}

.stat-info {
    flex: 1;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #666;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.analysis-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.analysis-card h4 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.word-tag {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.distribution {
    space-y: 0.5rem;
}

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

.dist-label {
    min-width: 60px;
    font-size: 0.8rem;
    color: #666;
}

.dist-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.dist-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
}

.dist-value {
    min-width: 80px;
    font-size: 0.8rem;
    color: #666;
    text-align: right;
}

.no-data {
    color: #999;
    font-style: italic;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Tool Info */
.tool-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.tool-info h3 {
    color: #333;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.tool-info h3:first-child {
    margin-top: 0;
}

.tool-info ol,
.tool-info ul {
    padding-left: 1.5rem;
}

.tool-info li {
    margin-bottom: 0.5rem;
    color: #666;
}

.tool-info strong {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .word-counter-container {
        grid-template-columns: 1fr;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .tool-form,
    .result-section,
    .input-section,
    .stats-section,
    .analysis-section,
    .export-section {
        padding: 1rem;
    }
}
