@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #00f0ff;
    --primary-dark: #00a8b3;
    --secondary: #0066ff;
    --accent: #ff00ff;
    --success: #00ff88;
    --danger: #ff3366;
    --warning: #ffaa00;
    --dark-bg: #0a0e17;
    --panel-bg: rgba(10, 20, 40, 0.85);
    --border-glow: rgba(0, 240, 255, 0.3);
    --text-primary: #e0f7ff;
    --text-secondary: #7aa5b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(0, 102, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 0, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.container { max-width: 1800px; margin: 0 auto; padding: 15px; }

/* Header */
header {
    background: linear-gradient(180deg, rgba(10, 20, 40, 0.95) 0%, rgba(10, 20, 40, 0.7) 100%);
    border-bottom: 1px solid var(--border-glow);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--primary), transparent);
    animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    letter-spacing: 3px;
}

.logo i {
    font-size: 1.8rem;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { text-shadow: 0 0 10px var(--primary); }
    50% { text-shadow: 0 0 30px var(--primary), 0 0 60px var(--primary); }
}

nav { display: flex; gap: 5px; }

nav button {
    background: transparent;
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--text-secondary);
    padding: 10px 20px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

nav button::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

nav button:hover, nav button.active {
    color: var(--dark-bg);
    border-color: var(--primary);
}

nav button:hover::before, nav button.active::before { opacity: 1; }
nav button.active { box-shadow: 0 0 20px rgba(0, 240, 255, 0.5); }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 15px;
    margin-top: 15px;
}

/* Panels */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-glow);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.panel-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 240, 255, 0.03);
}

.panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-body { padding: 15px; }

/* Circular Progress Stats */
.stat-circle-card {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    min-height: 220px;
}

.circular-progress {
    position: relative;
    width: 130px;
    height: 130px;
}

.circular-progress svg {
    transform: rotate(-90deg);
    width: 130px;
    height: 130px;
}

.circular-progress .bg-circle {
    fill: none;
    stroke: rgba(0, 240, 255, 0.1);
    stroke-width: 8;
}

.circular-progress .progress-circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 1.5s ease-out;
}

.circular-progress .progress-circle.cyan { stroke: var(--primary); filter: drop-shadow(0 0 10px var(--primary)); }
.circular-progress .progress-circle.green { stroke: var(--success); filter: drop-shadow(0 0 10px var(--success)); }
.circular-progress .progress-circle.orange { stroke: var(--warning); filter: drop-shadow(0 0 10px var(--warning)); }
.circular-progress .progress-circle.pink { stroke: var(--accent); filter: drop-shadow(0 0 10px var(--accent)); }

.circular-progress .inner-circle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 95px; height: 95px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.circular-progress .value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 20px var(--primary);
}

.circular-progress .label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-info {
    margin-top: 15px;
    text-align: center;
}

.stat-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* World Map */
.map-panel { grid-column: span 6; min-height: 280px; }

.world-map-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

#worldMapSvg {
    width: 100%;
    height: 100%;
}

.map-point {
    position: absolute;
    width: 12px; height: 12px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--success);
    animation: mapPulse 2s ease-in-out infinite;
    cursor: pointer;
    z-index: 10;
}

.map-point::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 30px; height: 30px;
    border: 1px solid var(--success);
    border-radius: 50%;
    animation: mapRipple 2s ease-out infinite;
}

.map-point.offline {
    background: var(--danger);
    box-shadow: 0 0 20px var(--danger);
}
.map-point.offline::before { border-color: var(--danger); }

@keyframes mapPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
@keyframes mapRipple { 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(2); opacity: 0; } }

.map-point .tooltip {
    position: absolute;
    bottom: 100%; left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    border: 1px solid var(--primary);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}

.map-point:hover .tooltip { opacity: 1; visibility: visible; }

/* Charts */
.chart-panel { grid-column: span 6; min-height: 280px; }
.chart-panel .panel-body { height: 220px; }

/* Server List */
.servers-panel { grid-column: span 4; }

.server-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
}

