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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    line-height: 1.6;
}

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

h1 {
    color: #58a6ff;
    border-bottom: 2px solid #30363d;
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-size: 32px;
}

h2 {
    color: #c9d1d9;
    font-size: 20px;
    margin-bottom: 15px;
}

/* Stats Grid */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.1);
}

.stat-value {
    font-size: 40px;
    font-weight: bold;
    color: #58a6ff;
    margin-bottom: 8px;
}

.stat-label {
    color: #8b949e;
    font-size: 14px;
}

.status-indicator {
    font-size: 48px;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #238636;
    color: white;
}

.btn-primary:hover {
    background: #2ea043;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
}

.btn-secondary:hover {
    background: #30363d;
}

.btn:active {
    transform: translateY(0);
}

/* Scan List */
.scan-list, .alerts-section {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.scan-item {
    border-bottom: 1px solid #30363d;
    padding: 20px 0;
    animation: slideIn 0.3s ease;
}

.scan-item:last-child {
    border-bottom: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.scan-ip {
    font-size: 18px;
    color: #58a6ff;
    font-weight: bold;
}

.scan-time {
    color: #8b949e;
    font-size: 12px;
}

.scan-ports {
    margin-top: 10px;
}

.port-badge {
    display: inline-block;
    background: #1f6feb;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
}

.empty-state {
    color: #8b949e;
    text-align: center;
    padding: 40px;
    font-style: italic;
}

/* Alert Items */
.alert-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

.alert-critical {
    background: rgba(248, 81, 73, 0.1);
    border-left-color: #f85149;
}

.alert-high {
    background: rgba(248, 81, 73, 0.08);
    border-left-color: #da3633;
}

.alert-medium {
    background: rgba(187, 128, 9, 0.1);
    border-left-color: #bb8009;
}

.alert-low {
    background: rgba(56, 139, 253, 0.1);
    border-left-color: #388bfd;
}

.alert-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.alert-message {
    font-size: 14px;
    color: #c9d1d9;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: #8b949e;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #30363d;
    border-top-color: #58a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #30363d;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading Banner */
.loading-banner {
    background: linear-gradient(90deg, #1f6feb 0%, #388bfd 100%);
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #238636;
}

.notification-error {
    background: #da3633;
}

.notification-warning {
    background: #bb8009;
}

.notification-info {
    background: #1f6feb;
}

/* Disabled button state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
}

/* Control Panel */
.control-panel {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

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

.scan-group {
    background: #0d1117;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #21262d;
}

.scan-group h3 {
    color: #8b949e;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 600;
}

.scan-group .btn {
    width: 100%;
    margin-bottom: 10px;
}

.scan-group .btn:last-child {
    margin-bottom: 0;
}

/* Input Fields */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-field {
    background: #0d1117;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.input-field:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.input-field::placeholder {
    color: #6e7681;
}

/* Danger Button */
.btn-danger {
    background: #da3633;
    color: white;
}

.btn-danger:hover {
    background: #f85149;
}

/* Controls Section */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.controls .btn {
    flex: 1;
}