/*
 * Pink Violet Dream - Obsidian Theme
 * Author: Ailyn Melillán (@_dammit_queen)
 * Version: 1.0.0
 * Description: Tema optimizado para estudio universitario con estética pastel, morada y rosa.
 */

body {
    --radius-s: 4px;
    --radius-m: 8px;
    --radius-l: 12px;
    
    --font-text: 'Times New Roman', serif;
    --font-ui: 'Times New Roman', serif;
    --font-interface: 'Times New Roman', serif;
    --h1-font: 'Times New Roman', serif;
    --h2-font: 'Times New Roman', serif;
    --h3-font: 'Times New Roman', serif;
    --h4-font: 'Times New Roman', serif;
    --h5-font: 'Times New Roman', serif;
    --h6-font: 'Times New Roman', serif;
}


body.theme-light {
    --background-primary: #FEF3F8; 
    --background-secondary: #FAEAEE; 
    --background-modifier-form-field: #FAEAEE; 
    --background-primary-alt: #FCDEEA;
    --background-secondary-alt: #F5DDE5;
    --background-modifier-border: #D8A7C9; 
    
    --icon-color: #6C2B8E;
    --icon-color-hover: #4E186D;
    --icon-color-active: #4E186D;
    --nav-item-color: #6C2B8E;
    --nav-item-color-hover: #4E186D;
    --nav-item-color-active: #4E186D;
    --nav-item-background-hover: rgba(108, 43, 142, 0.08);
    --nav-item-background-active: rgba(108, 43, 142, 0.12);
    --nav-folder-title-color: #4E186D;
    --tab-text-color: #6C2B8E;
    --tab-text-color-focused: #4E186D;
    --tab-text-color-focused-active: #2F0A47;
    --interactive-normal: rgba(108, 43, 142, 0.05);
    --interactive-hover: rgba(108, 43, 142, 0.1);
    --interactive-accent: #6C2B8E;
    --interactive-accent-hover: #4E186D;

    --text-normal: #3D2B4A; 
    --text-muted: #645073;
    --text-faint: #8B779A;
    
    --text-a: #6C2B8E; 
    --text-a-hover: #4E186D; 
    --bold-color: #4E186D; 
    --italic-color: #6C2B8E;
    --text-highlight-bg: rgba(108, 43, 142, 0.2); 
    --text-accent: #6C2B8E;

    --h1-color: #6a2c70; 
    --h2-color: #793e89; 
    --h3-color: #8751a1; 
    --h4-color: #9663ba; 
    --h5-color: #a476d3; 
    --h6-color: #b388eb; 

    --code-background: #FDF1F8;   
    --code-normal: #2F1E3D;       
    --code-string: #1B5E20;       
    --code-keyword: #D81159;      
    --code-function: #0D47A1;     
    --code-comment: #4A148C;      
    --code-operator: #800080;     
    --code-property: #005A9C;     
    --code-punctuation: #311B92;
    --code-value: #900C3F;

    --checkbox-border-color: #6C2B8E;       
    --checkbox-border-color-hover: #4E186D; 
    --checkbox-color: #6C2B8E;              
    --checkbox-marker-color: #FFFFFF;       
    --checklist-done-color: #8B779A;        
    --checklist-done-decoration: line-through;

    --tag-background: rgba(108, 43, 142, 0.1);    
    --tag-color: #6C2B8E;         
    --tag-border-color: transparent; 
    --tag-border-width: 0px;
    --tag-background-hover: rgba(108, 43, 142, 0.2);
    
    --hr-color: rgba(108, 43, 142, 0.2);
    --list-marker-color: #4E186D;
}

