@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&display=swap');
/* ===========================================================
🎨 Farbvariablen & Theme
=========================================================== */
:root {
--bg: #f0f2f5;
--text: #1c1c1e;
--header-gradient: linear-gradient(135deg, #4A90E2, #7B4397);
--meta-bg: rgba(255, 255, 255, 0.18);
--meta-text: #fff;
--box-bg: #ffffff;
--accent: #4A90E2;
/* Codeblock Light */
--code-bg: #f7f7f7;
--code-text: #2b2b2b;
--code-comment: #6a737d;
--code-keyword: #7B4397;
--code-string: #008000;
--code-number: #005cc5;
--code-function: #6f42c1;
--code-variable: #00509e;
--code-tag: #d73a49;
--code-attr: #b08800;
--code-error: #e5534b;
}
body.dark {
--bg: #1e1e2f;
--text: #e0e0e0;
--header-gradient: linear-gradient(135deg, #7B4397, #4A90E2);
--meta-bg: rgba(255, 255, 255, 0.1);
--meta-text: #f0f0f0;
--box-bg: #2a2a3b;
--accent: #7dafff;
/* Codeblock Dark */
--code-bg: #282c34;
--code-text: #abb2bf;
--code-comment: #5c6370;
--code-keyword: #c678dd;
--code-string: #98c379;
--code-number: #d19a66;
--code-function: #61afef;
--code-variable: #e5c07b;
--code-tag: #e06c75;
--code-attr: #d19a66;
--code-error: #e06c75;
}
/* ===========================================================
🧱 Grundlayout
=========================================================== */
body {
font-family: 'Poppins', sans-serif;
background: var(--bg);
color: var(--text);
max-width: 960px;
margin: 0 auto;
padding: 2rem;
line-height: 1.7;
transition: background 0.3s, color 0.3s;
}
/* ---------- HEADER ---------- */
header {
background: var(--header-gradient);
color: var(--meta-text);
padding: 3rem 2rem 4rem 2rem;
border-radius: 16px;
box-shadow: 0 10px 20px rgba(0,0,0,0.15);
text-align: center;
position: relative;
}
/* Header Top Left/Right */
.header-top-left,
.header-top-right {
position: absolute;
top: 1rem;
font-size: 0.95rem;
font-weight: 600;
}
.header-top-left { left: 2rem; }
.header-top-right { right: 2rem; }
.header-top-left:empty,
.header-top-right:empty { display: none; }
header h1 {
margin: 0 0 1rem 0;
font-weight: 700;
font-size: 2.8rem;
text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
/* Zurück-Button neben Fach */
.header-top-left {
position: absolute;
top: 1rem;
left: 2rem;
font-size: 0.95rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
}
.header-back a {
text-decoration: none;
color: var(--meta-text);
background: var(--meta-bg);
padding: 0.2rem 0.6rem;
border-radius: 8px;
transition: all 0.2s;
font-weight: 600;
}
.header-back a:hover {
background: rgba(255,255,255,0.3);
transform: scale(1.05);
}
.meta {
margin-top: 0.8rem;
font-size: 1rem;
display: inline-block;
padding: 0.7rem 1.4rem;
border-radius: 12px;
background: var(--meta-bg);
color: var(--meta-text);
box-shadow: 0 6px 16px rgba(0,0,0,0.2);
backdrop-filter: blur(10px);
line-height: 1.5;
transition: background 0.3s;
}
.meta:empty { display: none; }
/* Theme Toggle */
.theme-toggle {
position: absolute;
bottom: 1rem;
right: 2rem;
background: var(--meta-bg);
color: var(--meta-text);
border: none;
padding: 0.5rem 1rem;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
font-size: 0.9rem;
transition: all 0.2s;
}
.theme-toggle:hover {
background: rgba(255,255,255,0.3);
transform: scale(1.05);
}
/* ---------- MAIN ---------- */
main {
background: var(--box-bg);
padding: 2.5rem;
border-radius: 16px;
margin-top: 2rem;
box-shadow: 0 8px 24px rgba(0,0,0,0.12);
transition: background 0.3s, box-shadow 0.3s;
}
h1, h2, h3 { color: var(--accent); }
img {
max-width: 100%;
border-radius: 12px;
margin: 1.2rem 0;
box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
/* ---------- FOOTER ---------- */
footer {
margin-top: 3rem;
text-align: center;
font-size: 0.85rem;
color: var(--text);
}
/* ===========================================================
💻 Code & Syntax Highlighting
=========================================================== */
code {
background: var(--code-bg);
color: var(--code-text);
padding: 0.25em 0.5em;
border-radius: 6px;
font-family: 'Fira Code', monospace;
font-size: 0.95em;
}
pre, .highlight {
background: var(--code-bg);
color: var(--code-text);
padding: 1.2rem 1.4rem;
border-radius: 14px;
overflow-x: auto;
box-shadow: 0 6px 20px rgba(0,0,0,0.15);
font-family: 'Fira Code', monospace;
font-size: 0.95em;
line-height: 1.6;
margin: 1.5rem 0;
}
/* Copy-Button für Codeblocks */
.copy-btn {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background: rgba(255, 255, 255, 0.15); /* helles Overlay für Light-Theme */
color: var(--text);
border: none;
padding: 0.25rem 0.7rem;
border-radius: 6px;
font-size: 0.85rem;
font-weight: 500;
cursor: pointer;
transition: background 0.2s, color 0.2s, transform 0.2s;
}
/* Dark Theme Anpassung */
body.dark .copy-btn {
background: rgba(255, 255, 255, 0.1);
color: var(--text);
}
/* Hover Effekt */
.copy-btn:hover {
background: var(--accent);
color: #fff;
transform: scale(1.05);
}
/* Rouge Tokens */
.highlight .c { color: var(--code-comment); font-style: italic; }
.highlight .k { color: var(--code-keyword); font-weight: 600; }
.highlight .s { color: var(--code-string); }
.highlight .n { color: var(--code-variable); }
.highlight .nf { color: var(--code-function); }
.highlight .o { color: var(--code-keyword); }
.highlight .mi,
.highlight .m { color: var(--code-number); }
.highlight .nb,
.highlight .bp { color: var(--code-variable); }
.highlight .nt { color: var(--code-tag); }
.highlight .na { color: var(--code-attr); }
.highlight .nv { color: var(--code-variable); }
.highlight .err { color: var(--code-error); background: rgba(255,0,0,0.15); }
/* Scrollbars für Code */
.highlight::-webkit-scrollbar { height: 8px; }
.highlight::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 8px; }
.highlight::-webkit-scrollbar-track { background: transparent; }