.server-item {
    background: rgba(0, 240, 255, 0.03);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 5px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    cursor: pointer;
}

.server-item:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.server-status-indicator {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.server-status-indicator.online {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
    border: 2px solid var(--success);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.server-status-indicator.offline {
    background: rgba(255, 51, 102, 0.1);
    color: var(--danger);
    border: 2px solid var(--danger);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.3);
}

.server-info { flex: 1; }

.server-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.server-ip {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.server-actions { display: flex; gap: 5px; }

/* Grid Items */
.items-grid-panel { grid-column: span 4; }

.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
}

.grid-item {
    background: rgba(0, 240, 255, 0.03);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 5px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--success);
    border-radius: 5px 0 0 5px;
}

.grid-item.offline::before { background: var(--danger); }
.grid-item.warning::before { background: var(--warning); }

.grid-item:hover {
    background: rgba(0, 240, 255, 0.08);
    transform: translateY(-2px);
}

.grid-item-icon {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.grid-item-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-item-status {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.grid-item-status.online { background: rgba(0, 255, 136, 0.2); color: var(--success); }
.grid-item-status.offline { background: rgba(255, 51, 102, 0.2); color: var(--danger); }

.grid-item-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 5px;
}

/* AI Panel */
.ai-panel {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
}

.ai-panel .panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    max-height: 330px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 10px;
    max-width: 85%;
    font-size: 0.85rem;
    line-height: 1.5;
}

.chat-message.user {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark-bg);
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.chat-message.ai {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}

.chat-input-container {
    padding: 12px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    display: flex;
    gap: 10px;
    background: rgba(0, 240, 255, 0.03);
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 5px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* Logs */
.logs-panel { grid-column: span 12; }

.logs-panel .panel-body {
    max-height: 200px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 15px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.05);
    font-size: 0.8rem;
}

.log-item:hover { background: rgba(0, 240, 255, 0.05); }

.log-time {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
    min-width: 140px;
}

.log-status {
    width: 8px; height: 8px;
    border-radius: 50%;
}

.log-status.success { background: var(--success); box-shadow: 0 0 10px var(--success); }
.log-status.error { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.log-status.warning { background: var(--warning); box-shadow: 0 0 10px var(--warning); }

.log-message { flex: 1; }

/* Buttons */
.btn {
    padding: 8px 16px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.btn:hover {
    background: var(--primary);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark-bg);
    border: none;
}

.btn-primary:hover { box-shadow: 0 0 30px rgba(0, 240, 255, 0.7); transform: translateY(-2px); }

.btn-success { border-color: var(--success); color: var(--success); }
.btn-success:hover { background: var(--success); color: var(--dark-bg); }

.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--dark-bg); }

.btn-sm { padding: 5px 10px; font-size: 0.7rem; }

.btn-icon {
    width: 32px; height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: none;
    border-radius: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover { color: var(--danger); }

.modal-body { padding: 20px; }

/* Form */
.form-group { margin-bottom: 15px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 5px;
    padding: 12px 15px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* Sections */
.section { display: none; }
.section.active { display: block; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 240, 255, 0.05);
}

.data-table th {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 240, 255, 0.03);
}

.data-table tr:hover td { background: rgba(0, 240, 255, 0.05); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: rgba(0, 240, 255, 0.05); }
::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.3); border-radius: 3px; }

/* Empty & Loading */
.empty-state { text-align: center; padding: 30px; color: var(--text-secondary); }
.empty-state i { font-size: 2.5rem; margin-bottom: 10px; opacity: 0.3; color: var(--primary); }

.loading { display: flex; justify-content: center; align-items: center; padding: 30px; }
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(0, 240, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
    position: fixed;
    bottom: 20px; right: 20px;
    padding: 12px 20px;
    background: var(--panel-bg);
    border: 1px solid var(--primary);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 0.85rem;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Analysis */
.analysis-content { white-space: pre-wrap; line-height: 1.7; font-size: 0.85rem; }
.analysis-content strong { color: var(--primary); }

/* Status */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.online {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-badge.offline {
    background: rgba(255, 51, 102, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.status-badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

.status-badge.online .dot { background: var(--success); }
.status-badge.offline .dot { background: var(--danger); }

@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Metric Badges - Beautiful indicators */
.metric-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.metric-badge i {
    font-size: 0.75rem;
}

.metric-badge.success {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 200, 100, 0.1));
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.metric-badge.warning {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 136, 0, 0.1));
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.2);
}

