* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

header .subtitle {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

.content {
    padding: 40px;
}

.section {
    margin-bottom: 40px;
}

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

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

input[type="text"], input[type="url"], select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="url"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

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

.stat-card h3 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    font-size: 0.9em;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.feature h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.feature p {
    color: #666;
    font-size: 0.9em;
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.status.queued { background: #fff3cd; color: #856404; }
.status.running { background: #cfe2ff; color: #084298; }
.status.completed { background: #d1e7dd; color: #0f5132; }
.status.failed { background: #f8d7da; color: #842029; }

.severity {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.severity.critical { background: #dc3545; color: white; }
.severity.high { background: #fd7e14; color: white; }
.severity.medium { background: #ffc107; color: #000; }
.severity.low { background: #28a745; color: white; }
.severity.info { background: #17a2b8; color: white; }

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

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

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

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .content {
        padding: 20px;
    }
    
    .features, .stats {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9em;
    }
}

/* Autonomous Scanning Interface Styles */

.scanning-status {
    margin-top: 20px;
}

.status-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border-left: 4px solid #28a745;
}

.status-card.active {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: #dc3545;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-info h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.status-info p {
    color: #666;
    margin: 8px 0;
    font-size: 1em;
}

.highlight {
    color: #667eea;
    font-weight: 600;
}

.highlight.critical {
    color: #dc3545;
}

/* Suggestion Form */

.suggestion-form {
    max-width: 800px;
}

.suggestion-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.suggestion-input-group input {
    flex: 1;
}

.suggestion-input-group button {
    min-width: 150px;
    white-space: nowrap;
}

.suggestion-options {
    color: #666;
}

.suggestion-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.suggestion-options input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* Discoveries List */

.discoveries-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.discovery-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #667eea;
    transition: transform 0.2s, box-shadow 0.2s;
}

.discovery-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.discovery-item.vulnerability-found {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #f8f9fa 100%);
}

.discovery-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.discovery-type {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.discovery-target {
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
}

.discovery-time {
    color: #999;
    font-size: 0.9em;
}

.discovery-status {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.status.contacted {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

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

.stat-card {
    text-align: center;
}

/* Responsive updates */

@media (max-width: 768px) {
    .suggestion-input-group {
        flex-direction: column;
    }
    
    .suggestion-input-group button {
        width: 100%;
    }
    
    .discovery-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .discovery-info {
        width: 100%;
    }
    
    .discovery-status {
        width: 100%;
    }
}
