/* ========================================
   DIFF TOOLS - PROFESSIONAL STYLING
   ======================================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px 0;
    }
    
    .hero-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Tool Panel */
.tool-panel {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 2.5rem;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.tool-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f1f3f4;
}

.tool-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tool-header p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* Options Section */
.options-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.checkbox-container:hover {
    background-color: #e2e8f0;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: white;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-container i {
    color: #667eea;
    width: 16px;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.code-input {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.code-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.code-input::placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: #667eea;
    width: 16px;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Mobile Form Adjustments */
@media (max-width: 768px) {
    .options-section .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .input-section .form-row {
        grid-template-columns: 1fr;
    }
    
    .tool-panel {
        padding: 1.5rem;
        margin-top: -20px;
        border-radius: 15px;
    }
}

/* Action Section */
.action-section {
    margin-bottom: 2rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: #28a745;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

/* Mobile Button Adjustments */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        min-width: auto;
        width: 100%;
    }
}

/* Statistics Section */
.stats-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #667eea;
}

.stat-icon {
    font-size: 2rem;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile Stats Adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Result Section */
.result-section {
    margin-bottom: 2rem;
}

.result-header {
    margin-bottom: 1rem;
}

.result-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-content {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 300px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
    position: relative;
}

.placeholder-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-style: italic;
    height: 100%;
    min-height: 200px;
    text-align: center;
}

/* Diff Highlighting */
.added {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
    padding: 2px 8px;
    margin: 1px 0;
    border-radius: 3px;
}

.removed {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
    padding: 2px 8px;
    margin: 1px 0;
    border-radius: 3px;
}

.unchanged {
    padding: 2px 8px;
    margin: 1px 0;
    color: #495057;
}

.no-differences {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #28a745;
    font-weight: 600;
    background: #d4edda;
    border-radius: 8px;
    border: 2px solid #28a745;
    text-align: center;
}

/* History Section */
.history-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.section-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.history-item strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.25rem;
}

.history-item small {
    color: #64748b;
    font-size: 0.85rem;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .tool-panel {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .tool-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .tool-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.25rem;
    }
}
