/* Text Tools Specific Styles */

.text-tools {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    gap: 2rem;
}

/* Text Input Section */
.text-input-section {
    width: 100%;
}

#textInput {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.2s;
    background: #fff;
}

#textInput:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#textInput::placeholder {
    color: #adb5bd;
}

/* Statistics Section */
.statistics-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.statistics-section h2 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: #495057;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.stat-item.highlight {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
}

.stat-item.highlight .stat-label,
.stat-item.highlight .stat-value {
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #007bff;
    font-variant-numeric: tabular-nums;
}

/* Tools Section */
.tools-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.tools-section h2 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: #495057;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.tool-btn {
    padding: 0.75rem 1rem;
    background: #fff;
    border: 2px solid #007bff;
    color: #007bff;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tool-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.tool-btn:active:not(:disabled) {
    transform: translateY(0);
}

.tool-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
}

.action-btn.copy {
    background: #28a745;
    color: white;
}

.action-btn.copy:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.action-btn.clear {
    background: #dc3545;
    color: white;
}

.action-btn.clear:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.action-btn:active:not(:disabled) {
    transform: translateY(0) !important;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #28a745;
    color: white;
}

.toast.error {
    background: #dc3545;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Keyboard shortcuts hint */
kbd {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    font-size: 0.875rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-family: monospace;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

/* Content sections styling */
.content-section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.content-section h2 {
    color: #212529;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.content-section h3 {
    color: #495057;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.content-section p {
    line-height: 1.7;
    color: #495057;
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    line-height: 1.8;
    color: #495057;
    margin-bottom: 1rem;
}

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

.instructions-list {
    padding-left: 1.5rem;
}

.tips-list {
    list-style-type: none;
    padding-left: 0;
}

.tips-list li::before {
    content: "✓ ";
    color: #28a745;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .text-tools {
        margin: 1rem;
        gap: 1.5rem;
    }
    
    #textInput {
        min-height: 200px;
        font-size: 0.9375rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tool-btn {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .actions-section {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        min-width: auto;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}
