.tool-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    font-size: 1.8rem;
    margin-right: 1rem;
    vertical-align: middle;
}

.tool-header {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tool-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.tool-header p {
    color: #666;
}

.tool-container,
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.calculator-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calculator-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-calculate {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-calculate:hover {
    transform: translateY(-2px);
}

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-item {
    background: rgba(255,255,255,0.2);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.result-item label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.result-item .value {
    font-size: 1.5rem;
    font-weight: bold;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-card li:last-child {
    border-bottom: none;
}

.formula-box {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    border-left: 4px solid #c62828;
    display: none;
}

.error-message.show {
    display: block;
}

.result-box {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    border-left: 4px solid #2e7d32;
}

/* Editor Card Styles (for JSON Formatter, PDF Editor, etc.) */
.editor-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.editor-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.editor-toolbar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.editor-toolbar .btn,
.toolbar .btn,
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-primary,
.btn.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover,
.btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary,
.btn.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover,
.btn.btn-secondary:hover {
    background: #e0e0e0;
    border-color: #667eea;
    color: #667eea;
}

.editor-card textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.editor-card textarea:focus {
    outline: none;
    border-color: #667eea;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    border-left: 4px solid #2e7d32;
    display: none;
}

.success-message.show {
    display: block;
}

.stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    background: #f9f9f9;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.stat-item strong {
    color: #667eea;
}

/* Checklist Container Styles */
.checklist-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.checklist-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
}

.checklist-item label {
    flex: 1;
    cursor: pointer;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.summary-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    background: rgba(255,255,255,0.2);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.summary-item label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.summary-item .value {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Upload Area Styles (for PDF Editor, etc.) */
.upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    position: relative;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f5f5f5;
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.file-list {
    margin: 1.5rem 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.file-item-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.file-item-size {
    color: #666;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.file-item-remove {
    background: #ff5252;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: 1rem;
}

.file-item-remove:hover {
    background: #ff1744;
}

.preview-area {
    min-height: 400px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    padding: 2rem;
    background: #fafafa;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message {
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    display: block;
}

.message.info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.file-info {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Method Group Styles */
.method-group {
    margin-bottom: 1.5rem;
}

/* Status Indicator Styles */
.flow-status,
.pressure-status,
.quality-status,
.leak-severity,
.ph-indicator,
.hardness-indicator,
.quality-indicator,
.flow-regime {
    background: rgba(255,255,255,0.3);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    text-align: center;
}

.flow-status h3,
.pressure-status h3,
.quality-status h3,
.leak-severity h3,
.ph-indicator h3,
.hardness-indicator h3,
.quality-indicator h3,
.flow-regime h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .tool-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .tool-header h1 {
        font-size: 1.5rem;
    }
    
    .tool-header-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-right: 0.75rem;
    }
    
    .tool-container,
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .calculator-card h2 {
        font-size: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.65rem;
        font-size: 0.95rem;
    }
    
    .btn-calculate {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .result-card {
        padding: 1.5rem;
    }
    
    .result-card h2 {
        font-size: 1.25rem;
    }
    
    .result-item {
        padding: 0.875rem;
    }
    
    .result-item .value {
        font-size: 1.25rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .info-card h3 {
        font-size: 1.1rem;
    }
    
    .formula-box {
        font-size: 0.85rem;
        padding: 0.875rem;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
    
    .tool-header h1 {
        font-size: 1.25rem;
    }
    
    .tool-header-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
        margin-right: 0.5rem;
    }
    
    .tool-header p {
        font-size: 0.9rem;
    }
    
    .calculator-card {
        padding: 1.25rem;
    }
    
    .calculator-card h2 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .btn-calculate {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    .result-card {
        padding: 1.25rem;
    }
    
    .result-card h2 {
        font-size: 1.1rem;
    }
    
    .result-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .result-item label {
        font-size: 0.85rem;
    }
    
    .result-item .value {
        font-size: 1.1rem;
    }
    
    .info-card {
        padding: 1.25rem;
    }
    
    .info-card h3 {
        font-size: 1rem;
    }
    
    .error-message {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .editor-card {
        padding: 1.25rem;
    }
    
    .editor-card h2 {
        font-size: 1.1rem;
    }
    
    .editor-toolbar {
        gap: 0.5rem;
    }
    
    .editor-toolbar .btn,
    .toolbar .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .editor-card textarea {
        min-height: 200px;
        font-size: 0.85rem;
    }
    
    .checklist-container {
        padding: 1.25rem;
    }
    
    .checklist-container h2 {
        font-size: 1.25rem;
    }
    
    .summary-card {
        padding: 1.25rem;
    }
    
    .summary-card h2 {
        font-size: 1.25rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .upload-area h3 {
        font-size: 1.1rem;
    }
    
    .preview-area {
        min-height: 300px;
        padding: 1.5rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .file-item-size,
    .file-item-remove {
        margin-left: 0;
    }
}

