/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.built-with {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.built-with:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.device-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-toggle label {
    font-weight: 600;
    color: #555;
}

.device-toggle select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.input-section {
    margin-bottom: 30px;
}

.input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}

#code-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#code-input:focus {
    outline: none;
    border-color: #667eea;
}

.results-section h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 10px;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.result-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.output {
    max-height: 300px;
    overflow-y: auto;
}

.vulnerability-item, .patch-item {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #ff6b6b;
    font-size: 14px;
}

.patch-item {
    border-left-color: #4CAF50;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c62828;
    margin-top: 20px;
}

.error.success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left-color: #2e7d32;
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .device-toggle {
        justify-content: space-between;
    }
    
    .results {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    main {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .result-card {
        padding: 15px;
    }
}