/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Beautiful Professional Dark Theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-code: #0d1117;
    --bg-card: #161b22;
    --text-primary: #ffffff;
    --text-secondary: #e6edf3;
    --text-muted: #7d8590;
    --text-accent: #58a6ff;
    --accent-primary: #00d4aa;
    --accent-secondary: #39d353;
    --accent-tertiary: #58a6ff;
    --accent-danger: #f85149;
    --accent-warning: #d29922;
    --accent-success: #3fb950;
    --border-color: #30363d;
    --border-light: #21262d;
    --border-accent: #00d4aa;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #00d4aa 0%, #39d353 100%);
    --gradient-secondary: linear-gradient(135deg, #58a6ff 0%, #00d4aa 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a0a 0%, #111111 50%, #1a1a1a 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: var(--font-primary);
    background: var(--gradient-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 20px rgba(0, 212, 170, 0.4));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 170, 0.3);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* Access Panel */
.access-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: 0 8px 32px var(--shadow-color), 0 0 0 1px rgba(0, 212, 170, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.access-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

.access-panel h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.access-panel p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Access Form */
.access-form {
    max-width: 500px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.input-group input {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(0, 212, 170, 0.2), 0 0 20px rgba(0, 212, 170, 0.1);
}

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

/* Access Button */
.access-btn {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
    position: relative;
    overflow: hidden;
}

.access-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.access-btn:hover::before {
    left: 100%;
}

.access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

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

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.access-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Error Message */
.error-message {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--accent-danger);
    margin-top: var(--spacing-md);
    text-align: center;
    box-shadow: 0 4px 12px rgba(248, 81, 73, 0.2);
    backdrop-filter: blur(10px);
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-color), 0 0 0 1px rgba(0, 212, 170, 0.2);
    border-color: var(--accent-primary);
}

.info-card:hover::before {
    opacity: 1;
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-xl);
    background: var(--bg-primary);
    margin-left: calc(-1 * var(--spacing-lg));
    margin-right: calc(-1 * var(--spacing-lg));
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

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

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.footer a:hover::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .access-panel {
        padding: var(--spacing-lg);
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
}

/* Report Styles */
.report-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color), 0 0 0 1px rgba(0, 212, 170, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.report-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.report-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.report-title {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(0, 212, 170, 0.3);
}

.report-meta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-icon {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.3));
}

/* Markdown Content Styles - Professional & Overflow-Safe */
.report-content {
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.report-content h1,
.report-content h2,
.report-content h3,
.report-content h4,
.report-content h5,
.report-content h6 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    line-height: 1.3;
}

.report-content h1 { 
    font-size: 1.875rem; 
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
    position: relative;
}

.report-content h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
}

.report-content h2 { 
    font-size: 1.5rem; 
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.report-content h3 { 
    font-size: 1.25rem; 
    color: var(--text-accent);
}
.report-content h4 { 
    font-size: 1.125rem; 
    color: var(--text-primary);
}

.report-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    text-align: justify;
}

.report-content ul,
.report-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.report-content li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    line-height: 1.6;
}

.report-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    background: rgba(0, 212, 170, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.report-content blockquote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 0 2px 2px 0;
}

/* Inline Code */
.report-content code {
    background: var(--bg-code);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-primary);
    border: 1px solid var(--border-light);
    word-break: break-all;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Code Blocks - Fixed Overflow */
.report-content pre {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    overflow-x: auto;
    overflow-y: hidden;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    position: relative;
    max-width: 100%;
    white-space: pre;
    line-height: 1.5;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 212, 170, 0.1);
}

.report-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

.report-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    border: none;
    word-break: normal;
    white-space: pre;
    overflow-wrap: normal;
}

/* Long Text Handling */
.report-content pre code {
    display: block;
    width: max-content;
    min-width: 100%;
}

/* Tables - Responsive */
.report-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.report-content table table {
    display: table;
    width: 100%;
    min-width: 600px;
}

.report-content th,
.report-content td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    word-wrap: break-word;
    max-width: 200px;
}

.report-content th {
    background: var(--bg-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    position: sticky;
    top: 0;
    position: relative;
}

.report-content th::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: -1;
}

.report-content td {
    color: var(--text-primary);
}

/* Links */
.report-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s ease;
    word-break: break-all;
}

.report-content a:hover {
    text-decoration-color: var(--accent-primary);
}

/* Strong and Emphasis */
.report-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.report-content em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Horizontal Rules */
.report-content hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-lg) 0;
}

/* Long URLs and Text Breaking */
.report-content {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.report-content pre,
.report-content code {
    word-break: normal;
    overflow-wrap: normal;
}

/* Scrollbar Styling for Code Blocks */
.report-content pre::-webkit-scrollbar {
    height: 8px;
}

.report-content pre::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.report-content pre::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

.report-content pre::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Global scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

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

/* Back Link */
.back-link {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
}

.back-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.2);
    text-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
}

/* Subtle Professional Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Apply subtle animations */
.container {
    animation: fadeIn 0.4s ease-out;
}

.info-card {
    animation: fadeIn 0.4s ease-out;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.info-card:nth-child(2) {
    animation-delay: 0.15s;
}

.info-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Loading state */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Severity Badges */
.severity-critical { 
    color: var(--accent-danger);
    font-weight: 600;
    background: rgba(248, 81, 73, 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(248, 81, 73, 0.3);
    box-shadow: 0 2px 8px rgba(248, 81, 73, 0.2);
    text-shadow: 0 0 10px rgba(248, 81, 73, 0.3);
}
.severity-high { 
    color: var(--accent-warning);
    font-weight: 600;
    background: rgba(210, 153, 34, 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(210, 153, 34, 0.3);
    box-shadow: 0 2px 8px rgba(210, 153, 34, 0.2);
    text-shadow: 0 0 10px rgba(210, 153, 34, 0.3);
}
.severity-medium { 
    color: #fbbf24;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}
.severity-low { 
    color: var(--accent-success);
    font-weight: 600;
    background: rgba(63, 185, 80, 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(63, 185, 80, 0.3);
    box-shadow: 0 2px 8px rgba(63, 185, 80, 0.2);
    text-shadow: 0 0 10px rgba(63, 185, 80, 0.3);
}
.severity-info { 
    color: var(--text-accent);
    font-weight: 600;
    background: rgba(88, 166, 255, 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(88, 166, 255, 0.3);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.2);
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: rgba(0, 212, 170, 0.3);
    color: var(--text-primary);
}