/* Premium Dark Theme - Enterprise Security Dashboard Style - HealthRisko 2025 */

:root {
    /* Dark Theme Colors */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-input: #1a1a1a;
    --bg-hover: #1f1f1f;

    /* Accent Color (Purple - Minimal Usage) */
    --accent-purple: #8b5cf6;
    --accent-purple-hover: #7c3aed;
    --accent-purple-glow: rgba(139, 92, 246, 0.15);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6b6b6b;

    /* Status Colors */
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    /* Spacing System */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Shadows & Glows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);
    --glow-purple: 0 0 20px var(--accent-purple-glow);

    /* Grid System */
    --container-max: 1400px;
    --grid-gap: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Full-Width Container System */
.container-full {
    width: 100%;
    margin: 0 auto;
}

.container-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

@media (max-width: 768px) {
    .container-inner {
        padding: 0 var(--spacing-md);
    }
}

/* Header / Navbar */
header {
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-modern {
    height: 56px;
    display: flex;
    align-items: center;
}

.navbar-modern .container-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-modern a[href*="home"] {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.navbar-modern .nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    list-style: none;
}

.navbar-modern .nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 400;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: color 0.2s ease, opacity 0.2s ease;
    position: relative;
}

.navbar-modern .nav-link:hover {
    color: var(--text-primary);
    opacity: 1;
}

.navbar-modern .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 4px;
    height: 2px;
    background: var(--accent-purple);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.navbar-modern .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Main Content - Full Width */
.main-content {
    width: 100%;
    min-height: calc(100vh - 56px);
}

.main-content .container-inner {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-2xl);
}

/* Cards */
.modern-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modern-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

/* Buttons - Minimal & Small */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    background: var(--accent-purple);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-modern:hover {
    background: var(--accent-purple-hover);
    box-shadow: var(--glow-purple);
    opacity: 0.95;
}

.btn-modern:active {
    transform: scale(0.98);
}

.btn-modern-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.btn-modern-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-purple);
    color: var(--text-primary);
    box-shadow: none;
}

/* Inputs */
.input-modern {
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 400;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    width: 100%;
    font-family: inherit;
}

.input-modern:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-purple-glow);
}

.input-modern::placeholder {
    color: var(--text-muted);
}

/* Links */
a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--accent-purple-hover);
    opacity: 0.9;
}

/* Typography */
h1 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h4 {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--grid-gap);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Result Cards */
.result-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.result-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* Compact Meters & Progress Bars */
.meter-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.meter-visual {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    position: relative;
}

.meter-content {
    flex: 1;
}

.meter-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.meter-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.meter-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: var(--spacing-sm);
}

.progress-fill {
    height: 100%;
    background: var(--accent-purple);
    border-radius: var(--radius-sm);
    transition: width 0.4s ease;
}

/* Option Cards */
.option-card-modern {
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.option-card-modern:hover {
    border-color: var(--accent-purple);
    background: var(--bg-card);
}

.option-card-modern.selected {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.08);
    box-shadow: var(--glow-purple);
}

/* Badges */
.badge-modern {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
}

.badge-success {
    background: var(--accent-success);
    color: white;
}

.badge-warning {
    background: var(--accent-warning);
    color: white;
}

.badge-danger {
    background: var(--accent-danger);
    color: white;
}

.badge-primary {
    background: var(--accent-purple);
    color: white;
}

/* Skeleton Loader */
.skeleton-loader {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 25%,
            rgba(255, 255, 255, 0.06) 50%,
            rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Chart Container - Compact */
.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 200px;
    max-height: 300px;
}

/* Footer */
.footer {
    width: 100%;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
}

.footer .container-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer a {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer a:hover {
    color: var(--accent-purple);
}

/* Disclaimer Banner */
.disclaimer-banner {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.disclaimer-banner p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-modern {
        height: 52px;
    }

    .navbar-modern .nav-links {
        gap: var(--spacing-md);
    }

    .main-content .container-inner {
        padding-top: var(--spacing-lg);
        padding-bottom: var(--spacing-xl);
    }

    .modern-card {
        padding: var(--spacing-md);
    }

    .btn-modern {
        width: 100%;
        padding: 0.625rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .meter-container {
        flex-direction: column;
        text-align: center;
    }

    .meter-visual {
        width: 100px;
        height: 100px;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 25px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--accent-purple);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
    transition: all 0.2s ease;
    z-index: 1000;
    opacity: 0.85;
}

.theme-toggle:hover {
    opacity: 1;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .theme-toggle {
        bottom: 25px;
        right: 25px;
        width: 47px;
        height: 47px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Mobile Sidebar - Dark Theme */
.sidebar {
    background: var(--bg-secondary, #0a0a0a);
    border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-header {
    border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-close {
    color: var(--text-secondary, #a0a0a0);
}

.sidebar-close:hover {
    background: var(--bg-hover, #1f1f1f);
    color: var(--text-primary, #fff);
}

.sidebar-link {
    color: var(--text-secondary, #a0a0a0);
}

.sidebar-link:hover {
    color: var(--accent-purple, #8b5cf6);
    background: var(--bg-hover, #1f1f1f);
}

/* Hamburger - Dark Theme */
.menu-toggle {
    color: var(--text-primary, #fff);
}

.menu-toggle:hover {
    background: var(--bg-hover, #1f1f1f);
}