/* Port Scanner Styles */

/* Modern Mode Selector */
.mode-selector-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 0;
}

.mode-option {
    position: relative;
}

.mode-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.mode-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mode-icon .fsvg {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.mode-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mode-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.mode-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Hover State */
.mode-label:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.mode-label:hover .mode-icon {
    background: #e8edf3;
}

.mode-label:hover .mode-icon .fsvg {
    opacity: 0.8;
}

/* Checked State */
.mode-input:checked + .mode-label {
    border-color: #052c65;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(5, 44, 101, 0.1), inset 0 0 0 1px rgba(5, 44, 101, 0.1);
    transform: translateY(0);
}

.mode-input:checked + .mode-label .mode-icon {
    background: #052c65;
}

.mode-input:checked + .mode-label .mode-icon .fsvg {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.mode-input:checked + .mode-label .mode-title {
    color: #052c65;
}

.mode-input:checked + .mode-label .mode-desc {
    color: #475569;
}

/* Dark Mode */
[data-bs-theme="dark"] .mode-label {
    background: #1a1d23;
    border-color: #343a40;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .mode-icon {
    background: #2d3239;
}

[data-bs-theme="dark"] .mode-title {
    color: #e9ecef;
}

[data-bs-theme="dark"] .mode-desc {
    color: #9ca3af;
}

[data-bs-theme="dark"] .mode-label:hover {
    border-color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .mode-label:hover .mode-icon {
    background: #3a3f47;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label {
    border-color: #6ea8fe;
    background: #212529;
    box-shadow: 0 2px 8px rgba(110, 168, 254, 0.2), inset 0 0 0 1px rgba(110, 168, 254, 0.2);
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-icon {
    background: #6ea8fe;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-title {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-desc {
    color: #9ca3af;
}

/* Port Results Table */
.port-results-table {
    margin-bottom: 0;
}

.port-results-table thead {
    background: #f8f9fa;
}

[data-bs-theme="dark"] .port-results-table thead {
    background: #212529;
}

.port-results-table th {
    font-weight: 600;
    color: #052c65;
    border-bottom: 2px solid #dee2e6;
    padding: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-bs-theme="dark"] .port-results-table th {
    color: #6ea8fe;
    border-bottom-color: #495057;
}

.port-results-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.port-number {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    font-size: 15px;
    color: #212529;
}

[data-bs-theme="dark"] .port-number {
    color: #e9ecef;
}

.port-service {
    font-size: 14px;
    color: #6b7280;
}

[data-bs-theme="dark"] .port-service {
    color: #9ca3af;
}

/* Port Status Badges */
.port-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-open {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-filtered {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

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

[data-bs-theme="dark"] .status-open {
    background: #1e4620;
    color: #75d97c;
    border-color: #2d6930;
}

[data-bs-theme="dark"] .status-closed {
    background: #4a1c1f;
    color: #f8b4b9;
    border-color: #6e2a2f;
}

[data-bs-theme="dark"] .status-filtered {
    background: #4a3e1c;
    color: #ffda6a;
    border-color: #6e5d2a;
}

[data-bs-theme="dark"] .status-error {
    background: #721c24;
    color: #f8b4b9;
    border-color: #8b2b33;
}

/* Scan Statistics */
.scan-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.scan-stats .badge {
    font-size: 13px;
    padding: 6px 12px;
    font-weight: 600;
}

/* Progress Bar */
.progress {
    background-color: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

[data-bs-theme="dark"] .progress {
    background-color: #343a40;
}

.progress-bar {
    font-weight: 600;
    font-size: 13px;
    transition: width 0.3s ease;
}

/* Port Results Display */
.port-results-display {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

[data-bs-theme="dark"] .port-results-display {
    background: #212529;
    border-color: #495057;
}

/* Table Hover Effect */
.port-results-table tbody tr {
    transition: background-color 0.2s ease;
}

.port-results-table tbody tr:hover {
    background-color: #f8f9fa;
}

[data-bs-theme="dark"] .port-results-table tbody tr:hover {
    background-color: #2b3035;
}

/* Responsive */
@media (max-width: 768px) {
    .mode-selector-modern {
        grid-template-columns: 1fr;
    }

    .port-results-table {
        font-size: 13px;
    }

    .port-results-table th,
    .port-results-table td {
        padding: 8px;
    }

    .scan-stats {
        justify-content: center;
    }
}

/* Table Responsive Wrapper */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

/* Alert Styling */
.alert {
    border-radius: 8px;
}

/* Stop Button Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

#stopBtn {
    animation: pulse 2s infinite;
}
