:root {
    /* Cyber-Nordic Palette */
    --nordic-night: #0a0c10;
    --nordic-glass: rgba(20, 24, 30, 0.7);
    --nordic-border: rgba(255, 255, 255, 0.08);
    
    --accent-cyan: #00f2ff;
    --accent-blue: #0070ff;
    --accent-glow: rgba(0, 242, 255, 0.3);
    
    --severity-critical: #ff2d55;
    --severity-high: #ff9500;
    --severity-medium: #ffcc00;
    --severity-low: #34c759;
    --severity-info: #007aff;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #606060;
}

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

body {
    background-color: var(--nordic-night);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    overflow: hidden; /* We'll use inner scrolls */
}

/* App Layout */
.app-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 320px;
    background: var(--nordic-glass);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--nordic-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 32px;
    border-bottom: 1px solid var(--nordic-border);
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.version {
    font-size: 0.65rem;
    background: var(--nordic-border);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
}

.sidebar-content {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

/* Form Elements */
.control-group {
    margin-bottom: 24px;
}

.control-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

input[type="url"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--nordic-border);
    padding: 14px;
    border-radius: 8px;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

input[type="url"]:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--nordic-night);
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    filter: brightness(1.1);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Main Dashboard */
.main-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.top-nav {
    height: 64px;
    border-bottom: 1px solid var(--nordic-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(10, 12, 16, 0.5);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--severity-low);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--severity-low);
}

.status-indicator.busy {
    background: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan);
    animation: pulse 1.5s infinite;
}

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

/* Content Area */
.dashboard-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(0, 112, 255, 0.05), transparent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--nordic-glass);
    border: 1px solid var(--nordic-border);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

/* Report View */
.report-panel {
    background: var(--nordic-glass);
    border: 1px solid var(--nordic-border);
    border-radius: 20px;
    padding: 48px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Markdown Rendering Polish */
#report-html {
    font-size: 1.05rem;
    color: var(--text-primary);
}

#report-html h1, #report-html h2, #report-html h3 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 800;
}

#report-html pre {
    background: #000;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--nordic-border);
    margin: 24px 0;
    overflow-x: auto;
}

#report-html code {
    font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--nordic-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
