it-praxisportal/assets/style.css

516 lines
9.8 KiB
CSS

/* ==========================================================================
Modernes Design-System für Python OOP Lernportal
========================================================================== */
:root {
--primary: #6366f1;
--primary-hover: #4f46e5;
--primary-light: #eef2ff;
--secondary: #06b6d4;
--success: #10b981;
--success-light: #ecfdf5;
--warning: #f59e0b;
--warning-light: #fffbeb;
--danger: #ef4444;
--danger-light: #fef2f2;
--purple: #8b5cf6;
--purple-light: #f5f3ff;
--bg-main: #f8fafc;
--bg-card: #ffffff;
--bg-code: #1e293b;
--border-color: #e2e8f0;
--text-main: #1e293b;
--text-muted: #64748b;
--text-code: #f1f5f9;
--radius-sm: 6px;
--radius-md: 12px;
--radius-lg: 18px;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
--shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
--font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
--font-mono: 'Fira Code', 'JetBrains Mono', Consolas, Monaco, 'Courier New', monospace;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: var(--font-sans);
background-color: var(--bg-main);
color: var(--text-main);
line-height: 1.65;
font-size: 16px;
padding-bottom: 60px;
}
/* Header & Navigation */
header {
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
color: white;
padding: 30px 20px;
box-shadow: var(--shadow-md);
margin-bottom: 35px;
}
.header-container {
max-width: 900px;
margin: 0 auto;
}
.nav-links {
display: flex;
gap: 15px;
margin-bottom: 15px;
font-size: 0.9rem;
flex-wrap: wrap;
}
.nav-links a {
color: rgba(255, 255, 255, 0.85);
text-decoration: none;
background: rgba(255, 255, 255, 0.15);
padding: 4px 12px;
border-radius: 20px;
transition: all 0.2s;
display: inline-flex;
align-items: center;
gap: 6px;
}
.nav-links a:hover {
background: rgba(255, 255, 255, 0.3);
color: white;
transform: translateY(-1px);
}
.header-badge {
display: inline-block;
background: rgba(255, 255, 255, 0.2);
padding: 4px 12px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 8px;
}
header h1 {
font-size: 2.1rem;
font-weight: 800;
margin-bottom: 6px;
line-height: 1.25;
}
header p {
font-size: 1.1rem;
opacity: 0.9;
}
/* Main Container */
.container {
max-width: 900px;
margin: 0 auto;
padding: 0 20px;
}
/* Content Cards */
.card {
background: var(--bg-card);
border-radius: var(--radius-md);
padding: 28px;
margin-bottom: 25px;
border: 1px solid var(--border-color);
box-shadow: var(--shadow-sm);
}
.card h2 {
font-size: 1.45rem;
color: var(--primary);
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 10px;
border-bottom: 2px solid var(--primary-light);
padding-bottom: 8px;
}
.card h3 {
font-size: 1.2rem;
margin: 20px 0 10px 0;
color: var(--text-main);
}
.card p {
margin-bottom: 14px;
}
/* Didactic Callout Boxes */
.box {
border-radius: var(--radius-md);
padding: 18px 22px;
margin: 20px 0;
border-left: 5px solid;
}
.box-title {
font-weight: 700;
font-size: 1.05rem;
margin-bottom: 8px;
display: flex;
align-items: center;
gap: 8px;
}
.box-analogie {
background-color: var(--purple-light);
border-left-color: var(--purple);
color: #4c1d95;
}
.box-tipp {
background-color: var(--primary-light);
border-left-color: var(--primary);
color: #312e81;
}
.box-warning {
background-color: var(--warning-light);
border-left-color: var(--warning);
color: #78350f;
}
.box-danger {
background-color: var(--danger-light);
border-left-color: var(--danger);
color: #7f1d1d;
}
.box-success {
background-color: var(--success-light);
border-left-color: var(--success);
color: #064e3b;
}
/* Code Blocks */
.code-container {
background-color: var(--bg-code);
border-radius: var(--radius-md);
margin: 18px 0;
overflow: hidden;
box-shadow: var(--shadow-sm);
}
.code-header {
background-color: #0f172a;
color: #94a3b8;
padding: 8px 16px;
font-size: 0.8rem;
font-family: var(--font-mono);
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.code-dots {
display: flex;
gap: 6px;
}
.code-dot {
width: 10px;
height: 10px;
border-radius: 50%;
}
.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }
pre {
margin: 0;
padding: 16px;
overflow-x: auto;
font-family: var(--font-mono);
font-size: 0.92rem;
color: var(--text-code);
line-height: 1.55;
}
code {
font-family: var(--font-mono);
font-size: 0.9em;
background-color: #f1f5f9;
color: #e11d48;
padding: 2px 6px;
border-radius: var(--radius-sm);
}
pre code {
background-color: transparent;
color: inherit;
padding: 0;
}
/* Code Syntax Highlights */
.kw { color: #f472b6; font-weight: bold; }
.fn { color: #60a5fa; }
.str { color: #a7f3d0; }
.num { color: #fbbf24; }
.cm { color: #64748b; font-style: italic; }
.var { color: #cbd5e1; }
.attr { color: #38bdf8; }
/* Keyboard Shortcut Badges */
kbd {
display: inline-block;
padding: 3px 7px;
font-family: var(--font-mono);
font-size: 0.85em;
font-weight: 700;
color: #334155;
background-color: #f1f5f9;
border: 1px solid #cbd5e1;
border-bottom: 2px solid #94a3b8;
border-radius: 4px;
box-shadow: 0 1px 1px rgba(0,0,0,0.1);
margin: 0 2px;
}
/* Extension Cards (for VS Code Guide) */
.extension-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 16px;
margin: 20px 0;
}
.extension-card {
background: #ffffff;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 16px;
display: flex;
gap: 14px;
align-items: flex-start;
box-shadow: var(--shadow-sm);
transition: transform 0.2s, border-color 0.2s;
}
.extension-card:hover {
transform: translateY(-2px);
border-color: var(--primary);
}
.extension-icon {
font-size: 1.8rem;
background: var(--primary-light);
width: 44px;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-sm);
flex-shrink: 0;
}
.extension-info h4 {
font-size: 1.05rem;
color: var(--text-main);
margin-bottom: 4px;
}
.extension-info p {
font-size: 0.88rem;
color: var(--text-muted);
margin-bottom: 0;
line-height: 1.4;
}
/* Accordion / Details */
details {
background: #f8fafc;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 12px 16px;
margin: 12px 0;
transition: all 0.2s;
}
details[open] {
background: #ffffff;
border-color: var(--primary);
}
summary {
font-weight: 600;
cursor: pointer;
color: var(--primary);
user-select: none;
display: flex;
align-items: center;
gap: 8px;
}
summary:hover {
color: var(--primary-hover);
}
.details-content {
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid var(--border-color);
}
/* Checklists & Tasks */
.task-list {
list-style: none;
margin: 15px 0;
}
.task-item {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 10px 14px;
background: #ffffff;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
margin-bottom: 8px;
transition: background 0.2s;
}
.task-item:hover {
background: var(--primary-light);
}
.task-checkbox {
width: 18px;
height: 18px;
margin-top: 3px;
accent-color: var(--primary);
cursor: pointer;
}
.task-label {
flex: 1;
}
/* Grid & Roadmap Cards (for Overview) */
.roadmap-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 20px;
margin: 25px 0;
}
.roadmap-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 20px;
text-decoration: none;
color: var(--text-main);
display: flex;
flex-direction: column;
justify-content: space-between;
transition: all 0.25s ease;
box-shadow: var(--shadow-sm);
}
.roadmap-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: var(--primary);
}
.roadmap-number {
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
color: var(--primary);
background: var(--primary-light);
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
margin-bottom: 10px;
align-self: flex-start;
}
.roadmap-title {
font-size: 1.2rem;
font-weight: 700;
margin-bottom: 8px;
color: var(--text-main);
}
.roadmap-desc {
font-size: 0.92rem;
color: var(--text-muted);
margin-bottom: 14px;
flex: 1;
}
.roadmap-footer {
font-size: 0.85rem;
font-weight: 600;
color: var(--primary);
display: flex;
align-items: center;
gap: 6px;
}
/* Buttons & Links */
.btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 18px;
background: var(--primary);
color: white;
text-decoration: none;
font-weight: 600;
border-radius: var(--radius-sm);
border: none;
cursor: pointer;
transition: all 0.2s;
box-shadow: var(--shadow-sm);
}
.btn:hover {
background: var(--primary-hover);
transform: translateY(-1px);
}
.btn-secondary {
background: #f1f5f9;
color: var(--text-main);
border: 1px solid var(--border-color);
}
.btn-secondary:hover {
background: #e2e8f0;
}
.footer-nav {
display: flex;
justify-content: space-between;
margin-top: 35px;
gap: 15px;
flex-wrap: wrap;
}
/* Responsive */
@media (max-width: 600px) {
header h1 { font-size: 1.6rem; }
.card { padding: 18px; }
.footer-nav { flex-direction: column; }
.footer-nav .btn { width: 100%; justify-content: center; }
.extension-grid { grid-template-columns: 1fr; }
}