/* ===== SCANNER PAGE SPECIFIC STYLES ===== */

.scanner-page {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.scanner-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* Scanner Header */
.scanner-header {
    text-align: center;
    margin-bottom: 2rem;
}

.scanner-header h1 {
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.scanner-header p {
    color: var(--muted);
    font-size: 1.1rem;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 68, 68, 0.1);
    padding: 5px 15px;
    border-radius: 50px;
    margin-top: 10px;
}

.live-dot {
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

/* Scanner Card */
.scanner-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.scanner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

/* Input Group */
.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.server-input {
    flex: 1;
    min-width: 300px;
    padding: 1rem 1.2rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.server-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(90, 200, 250, 0.1);
}

.scan-btn {
    padding: 1rem 2rem;
    background: var(--gradient);
    color: #001222;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.scan-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 200, 250, 0.4);
}

.scan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: 12px;
    margin-top: 1rem;
}

.scan-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.scan-option:hover {
    background: rgba(90, 200, 250, 0.1);
}

.scan-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--brand);
}

/* Quick Tips */
.quick-tips {
    background: rgba(90, 200, 250, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.quick-tips h4 {
    color: var(--brand);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-tips ul {
    list-style: none;
    padding: 0;
}

.quick-tips li {
    color: var(--muted);
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.quick-tips li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Loading Container */
.loading-container {
    text-align: center;
    padding: 3rem;
    background: var(--bg);
    border-radius: 12px;
    margin: 2rem 0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scan-status {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Results Container */
.results-container {
    margin-top: 2rem;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 10px;
}

.server-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.server-info p {
    color: var(--muted);
    font-size: 0.9rem;
}

.scan-meta {
    text-align: right;
}

.scan-id {
    color: var(--brand);
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.scan-time {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Summary Card */
.summary-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--success) 0deg 270deg, var(--warning) 270deg 324deg, var(--error) 324deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.score-circle::before {
    content: '';
    width: 90px;
    height: 90px;
    background: var(--bg);
    border-radius: 50%;
    position: absolute;
}

.score-value {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.score-details {
    flex: 1;
}

.score-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-box {
    text-align: center;
    padding: 1rem;
    background: var(--card);
    border-radius: 8px;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Filter Section */
.filter-section {
    background: var(--bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-header {
    margin-bottom: 1rem;
}

.filter-header h4 {
    color: var(--brand);
    margin-bottom: 1rem;
}

.filter-controls {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select,
.filter-input {
    padding: 0.6rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    min-width: 150px;
}

.filter-input {
    min-width: 200px;
    flex: 1;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--brand);
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--brand);
    color: var(--bg);
    border-color: var(--brand);
}

.filter-stats {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: right;
}

/* Results Table */
.results-table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.results-table th {
    background: rgba(90, 200, 250, 0.1);
    color: var(--text-primary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-good {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-bad {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.status-info {
    background: rgba(90, 200, 250, 0.2);
    color: var(--brand);
}

/* Risk Badges */
.risk-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.risk-high {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.risk-medium {
    background: rgba(90, 200, 250, 0.2);
    color: var(--brand);
}

.risk-low {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.action-btn:hover {
    background: var(--brand);
    color: var(--bg);
    border-color: var(--brand);
    transform: translateY(-2px);
}

/* Remediation Steps */
.remediation-steps h4 {
    color: var(--brand);
    margin-bottom: 1rem;
}

.remediation-steps ul {
    list-style: none;
    padding: 0;
}

.remediation-steps li {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.remediation-steps li:last-child {
    border-bottom: none;
}

.remediation-steps li strong {
    font-weight: 600;
}

/* History Section */
.history-section {
    margin-top: 3rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.history-header h3 {
    color: var(--brand);
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-clear-btn {
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--error);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.history-clear-btn:hover {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.history-list {
    display: grid;
    gap: 0.8rem;
}

.history-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-item:hover {
    border-color: var(--brand);
    transform: translateX(5px);
}

.history-server {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-icon {
    width: 40px;
    height: 40px;
    background: rgba(90, 200, 250, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-size: 1.2rem;
}

.history-details h4 {
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.history-details p {
    color: var(--muted);
    font-size: 0.85rem;
}

.history-score {
    text-align: right;
}

.history-score .score {
    font-size: 1.2rem;
    font-weight: 700;
}

.history-score .date {
    color: var(--muted);
    font-size: 0.8rem;
}

/* Utility Classes */
.stat-critical { color: var(--error); }
.stat-high { color: var(--warning); }
.stat-medium { color: var(--brand); }
.stat-low { color: var(--success); }

/* Responsive Design */
@media (max-width: 768px) {
    .scanner-header h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .server-input {
        min-width: 100%;
    }
    
    .scan-btn {
        width: 100%;
    }
    
    .score-display {
        flex-direction: column;
        text-align: center;
    }
    
    .score-circle {
        margin: 0 auto;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .filter-select,
    .filter-input,
    .filter-btn {
        width: 100%;
    }
    
    .results-table {
        font-size: 0.85rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
    }
    
    .history-server {
        flex-direction: column;
        text-align: center;
    }
    
    .history-score {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .scanner-card {
        padding: 1.5rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .results-table {
        font-size: 0.75rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.6rem;
    }
    
    .history-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .history-clear-btn {
        width: 100%;
    }
}