/* Professional Security Report Theme */
:root {
    /* Professional Color Palette */
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --accent: #06b6d4;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    
    /* Rich Background System */
    --bg: #0a0e1a;
    --bg-gradient: linear-gradient(135deg, #0a0e1a 0%, #1a1a2e 30%, #16213e 70%, #0f172a 100%);
    --bg-glass: rgba(30, 41, 59, 0.9);
    --bg-card: rgba(15, 23, 42, 0.95);
    --bg-soft: rgba(51, 65, 85, 0.8);
    --bg-muted: rgba(71, 85, 105, 0.6);
    
    /* Enhanced Typography */
    --text: #ffffff;
    --text-muted: #cbd5e1;
    --text-light: #94a3b8;
    
    /* Borders & Effects */
    --border: rgba(59, 130, 246, 0.2);
    --border-glow: rgba(59, 130, 246, 0.4);
    --glass-border: rgba(59, 130, 246, 0.3);
    
    /* Advanced Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    --shadow-neon: 0 0 30px rgba(59, 130, 246, 0.4);
}

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

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

/* Rich Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 60% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(20px) rotate(-1deg); }
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 3rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

/* Glassmorphism Sidebars */
.sidebar, .toc-sidebar {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky;
    top: 2rem;
}

.sidebar {
    height: fit-content;
    z-index: 100;
}

.toc-sidebar {
    height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.sidebar:hover, .toc-sidebar:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-2xl), 0 0 25px rgba(59, 130, 246, 0.4);
}

/* Search Styling */
#search-container {
    position: relative;
    margin-bottom: 0.5rem;
}

#search-input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

#search-input:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

#search-input::placeholder {
    color: var(--text-muted);
}

/* Search Hint - Hidden by default, shown on hover */
.search-hint {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-muted);
    color: var(--text-muted);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

#search-container:hover .search-hint,
#search-input:focus + .search-hint {
    opacity: 1;
}

/* Search Results */
#search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin: 0;
    padding: 0;
}

#search-results.show {
    display: block;
}

.search-result {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.search-result:hover {
    background: var(--bg-soft);
    transform: translateX(4px);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    border-left: 3px solid var(--primary);
}

.search-result:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.search-result:first-child {
    border-radius: 12px 12px 0 0;
}

/* Table of Contents */
.toc {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    margin-top: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-muted);
    position: relative;
    z-index: 10;
}

.toc::-webkit-scrollbar {
    width: 6px;
}

.toc::-webkit-scrollbar-track {
    background: var(--bg-muted);
    border-radius: 3px;
}

.toc::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.toc h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    text-align: center;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
    position: relative;
    animation: slideInFromRight 0.5s ease-out;
}

.toc a:hover,
.toc a.active {
    color: var(--primary);
    background: var(--bg-soft);
    border-left-color: var(--primary);
    transform: translateX(6px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2), 0 0 15px rgba(59, 130, 246, 0.3);
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Main Content */
.main-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-width: none;
    width: 100%;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 20px 20px 0 0;
}

.main-content:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    border-color: var(--border-glow);
}

.main-content:hover::before {
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Professional Typography */
h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #3b82f6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

h1:hover {
    transform: translateY(-3px) scale(1.01);
    filter: brightness(1.1);
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 3rem 0 1.5rem 0;
    color: var(--text);
    position: relative;
    padding-bottom: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInFromLeft 0.6s ease-out;
}

h2:hover {
    color: var(--primary);
    transform: translateX(8px) scale(1.02);
    text-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 4rem;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

h2:hover::after {
    width: 6rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: var(--text);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
}

h3:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text);
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out;
}

p:hover {
    color: var(--text);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
    transition: all 0.3s ease;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alerts */
.alert {
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.alert.warning {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
    color: var(--warning);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.alert.info {
    border-color: var(--info);
    background: rgba(6, 182, 212, 0.05);
    color: var(--info);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.alert.danger {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
    color: var(--danger);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.alert.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
    color: var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.alert:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(59, 130, 246, 0.2);
    border-color: var(--border-glow);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

table:hover {
    box-shadow: var(--shadow-glow), var(--shadow-lg), 0 0 25px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    border-color: var(--border-glow);
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: linear-gradient(135deg, var(--bg-muted), var(--primary));
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover {
    background: var(--bg-soft);
}

/* Code Blocks */
pre {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid var(--primary);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

pre:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), var(--shadow-xl), 0 0 25px rgba(59, 130, 246, 0.3);
    border-color: var(--border-glow);
}

code {
    background: var(--bg-muted);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

pre code {
    background: none;
    padding: 0;
    color: var(--text);
}

/* Copy Button */
.copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.copy-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.copy-button.copied {
    background: var(--primary-light);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

pre:hover .copy-button {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline */
.timeline-item {
    display: flex;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.3);
    border-color: var(--border-glow);
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.back-link::before {
    content: '←';
    margin-right: 0.5rem;
    font-weight: 600;
}

.back-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s;
}

.back-link:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-4px);
    box-shadow: var(--shadow-glow), var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.4);
    border-color: var(--border-glow);
}

.back-link:hover::after {
    left: 100%;
}

/* Severity Indicators */
.severity-critical {
    color: var(--danger);
    font-weight: 700;
    background: rgba(239, 68, 68, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--danger);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    animation: pulse 2s infinite;
}

.severity-high {
    color: var(--warning);
    font-weight: 700;
    background: rgba(245, 158, 11, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--warning);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.3), 0 0 30px rgba(239, 68, 68, 0.5); }
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: block;
    width: 100%;
}

img:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(59, 130, 246, 0.3);
    border-color: var(--border-glow);
}

/* Executive Summary */
.executive-summary {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.executive-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.executive-summary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), var(--shadow-lg), 0 0 25px rgba(59, 130, 246, 0.3);
    border-color: var(--border-glow);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
        grid-template-columns: 250px 1fr 250px;
        gap: 2rem;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
    }
    
    .toc-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        max-width: 100%;
    }
    
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 100;
        margin-bottom: 1rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    img {
        width: 100%;
        height: auto;
        margin: 1rem 0;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Hover Effects */
.alert:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

table:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

pre:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-glow), var(--shadow-2xl);
}

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

/* Enhanced List Hover Effects */
li {
    transition: all 0.3s ease;
    padding: 0.25rem 0;
    border-radius: 4px;
}

li:hover {
    transform: translateX(4px);
    background: rgba(59, 130, 246, 0.1);
    padding-left: 0.5rem;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* Enhanced Hover Effects for All Elements */
h3:hover {
    color: var(--primary);
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Print Styles */
@media print {
    .sidebar, .toc-sidebar {
        display: none;
    }
    
    .main-content {
        box-shadow: none;
        border: none;
        background: white;
        color: black;
    }
}