/**
 * Custom Prism.js Syntax Highlighting
 * Blurred transparent background with enhanced type highlighting
 * Support for Python, C, Assembly, and Windows API types
 */

/* Code block container with blurred transparent background */
pre[class*="language-"] {
    position: relative;
    background: rgba(10, 10, 10, 0.6) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 199, 212, 0.2);
    border-radius: 8px;
    padding: 1.5rem !important;
    margin: 1.5rem 0;
    overflow: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Inline code with subtle transparent background */
:not(pre) > code[class*="language-"],
:not(pre) > code {
    background: rgba(10, 10, 10, 0.5) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 199, 212, 0.15);
    border-radius: 4px;
    padding: 0.2em 0.4em;
    color: #00c7d4;
    font-family: var(--font-code);
    font-size: 0.9em;
}

/* Scrollbar styling for code blocks */
pre[class*="language-"]::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

pre[class*="language-"]::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

pre[class*="language-"]::-webkit-scrollbar-thumb {
    background: rgba(0, 199, 212, 0.4);
    border-radius: 4px;
}

pre[class*="language-"]::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 199, 212, 0.6);
}

/* Enhanced syntax highlighting colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #5c6370;
    font-style: italic;
}

.token.punctuation {
    color: #abb2bf;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #d19a66;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #98c379;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #56b6c2;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #c678dd;
}

.token.function {
    color: #61afef;
}

.token.regex,
.token.important,
.token.variable {
    color: #e06c75;
}

/* Enhanced type highlighting - Windows API and general types */
.token.class-name,
.token.type-name,
.token.type,
.token.typedef {
    color: #e5c07b !important;
    font-weight: 600;
}

/* Windows API specific types and macros */
.token.windows-type,
.token.macro {
    color: #e5c07b !important;
    font-weight: 600;
}

/* Enhanced highlighting for specific keywords */
.token.keyword.control {
    color: #c678dd;
    font-weight: 600;
}

.token.keyword.type {
    color: #e5c07b;
    font-weight: 600;
}

/* Assembly specific tokens */
.token.register {
    color: #d19a66 !important;
    font-weight: 600;
}

.token.instruction {
    color: #c678dd !important;
    font-weight: 500;
}

.token.label {
    color: #61afef !important;
}

.token.directive {
    color: #56b6c2 !important;
}

/* Python specific enhancements */
.language-python .token.decorator {
    color: #e5c07b;
}

.language-python .token.builtin-class {
    color: #e5c07b;
    font-weight: 600;
}

/* C/C++ specific enhancements */
.language-c .token.macro,
.language-cpp .token.macro {
    color: #e06c75;
}

.language-c .token.directive-hash,
.language-cpp .token.directive-hash {
    color: #abb2bf;
}

/* Line highlighting for important code */
pre[class*="language-"] .line-highlight {
    background: rgba(0, 199, 212, 0.1);
    border-left: 3px solid #00c7d4;
}

/* Line numbers styling (if enabled) */
.line-numbers .line-numbers-rows {
    border-right: 1px solid rgba(0, 199, 212, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.line-numbers-rows > span:before {
    color: #5c6370;
}

/* Selection styling */
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
    background: rgba(0, 199, 212, 0.3);
}

/* Improved contrast for better readability */
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.namespace {
    opacity: 0.8;
}

/* Windows API common types and functions */
/* These will be matched as class-name tokens by Prism */
pre[class*="language-"] code {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hover effect for code blocks */
pre[class*="language-"]:hover {
    border-color: rgba(0, 199, 212, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                0 0 20px rgba(0, 199, 212, 0.1);
    transition: all 0.3s ease;
}