.metric-badge.danger {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(255, 0, 60, 0.1));
    color: #ff3366;
    border: 1px solid rgba(255, 51, 102, 0.3);
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.2);
}

.metric-badge.info {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 180, 220, 0.1));
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.metric-badge.neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-badge.ssl {
    padding: 4px 12px;
}

.metric-badge.ssl.success i {
    animation: lockPulse 2s ease-in-out infinite;
}

@keyframes lockPulse {
    0%, 100% { text-shadow: 0 0 5px rgba(0, 255, 136, 0.5); }
    50% { text-shadow: 0 0 15px rgba(0, 255, 136, 0.8); }
}

/* Site Info with Favicon */
.site-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-favicon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    transition: all 0.3s ease;
}

.site-info:hover .site-favicon {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.site-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-link {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.site-link:hover {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.site-url {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Server Badge */
.server-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.server-badge:hover {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.server-flag {
    font-size: 1.2rem;
}

.server-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.server-ip {
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.realtime-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.realtime-dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: realtimePulse 1s ease-in-out infinite;
}

@keyframes realtimePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(0, 255, 136, 0); }
}

.actions { display: flex; gap: 5px; }

/* ==================== SSH MODAL STYLES ==================== */

.modal-lg {
    max-width: 700px;
}

.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glow);
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* SSH Key Green Grid */
.ssh-key-grid {
    position: relative;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.03), rgba(0, 200, 100, 0.08));
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.grid-background {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

.grid-content {
    position: relative;
    z-index: 2;
    padding: 18px;
}

.grid-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.key-icon-wrapper {
    position: relative;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.5);
}

.key-icon-wrapper i {
    font-size: 1.3rem;
    color: #0a0f1c;
}

.pulse-ring {
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(0, 255, 136, 0.6);
    border-radius: 14px;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.grid-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grid-title h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.grid-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 10px;
    font-size: 0.7rem;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.grid-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.grid-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.grid-toggle input {
    display: none;
}

.toggle-track {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 13px;
    transition: all 0.3s ease;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.grid-toggle input:checked ~ .toggle-track {
    background: rgba(0, 255, 136, 0.3);
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.grid-toggle input:checked ~ .toggle-track .toggle-thumb {
    left: 26px;
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.toggle-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.grid-glow {
    position: absolute;
    bottom: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 100px;
    background: radial-gradient(ellipse, rgba(0, 255, 136, 0.15), transparent 70%);
    pointer-events: none;
}

.ssh-key-grid:hover .grid-background {
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.15) 1px, transparent 1px);
}

.ssh-key-grid:hover {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
}

/* SSH Key Prompt */
.ssh-key-prompt {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(0, 240, 255, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 12px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.prompt-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prompt-icon i {
    font-size: 1.5rem;
    color: var(--bg-dark);
}

.prompt-content h4 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.prompt-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.prompt-actions {
    display: flex;
    gap: 10px;
}

/* SSH Key Badge */
.key-badge {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: var(--bg-dark);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 600;
}

/* SSH Key Result */
.ssh-key-result {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.ssh-key-result.success {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--success);
}

.ssh-key-result.success i {
    color: var(--success);
    font-size: 1.2rem;
}

.ssh-key-result.warning {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
    color: #ffaa00;
}

.ssh-key-result.warning i {
    color: #ffaa00;
}

.ssh-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.ssh-actions .btn {
    flex: 1;
}

.ssh-status {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.ssh-status.loading {
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.3);
    color: var(--secondary);
}

.ssh-status.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--success);
}

.ssh-status.error {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: var(--danger);
}

.scan-results {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
}

.scan-results h4 {
    color: var(--success);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scan-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.scan-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.scan-item .label {
    color: var(--text-secondary);
}

.scan-item .value {
    color: var(--text-primary);
    font-weight: 500;
}

/* ==================== AI CHAT STYLES ==================== */

.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

.ai-message.bot {
    align-self: flex-start;
}

.ai-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-message i {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-message.bot i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark-bg);
}

.ai-message.user i {
    background: rgba(255, 0, 255, 0.3);
    color: var(--accent);
}

.ai-message .message-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-message.bot .message-content {
    border-bottom-left-radius: 4px;
}

.ai-message.user .message-content {
    background: rgba(0, 240, 255, 0.1);
    border-bottom-right-radius: 4px;
}

.ai-message .message-content ul {
    margin: 10px 0 0 20px;
}

.ai-message .message-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    overflow-x: auto;
    font-size: 0.85rem;
}

.ai-message .message-content code {
    background: rgba(0, 240, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.ai-chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid var(--border-glow);
}

.ai-chat-input input {
    flex: 1;
}

/* ==================== SERVER DETAILS STYLES ==================== */

.server-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.detail-card.full-width {
    grid-column: span 2;
}

.detail-card h4 {
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-card h5 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 12px 0 8px;
}

.detail-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.detail-item .label {
    color: var(--text-secondary);
}

.detail-item .value {
    color: var(--text-primary);
}

.progress-bar-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.health-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: auto;
}

.health-badge.excellent { background: rgba(0, 255, 136, 0.2); color: var(--success); }
.health-badge.good { background: rgba(0, 240, 255, 0.2); color: var(--primary); }
.health-badge.warning { background: rgba(255, 170, 0, 0.2); color: var(--warning); }
.health-badge.critical { background: rgba(255, 51, 102, 0.2); color: var(--danger); }

.services-list, .ports-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-tag, .port-tag {
    background: rgba(0, 102, 255, 0.15);
    border: 1px solid rgba(0, 102, 255, 0.3);
    color: var(--secondary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
}

.service-tag.more {
    background: rgba(255, 0, 255, 0.15);
    border-color: rgba(255, 0, 255, 0.3);
    color: var(--accent);
}

.port-tag {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--success);
    font-family: 'Courier New', monospace;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* ==================== DYNAMIC WIDGETS ==================== */

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.dynamic-widget {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(0, 240, 255, 0.05);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.widget-title {
    font-weight: 500;
    color: var(--text-primary);
}

.ai-badge {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--dark-bg);
}

.widget-content {
    padding: 15px;
}

/* ==================== AI SUGGESTIONS ==================== */

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 170, 0, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
}

.insight-item i {
    color: var(--warning);
    margin-top: 2px;
}

.action-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.action-title {
    font-weight: 500;
    color: var(--text-primary);
}

.priority-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.priority-badge.high { background: rgba(255, 51, 102, 0.2); color: var(--danger); }
.priority-badge.medium { background: rgba(255, 170, 0, 0.2); color: var(--warning); }
.priority-badge.low { background: rgba(0, 255, 136, 0.2); color: var(--success); }

.action-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 1400px) {
    .stat-circle-card { grid-column: span 3; }
    .map-panel, .chart-panel { grid-column: span 6; }
    .servers-panel, .items-grid-panel, .ai-panel { grid-column: span 6; }
}

@media (max-width: 1000px) {
    .stat-circle-card { grid-column: span 6; }
    .map-panel, .chart-panel, .servers-panel, .items-grid-panel, .ai-panel { grid-column: span 12; }
    .server-details-grid { grid-template-columns: 1fr; }
    .detail-card.full-width { grid-column: span 1; }
    .scan-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .stat-circle-card { grid-column: span 12; }
    nav { flex-wrap: wrap; }
    nav button { flex: 1; min-width: 70px; padding: 8px 12px; font-size: 0.75rem; }
    .modal-tabs { flex-direction: column; }
    .ssh-actions { flex-direction: column; }
}
