/* Security Scanner Interface */
.security-scanner-interface {
    margin-bottom: 2rem;
}

/* Scanner Controls */
.scanner-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.control-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.9375rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-select:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: #fff;
}

.control-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.scan-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-top: 1.5rem;
}

.scan-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scan-button:active {
    transform: translateY(0);
}

.scan-icon {
    font-size: 1.125rem;
}

/* Scanner Layout */
.scanner-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #e9ecef;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    font-size: 1.25rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.icon-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Code Section */
.code-section {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.editor-container {
    flex: 1;
    min-height: 400px;
    position: relative;
}

.code-editor {
    width: 100%;
    height: 100%;
    min-height: 400px;
    font-size: 14px;
}

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Security Summary */
.security-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 0.75rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.summary-card.critical {
    border-left-color: #dc3545;
}

.summary-card.high {
    border-left-color: #fd7e14;
}

.summary-card.medium {
    border-left-color: #ffc107;
}

.summary-card.low {
    border-left-color: #0dcaf0;
}

.summary-card.score {
    border-left-color: #667eea;
    grid-column: 2 / -1;
}

.summary-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
    min-width: 0;
}

.summary-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

/* Vulnerabilities List */
.vulnerabilities-list {
    flex: 1;
    padding: 1.25rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 0.9375rem;
    margin: 0;
}

/* Vulnerability Item */
.vulnerability-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.vulnerability-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vulnerability-item.critical {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.vulnerability-item.high {
    border-left-color: #fd7e14;
    background: #fff8f0;
}

.vulnerability-item.medium {
    border-left-color: #ffc107;
    background: #fffef5;
}

.vulnerability-item.low {
    border-left-color: #0dcaf0;
    background: #f0fcff;
}

.vulnerability-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.vulnerability-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.vulnerability-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.severity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.severity-badge.critical {
    background: #fee;
    color: #dc3545;
}

.severity-badge.high {
    background: #fff4e6;
    color: #fd7e14;
}

.severity-badge.medium {
    background: #fffbf0;
    color: #ffc107;
}

.severity-badge.low {
    background: #e6f7ff;
    color: #0dcaf0;
}

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

.vulnerability-description {
    font-size: 0.9375rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.recommendation-box {
    padding: 0.75rem 1rem;
    background: #e7f3ff;
    border-left: 3px solid #0d6efd;
    border-radius: 6px;
    margin-top: 0.75rem;
}

.recommendation-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0d6efd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.recommendation-text {
    font-size: 0.875rem;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

/* Success State */
.success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #198754;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .scanner-layout {
        grid-template-columns: 1fr;
    }

    .security-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-card.score {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .scanner-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .control-group {
        width: 100%;
    }

    .scan-button {
        width: 100%;
        margin-top: 0;
    }

    .security-summary {
        grid-template-columns: 1fr;
    }

    .summary-card {
        padding: 0.875rem;
    }

    .summary-icon {
        font-size: 1.25rem;
    }

    .summary-value {
        font-size: 1.25rem;
    }

    .vulnerability-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .vulnerability-meta {
        width: 100%;
        justify-content: space-between;
    }

    .section-header {
        padding: 0.875rem 1rem;
    }

    .section-title {
        font-size: 0.9375rem;
    }

    .vulnerabilities-list {
        padding: 1rem;
        max-height: 400px;
    }

    .editor-container {
        min-height: 300px;
    }

    .code-editor {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 0.25rem;
    }

    .icon-button {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .action-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .action-button span:last-child {
        display: none;
    }
}