body.theme-light .markdown-rendered strong, body.theme-light .cm-strong { color: var(--bold-color); font-weight: bold; }
body.theme-light .markdown-rendered em, body.theme-light .cm-em { color: var(--italic-color); font-style: italic; }
body.theme-light .markdown-rendered mark, body.theme-light .cm-formatting-highlight, body.theme-light .cm-highlight { background-color: var(--text-highlight-bg); color: var(--text-normal); }
body.theme-light .markdown-rendered :not(pre) > code, body.theme-light .cm-inline-code { background-color: rgba(108, 43, 142, 0.08); color: #6C2B8E; border: 1px solid rgba(108, 43, 142, 0.15); border-radius: 4px; padding: 0.1em 0.3em; }
body.theme-light .markdown-rendered pre { border: 1px solid rgba(108, 43, 142, 0.15); }
body.theme-light .cm-header-1 { color: #6a2c70; }
body.theme-light .cm-header-2 { color: #793e89; }
body.theme-light .cm-header-3 { color: #8751a1; }
body.theme-light .cm-header-4 { color: #9663ba; }
body.theme-light .cm-header-5 { color: #a476d3; }
body.theme-light .cm-header-6 { color: #b388eb; }
body.theme-light .markdown-rendered hr { border-color: var(--hr-color); border-width: 2px; }

body.theme-light .markdown-rendered table {
    border-collapse: collapse;
    margin: 15px 0;
    background-color: #FFFFFF; 
    border: 1px solid rgba(108, 43, 142, 0.3);
}
body.theme-light .markdown-rendered th {
    background-color: rgba(108, 43, 142, 0.12);
    color: #2F0A47;
    font-weight: bold;
    border: 1px solid rgba(108, 43, 142, 0.3);
    padding: 10px 15px;
}
body.theme-light .markdown-rendered td {
    border: 1px solid rgba(108, 43, 142, 0.2);
    padding: 8px 15px;
}
body.theme-light .markdown-rendered tr:nth-child(even) td {
    background-color: rgba(108, 43, 142, 0.04);
}


body.theme-dark {
    --background-primary: #1B1026; 
    --background-secondary: #221330; 
    --background-modifier-form-field: #221330; 
    --background-primary-alt: #13091B; 
    --background-secondary-alt: #2D1A3D;
    --background-modifier-border: #422557;
    
    --icon-color: #CBAFDA;
    --icon-color-hover: #FFBBEA;
    --icon-color-active: #FF42A1;
    --nav-item-color: #E4D8F0;
    --nav-item-color-hover: #FFBBEA;
    --nav-item-color-active: #FFFFFF;
    --nav-item-background-hover: rgba(255, 66, 161, 0.15);
    --nav-item-background-active: rgba(255, 66, 161, 0.25);
    --nav-folder-title-color: #E4D8F0;
    --tab-text-color: #CBAFDA;
    --tab-text-color-focused: #FFBBEA;
    --tab-text-color-focused-active: #FF42A1;
    --interactive-normal: #381E4D;
    --interactive-hover: #4A2866;
    --interactive-accent: #FF42A1;
    --interactive-accent-hover: #FF2A85;

    --text-normal: #E4D8F0;
    --text-muted: #B8A5CC;
    --text-faint: #8B779A;
    
    --text-a: #FF42A1; 
    --text-a-hover: #FF7ABC;
    --bold-color: #FF42A1; 
    --italic-color: #FF92D0; 
    --text-highlight-bg: rgba(255, 66, 161, 0.3);
    --text-accent: #FF42A1;

    --h1-color: #FF1493; 
    --h2-color: #FF2A85; 
    --h3-color: #FF42A1; 
    --h4-color: #FF52A3; 
    --h5-color: #FF7ABC; 
    --h6-color: #FFA2D4; 

    --code-background: #120A1A;   
    --code-normal: #E4D8F0;       
    --code-string: #FFEA00;       
    --code-keyword: #FF1493;      
    --code-function: #8BE9FD;     
    --code-comment: #8c78b5;      
    --code-operator: #FF42A1;     
    --code-property: #00FFFF;
    --code-punctuation: #E9D2FF;
    --code-value: #8BE9FD;

    --checkbox-border-color: #FF42A1;       
    --checkbox-border-color-hover: #FF7ABC; 
    --checkbox-color: #FF42A1;              
    --checkbox-marker-color: #1B1026;       
    --checklist-done-color: #8B779A;        
    --checklist-done-decoration: line-through;

    --tag-background: rgba(255, 66, 161, 0.15);    
    --tag-color: #FF7ABC;         
    --tag-border-color: rgba(255, 66, 161, 0.3); 
    --tag-border-width: 1px;
    --tag-background-hover: rgba(255, 66, 161, 0.25);

    --hr-color: rgba(255, 66, 161, 0.3);
    --list-marker-color: #FF42A1;
}

body.theme-dark .markdown-rendered strong, body.theme-dark .cm-strong { color: var(--bold-color); font-weight: bold; text-shadow: 0 0 8px rgba(255, 121, 198, 0.2); }
body.theme-dark .markdown-rendered em, body.theme-dark .cm-em { color: var(--italic-color); font-style: italic; }
body.theme-dark .markdown-rendered strong em, body.theme-dark .cm-em.cm-strong { color: #FF42A1; font-weight: bold; font-style: italic; text-shadow: 0 0 10px rgba(255, 66, 161, 0.3); }
body.theme-dark .markdown-rendered a, body.theme-dark .cm-hmd-internal-link { color: var(--text-a); font-style: italic; font-weight: bold; }

body.theme-dark .markdown-rendered mark, body.theme-dark .cm-formatting-highlight, body.theme-dark .cm-highlight { background-color: var(--text-highlight-bg); color: var(--text-normal); }
body.theme-dark .markdown-rendered :not(pre) > code, body.theme-dark .cm-inline-code { background-color: rgba(255, 121, 198, 0.1); color: #FF92D0; border: 1px solid rgba(255, 121, 198, 0.2); border-radius: 4px; padding: 0.1em 0.3em; }
body.theme-dark .markdown-rendered pre { border: 1px solid rgba(255, 121, 198, 0.1); }
body.theme-dark .cm-header-1 { color: var(--h1-color); }
body.theme-dark .cm-header-2 { color: var(--h2-color); }
body.theme-dark .cm-header-3 { color: var(--h3-color); }
body.theme-dark .cm-header-4 { color: var(--h4-color); }
body.theme-dark .cm-header-5 { color: var(--h5-color); }
body.theme-dark .cm-header-6 { color: var(--h6-color); }
body.theme-dark .markdown-rendered hr { border-color: var(--hr-color); border-width: 2px; }

body.theme-dark .markdown-rendered table {
    border-collapse: collapse;
    margin: 15px 0;
    background-color: rgba(255, 121, 198, 0.05);
    border: 1px solid rgba(255, 121, 198, 0.2);
}
body.theme-dark .markdown-rendered th {
    background-color: rgba(255, 121, 198, 0.15);
    color: #FFF0F9;
    font-weight: bold;
    border: 1px solid rgba(255, 121, 198, 0.3);
    padding: 10px 15px;
}
body.theme-dark .markdown-rendered td {
    border: 1px solid rgba(255, 121, 198, 0.2);
    padding: 8px 15px;
}
body.theme-dark .markdown-rendered tr:nth-child(even) td {
    background-color: rgba(255, 121, 198, 0.08);
}


body.theme-dark .math, 
body.theme-dark .math-block, 
body.theme-dark .math-inline, 
body.theme-dark .mjx-container,
body.theme-dark .MathJax {
    color: #FFCCE3;
}

body .math-block > .mjx-container {
    padding: 10px;
    border-radius: var(--radius-m);
    background-color: rgba(128, 128, 128, 0.05);
}


body .markdown-rendered pre {
    position: relative;
    padding-top: 35px;
    border-radius: var(--radius-m);
    margin: 15px 0;
}
body .markdown-rendered pre::before {
    content: "</> CODE"; 
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    font-family: var(--font-interface);
    font-size: 0.85em;
    padding: 0 15px;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: bold;
    border-top-left-radius: var(--radius-m);
    border-top-right-radius: var(--radius-m);
}
body .markdown-rendered pre[class*="language-python"]::before { content: "PYTHON"; }
body .markdown-rendered pre[class*="language-js"]::before, 
body .markdown-rendered pre[class*="language-javascript"]::before { content: "JAVASCRIPT"; }
body .markdown-rendered pre[class*="language-css"]::before { content: "CSS"; }
body .markdown-rendered pre[class*="language-html"]::before { content: "HTML"; }
body .markdown-rendered pre[class*="language-c"]::before,
body .markdown-rendered pre[class*="language-cpp"]::before { content: "C / C++"; }
body .markdown-rendered pre[class*="language-java"]::before { content: "JAVA"; }
body .markdown-rendered pre[class*="language-sql"]::before { content: "SQL"; }
body .markdown-rendered pre[class*="language-bash"]::before,
body .markdown-rendered pre[class*="language-sh"]::before { content: "BASH / TERMINAL"; }

body.theme-light .markdown-rendered pre {
    background-color: var(--code-background); 
    box-shadow: 0 4px 10px rgba(108, 43, 142, 0.08);
}
body.theme-light .markdown-rendered pre::before {
    background-color: rgba(108, 43, 142, 0.08);
    border-bottom: 1px solid rgba(108, 43, 142, 0.15);
    color: #4E186D;
}
body.theme-dark .markdown-rendered pre {
    background-color: var(--code-background); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
body.theme-dark .markdown-rendered pre::before {
    background-color: rgba(255, 121, 198, 0.1);
    border-bottom: 1px solid rgba(255, 121, 198, 0.2);
    color: #FF92D0;
}


body .callout[data-callout="definition"],
body .callout[data-callout="theorem"] {
    border-radius: var(--radius-m);
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: none;
    border-left: 6px solid var(--callout-color);
}
body .callout[data-callout="definition"] .callout-title,
body .callout[data-callout="theorem"] .callout-title {
    font-size: 1.1em;
    font-weight: bold;
    font-family: var(--h3-font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
body.theme-light .callout[data-callout="definition"] {
    --callout-color: #6C2B8E; 
    background-color: rgba(108, 43, 142, 0.05);
}
body.theme-light .callout[data-callout="theorem"] {
    --callout-color: #4E186D; 
    background-color: rgba(78, 24, 109, 0.05);
}
body.theme-dark .callout[data-callout="definition"] {
    --callout-color: #FF79C6; 
    background-color: rgba(255, 121, 198, 0.1);
}
body.theme-dark .callout[data-callout="theorem"] {
    --callout-color: #FF42A1; 
    background-color: rgba(255, 66, 161, 0.1);
}


body .card {
    border-radius: var(--radius-l);
    padding: 20px;
    margin: 10px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}
body.theme-light .card {
    background-color: #FFFFFF;
    border: 1px solid rgba(108, 43, 142, 0.2);
    box-shadow: 0 2px 8px rgba(108, 43, 142, 0.05);
}
body.theme-light .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(108, 43, 142, 0.15);
    border-color: #6C2B8E;
    background-color: rgba(108, 43, 142, 0.02);
}
body.theme-dark .card {
    background-color: rgba(255, 121, 198, 0.05);
    border: 1px solid rgba(255, 121, 198, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
body.theme-dark .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(255, 121, 198, 0.2);
    border-color: #FF92D0;
    background-color: rgba(255, 121, 198, 0.1);
}


body .canvas-node-content { font-family: var(--font-text); }
body.theme-light .canvas-node-container {
    background-color: #FEF3F8; 
    border: 2px solid rgba(108, 43, 142, 0.3);
    border-radius: var(--radius-m);
    box-shadow: 0 4px 10px rgba(108, 43, 142, 0.1);
}
body.theme-light .canvas-node-container:hover,
body.theme-light .canvas-node.is-focused .canvas-node-container {
    border-color: #6C2B8E;
    box-shadow: 0 0 0 2px rgba(108, 43, 142, 0.3);
}
body.theme-light .canvas-edge-path { stroke: #6C2B8E; }
body.theme-light .canvas-color-1, body.theme-light .canvas-color-2, body.theme-light .canvas-color-3 {
    background-color: rgba(108, 43, 142, 0.05);
    border-color: #4E186D;
}
body.theme-dark .canvas-node-container {
    background-color: #1C1226; 
    border: 2px solid rgba(255, 121, 198, 0.3);
    border-radius: var(--radius-m);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
body.theme-dark .canvas-node-container:hover,
body.theme-dark .canvas-node.is-focused .canvas-node-container {
    border-color: #FF79C6;
    box-shadow: 0 0 0 2px rgba(255, 121, 198, 0.3);
}
body.theme-dark .canvas-edge-path { stroke: #FF79C6; }
body.theme-dark .canvas-color-1, body.theme-dark .canvas-color-2, body.theme-dark .canvas-color-3 {
    background-color: rgba(255, 121, 198, 0.1);
    border-color: #FF42A1;
}


body.theme-light .cm-keyword, body.theme-light span.token.keyword, body.theme-light .tok-keyword { color: var(--code-keyword); font-weight: bold; }
body.theme-light .cm-string, body.theme-light span.token.string, body.theme-light .tok-string { color: var(--code-string); }
body.theme-light .cm-comment, body.theme-light span.token.comment, body.theme-light .tok-comment { color: var(--code-comment); font-style: italic; }
body.theme-light .cm-variable, body.theme-light .cm-variable-2, body.theme-light .cm-variable-3, body.theme-light span.token.variable, body.theme-light span.token.property, body.theme-light .cm-type, body.theme-light .tok-variableName, body.theme-light .tok-typeName { color: var(--code-property); }
body.theme-light .cm-def, body.theme-light span.token.function, body.theme-light .tok-function { color: var(--code-function); }


body.theme-dark pre.language-java,
body.theme-dark pre.language-python,
body.theme-dark code[class*="language-"],
body.theme-dark .cm-embed-block pre {
    background-color: var(--code-background);
    color: var(--code-normal);
}



body.theme-dark .cm-keyword, body.theme-dark .token.keyword, body.theme-dark .tok-keyword, body.theme-dark span.tok-keyword, body.theme-dark .cm-statement, body.theme-dark .cm-modifier { color: #ff599e; font-weight: bold; }

body.theme-dark .cm-type, body.theme-dark .cm-className, body.theme-dark .token.class-name, body.theme-dark .token.builtin, body.theme-dark .tok-typeName, body.theme-dark .tok-className, body.theme-dark span.tok-typeName, body.theme-dark span.tok-className { color: #32c5f4; }

body.theme-dark .cm-def, body.theme-dark .cm-function, body.theme-dark .token.function, body.theme-dark .tok-function, body.theme-dark .tok-method, body.theme-dark span.tok-function, body.theme-dark span.tok-method { color: #a865f8; }

body.theme-dark .cm-string, body.theme-dark .cm-string-2, body.theme-dark .token.string, body.theme-dark .tok-string, body.theme-dark .tok-string2, body.theme-dark span.tok-string, body.theme-dark span.tok-string2 { color: #f9f871; }

body.theme-dark .cm-comment, body.theme-dark .token.comment, body.theme-dark .tok-comment, body.theme-dark span.tok-comment { color: #8c78b5; font-style: italic; }

body.theme-dark .cm-number, body.theme-dark .token.number, body.theme-dark .tok-number, body.theme-dark span.tok-number { color: #559cf9; }

body.theme-dark .cm-variable, body.theme-dark .cm-variable-2, body.theme-dark .cm-variable-3, body.theme-dark .cm-property, body.theme-dark .token.variable, body.theme-dark .token.property, body.theme-dark .tok-variableName, body.theme-dark .tok-propertyName, body.theme-dark span.tok-variableName, body.theme-dark span.tok-propertyName { color: #ff99c8; }

body.theme-dark .cm-operator, body.theme-dark .token.operator, body.theme-dark .tok-operator, body.theme-dark span.tok-operator { color: #ff599e; }

body.theme-dark .cm-punctuation, body.theme-dark .token.punctuation, body.theme-dark .tok-punctuation, body.theme-dark span.tok-punctuation { color: #f8f4ff; }


body.theme-dark .nav-files-container *,
body.theme-dark .workspace-ribbon *,
body.theme-dark .workspace-tab-header * {
    color: #d4b2e2;
}


body.theme-dark .nav-files-container svg,
body.theme-dark .workspace-ribbon svg,
body.theme-dark .workspace-tab-header svg,
body.theme-dark .clickable-icon,
body.theme-dark .clickable-icon svg {
    color: #d4b2e2;
    stroke: currentColor;
}


body.theme-dark .workspace-tab-header.is-active *,
body.theme-dark .workspace-tab-header.is-active svg {
    color: #ff99c8;
}
