body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border: none;
    border-radius: 10px;
}

.btn-primary {
    background-color: #0d6efd;
    border: none;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.badge-admin {
    background-color: #dc3545;
}

.badge-lehrer {
    background-color: #0dcaf0;
}

.badge-user {
    background-color: #198754;
}

/* Dashboard Hover Effects */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Notizbuch special hover: red X overlay + slight distortion */
.notizbuch-card {
    position: relative;
    overflow: hidden;
}
.notizbuch-card .card-body {
    transition: transform 0.35s ease, filter 0.35s ease;
}
.notizbuch-card::before,
.notizbuch-card::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 140%;
    height: 6px;
    background: rgba(220,53,69,0.95); /* bootstrap danger-ish red */
    transform-origin: center;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.35s ease;
    pointer-events: none;
}
.notizbuch-card::before { transform: translate(-50%, -50%) rotate(45deg); }
.notizbuch-card::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.notizbuch-card:hover::before,
.notizbuch-card:hover::after {
    opacity: 1;
}
.notizbuch-card:hover .card-body {
    transform: scale(1.02) rotate(-2deg) skewX(-3deg);
    filter: saturate(0.9) contrast(0.95);
}

/* add a subtle shake/glitch for a split-second when hover begins */
@keyframes notizbuch-glitch {
  0% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}
.notizbuch-card:hover { animation: notizbuch-glitch 0.28s linear; }

/* Smooth animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease;
}

/* Header Styles */
.navbar-brand:hover {
    transform: scale(1.05);
/* ===== ENGLISH CULTURE SECTION ===== */
}

/* ========== ENGLISH CULTURE CARDS ========== */
#cultureListe .culture-card {
    background: linear-gradient(180deg, #ffffff, #fbfbff);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(16,24,40,0.04);
    box-shadow: 0 6px 22px rgba(16,24,40,0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
#cultureListe .culture-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(16,24,40,0.12) !important;
}
#cultureListe .culture-title {
    font-weight: 700;
    font-size: 1.12rem;
    color: #0d6efd;
}
#cultureListe .culture-desc {
    color: #6c757d;
}
#cultureListe .culture-actions {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
}
#cultureListe .culture-actions .btn {
    border-radius: 8px;
    padding: 0.25rem 0.45rem;
}
#cultureListe .culture-content {
    margin-top: 0.6rem;
    color: #212529;
    line-height: 1.55;
}
#cultureListe .culture-content strong {
    font-weight: 700;
    color: #0b5ed7;
}
#cultureListe .culture-content ul {
    margin: 0.25rem 0 0.25rem 1rem;
    padding-left: 0.75rem;
}
#cultureListe .culture-content li {
    margin: 0.25rem 0;
}
#cultureListe .culture-preview,
#cultureListe .culture-extra {
    white-space: pre-wrap; /* preserve newlines from markdown/plain text */
}
#cultureListe .culture-extra.d-none { display: none; }
#cultureListe .culture-readmore button {
    color: #0d6efd;
    font-weight: 600;
}
#cultureListe .culture-readmore button:hover {
    text-decoration: underline;
}

@media (max-width: 575px) {
    #cultureListe .culture-card { padding: 0.75rem; }
    #cultureListe .culture-title { font-size: 1rem; }
}

/* small helper for the 'Mehr lesen' link area to align spacing */
.culture-readmore { margin-top: 0.5rem; }

/* ===== FRENCH CULTURE IMPROVEMENTS ===== */
/* Grid layout for culture entries so they form responsive cards */
#cultureListe .culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    align-items: start;
}

/* Card surface: larger padding, subtle border and soft background */
#cultureListe .culture-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    background: linear-gradient(180deg, #ffffff, #fafbff);
    border: 1px solid rgba(16,24,40,0.06);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(12, 18, 35, 0.06);
}

/* Left area for icon / thumbnail */
#cultureListe .culture-icon {
    flex: 0 0 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    background: linear-gradient(135deg, rgba(13,110,253,0.08), rgba(102,126,234,0.06));
    color: #0d6efd;
}

/* Main content area */
#cultureListe .culture-body {
    flex: 1 1 auto;
}

#cultureListe .culture-title {
    font-weight: 800;
    font-size: 1.08rem;
    color: #0b5ed7;
    margin-bottom: 0.15rem;
}

#cultureListe .culture-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.6rem;
}

/* Emphasize small headings inside content like "Spelling:" or "Quelle:" */
#cultureListe .culture-content strong,
#cultureListe .culture-content b {
    font-weight: 800;
    color: #0b5ed7;
}

/* Make lists in culture content more airy and readable */
#cultureListe .culture-content ul {
    margin: 0.4rem 0 0.4rem 1.05rem;
    padding-left: 0.9rem;
}

/* Actions area (read more, share, edit) aligned to the bottom-right */
#cultureListe .culture-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.6rem;
}

/* Readmore link style */
#cultureListe .culture-readmore button {
    color: #0d6efd;
    font-weight: 700;
    background: transparent;
    border: none;
    padding: 0;
}

/* Hover lift for individual culture cards */
#cultureListe .culture-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(16,24,40,0.12) !important;
}

/* Compact variant for mobile: single-column stack */
@media (max-width: 767px) {
    #cultureListe .culture-grid {
        grid-template-columns: 1fr;
    }
    #cultureListe .culture-card { padding: 0.9rem; }
    #cultureListe .culture-icon { flex: 0 0 48px; height: 48px; font-size: 1.15rem; }
}

/* Backwards-compat: many pages render culture items as plain .card elements.
   Apply the improved surface styles to those existing cards so the update
   becomes visible immediately without changing client-side templates. */
#cultureListe > .card,
#cultureListe .card.border-0.shadow-sm.mb-3 {
    border: 1px solid rgba(16,24,40,0.06);
    border-radius: 12px;
    background: linear-gradient(180deg,#ffffff,#fafbff);
    box-shadow: 0 10px 30px rgba(12,18,35,0.06);
    padding: 0;
}

#cultureListe .card .card-body {
    padding: 1rem 1.1rem;
}

#cultureListe .card .d-flex.align-items-center.mb-3 > div:last-child h5 {
    font-weight: 800;
    color: #0b5ed7;
    margin-bottom: 0.15rem;
}

#cultureListe .card .badge.bg-primary {
    background: linear-gradient(90deg,#0055a4,#ef4135);
    box-shadow: none;
}

#cultureListe .card .me-3 {
    font-size: 2.4rem;
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cultureListe .card .card-body > .float-end {
    margin-left: 0.5rem;
}

#cultureListe .card .card-body > .float-end .btn {
    border-radius: 8px;
}




.navbar .nav-link {
    position: relative;
}

.navbar .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.dropdown-menu {
    animation: fadeInUp 0.3s ease;
    z-index: 2050; /* ensure dropdowns float above other elements */
    max-height: 80vh; /* prevent dropdowns from growing off-screen */
    overflow-y: auto;
}

/* Mobile: make dropdowns more usable on small screens by stretching and fixing them near the viewport */
@media (max-width: 576px) {
    .dropdown-menu {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 12px !important;
        max-height: 70vh !important;
        border-radius: 12px !important;
    }
}

.dropdown-item {
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding-left: 1.5rem;
}

/* Aufgaben link styles removed */

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

/* Aufgaben-Bereich Styles */
.fade-in {
    animation: fadeInUp 0.6s ease;
}

.nav-pills .nav-link {
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-pills .nav-link:hover {
    background-color: rgba(240, 147, 251, 0.1);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.progress-bar {
    transition: width 0.5s ease;
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* Sprachgebrauch Section */
.sprachgebrauch-sidebar .nav-link {
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: #212529;
}
.sprachgebrauch-sidebar .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.sprachgebrauch-content .card {
    border-radius: 12px;
}
.sprachgebrauch-item {
    transition: all 0.25s ease;
}
.sprachgebrauch-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
}
.sprachgebrauch-search {
    border-radius: 12px;
    padding: 0.35rem 0.6rem;
}

/* reduce horizontal padding on cards to make lists more compact */
.card .card-body {
    padding: 1rem;
}

/* Ensure sticky sidebar doesn't overlap on small screens */
@media (max-width: 767px) {
    .sprachgebrauch-sidebar .nav-link { font-size: 0.95rem; }
    .sprachgebrauch-sidebar .card { position: static; }
}

/* Gamification Animationen */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.display-1, .display-4 {
    animation: pulse 2s infinite;
}

/* Aufgabenkarten */
.card-body {
    position: relative;
    /* allow overflow so dropdowns inside cards aren't clipped on small screens */
    overflow: visible;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

/* Deadline Alert */
.alert-info {
    border-left: 4px solid #0dcaf0;
}

/* Status Badges */
.badge-warning {
    background-color: #ffc107;
    color: #000;
}

.badge-info {
    background-color: #0dcaf0;
}

.badge-success {
    background-color: #198754;
}

.badge-danger {
    background-color: #dc3545;
}

/* Tabellen Hover */
.table-hover tbody tr:hover {
    background-color: rgba(240, 147, 251, 0.1);
}

.table-primary {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

/* Modal Animationen */
.modal.fade .modal-dialog {
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* Upload Bereich */
.form-control, .form-select {
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #f093fb;
    box-shadow: 0 0 0 0.2rem rgba(240, 147, 251, 0.25);
}

/* Buttons */
.btn {
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: transparent;
}

/* Vorschlag Button Styling */
.btn-light.rounded-pill.dropdown-toggle {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
}
.btn-light.rounded-pill.dropdown-toggle i {
    margin-right: 6px;
}
.dropdown-menu-end {
    border-radius: 12px;
}

/* Ranglisten-Medals */
.table tbody tr:first-child {
    font-weight: bold;
    background-color: rgba(255, 215, 0, 0.1);
}

.table tbody tr:nth-child(2) {
    background-color: rgba(192, 192, 192, 0.1);
}

.table tbody tr:nth-child(3) {
    background-color: rgba(205, 127, 50, 0.1);
}

/* ========== PROFIL-SEITE STYLES ========== */

/* Avatar Upload Zone */
.avatar-upload-zone {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-upload-zone:hover {
    transform: scale(1.05);
}

.avatar-upload-zone:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Profil Statistik Cards */
.profil-stat-card {
    border-radius: 15px;
    transition: all 0.3s ease;
    border: none;
}

.profil-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Badge Grid */
.badge-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.badge-item:hover {
    transform: scale(1.05);
}

/* Progress Bars */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Profil Pills Navigation */
.nav-pills .nav-link {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.nav-pills .nav-link:hover:not(.active) {
    background-color: rgba(102, 126, 234, 0.1);
}

/* Responsive header adjustments for low-height landscape devices (e.g. iPad landscape) */
@media (orientation: landscape) and (max-height: 780px) {
    /* Reduce navbar vertical padding */
    #mainHeader {
        padding: 0.45rem 0 !important;
        box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    }

    /* Slightly smaller brand/title */
    #portalTitle {
        font-size: 1.15rem !important;
    }

    /* Compact nav links */
    #mainHeader .nav-link {
        padding: 0.45rem 0.6rem !important;
        font-size: 0.95rem !important;
    }

    /* Reduce the size of the date/time badge */
    #currentDateTime {
        font-size: 0.85rem !important;
        padding: 6px 10px !important;
    }

    /* Smaller user info text */
    #userInfo {
        font-size: 0.9rem !important;
    }

    /* Make navbar toggler and buttons slightly smaller */
    .navbar-toggler {
        padding: 6px 8px;
    }

    .btn, .btn-light {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* Extra fallback for very short viewports */
@media (max-height: 640px) {
    #portalTitle { font-size: 1.05rem !important; }
    #mainHeader { padding: 0.3rem 0 !important; }
}

/* ========== BIOLOGIE-SPEZIFISCHE STYLES ========== */

/* Biologie Grün-Blau Farbschema */
.bio-gradient {
    background: linear-gradient(135deg, #2ecc71 0%, #3498db 100%) !important;
}

.bio-gradient-light {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(52, 152, 219, 0.1) 100%);
}

/* Hover-Effekt für Karten */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Schwierigkeit Badges */
.difficulty-badge {
    font-size: 0.85rem;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-grundlagen {
    background: #28a745;
    color: white;
}

.difficulty-mittel {
    background: #ffc107;
    color: #000;
}

.difficulty-fortgeschritten,
.difficulty-anspruchsvoll {
    background: #dc3545;
    color: white;
}

.difficulty-einfach {
    background: #17a2b8;
    color: white;
}

/* Kategorie Badges */
.kategorie-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin: 2px;
}

/* Glossar Einträge */
.glossar-entry {
    border-left: 4px solid #3498db;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.glossar-entry:hover {
    background: #e3f2fd;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.glossar-entry h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.glossar-entry p {
    color: #34495e;
    line-height: 1.6;
}

/* Experiment Schritte */
.experiment-step {
    padding: 15px;
    border-left: 4px solid #2ecc71;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
    counter-increment: step;
}

.experiment-step::before {
    content: "Schritt " counter(step);
    font-weight: bold;
    color: #2ecc71;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Diagramm Container */
.diagram-container {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
    min-height: 300px;
}

.diagram-label {
    position: absolute;
    background: white;
    padding: 5px 10px;
    border-radius: 8px;
    border: 2px solid #2ecc71;
    cursor: pointer;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 10;
}

.diagram-label:hover {
    background: #2ecc71;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.diagram-label.active {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
}

/* Gamification Elements */
.gamification-level {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(255, 140, 0, 0.3);
}

.badge-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.badge-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Progress Bar (Biologie) */
.bio-progress {
    height: 25px;
    border-radius: 12px;
    background: #e9ecef;
    overflow: hidden;
}

.bio-progress-bar {
    background: linear-gradient(90deg, #2ecc71 0%, #3498db 100%);
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Quiz Interface Biologie */
.bio-quiz-option {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.bio-quiz-option:hover {
    border-color: #3498db;
    background: #f0f8ff;
    transform: translateX(5px);
}

.bio-quiz-option.selected {
    border-color: #2ecc71;
    background: #d4edda;
}

.bio-quiz-option.correct {
    border-color: #28a745;
    background: #d4edda;
}

.bio-quiz-option.wrong {
    border-color: #dc3545;
    background: #f8d7da;
}

/* Aufgaben Status */
.aufgabe-status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.aufgabe-status.offen {
    background: #fff3cd;
    color: #856404;
}

.aufgabe-status.abgegeben {
    background: #d1ecf1;
    color: #0c5460;
}

.aufgabe-status.bewertet {
    background: #d4edda;
    color: #155724;
}

/* Ressource Cards */
.ressource-card {
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.ressource-card:hover {
    border-left-color: #2ecc71;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ressource-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 10px;
}

/* Mobile Optimierung für Biologie */
@media (max-width: 768px) {
    .diagram-container {
        padding: 10px;
        min-height: 200px;
    }

    .diagram-label {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .experiment-step {
        padding: 10px;
        font-size: 0.9rem;
    }

    .badge-icon {
        font-size: 2rem;
    }

    .glossar-entry {
        padding: 10px;
    }
}

/* Accessibility Improvements für Biologie */
@media (prefers-reduced-motion: reduce) {
    .hover-lift,
    .diagram-label,
    .bio-quiz-option,
    .badge-icon {
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bio-gradient {
        background: #2ecc71 !important;
    }

    .glossar-entry {
        border-left-width: 6px;
    }

    .diagram-label {
        border-width: 3px;
    }
}

/* Print Styles für Biologie-Protokolle */
@media print {
    .experiment-step {
        page-break-inside: avoid;
    }

    .diagram-container {
        border: 2px solid #000;
    }

    .nav, .btn, #actionButtons, #approvalSection {
        display: none !important;
    }
}

/* ===== LESEVERSTEHEN STYLES (Français) ===== */
/* Target the typo-id used in templates: #leseversthehenListe */
#leseversthehenListe {
    /* rely on Bootstrap grid, but add a small gap override for better breathing room */
    margin-top: 0.5rem;
}

#leseversthehenListe .col-md-6 {
    display: flex; /* make the column use full height for its card */
}

#leseversthehenListe .col-md-6 .card {
    flex: 1 1 auto;
    min-height: 220px;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

#leseversthehenListe .col-md-6 .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(12,18,35,0.08) !important;
}

#leseversthehenListe .card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.25rem;
}

#leseversthehenListe .card .card-title {
    font-weight: 800;
    color: #0b5ed7;
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
}

#leseversthehenListe .card p {
    flex: 1 1 auto;
    margin-bottom: 0;
    color: #495057;
    line-height: 1.65;
}

#leseversthehenListe .badge.bg-light {
    background: #f8f9fa;
    color: #212529;
    border: 1px solid rgba(0,0,0,0.03);
    margin-right: 0.35rem;
}

/* Highlight the points badge */
#leseversthehenListe .badge.bg-success {
    background: linear-gradient(90deg,#28a745,#2ecc71);
    color: white;
    font-weight: 700;
}

/* Text view: make reading comfortable */
#textAnsicht .card-body {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.9;
    font-size: 1.05rem;
    text-align: justify;
}

#aufgabenContainer .card {
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.75rem;
}

@media (max-width: 767px) {
    #leseversthehenListe .col-md-6 {
        display: block;
    }
    #leseversthehenListe .col-md-6 .card { min-height: 180px; }
    #textAnsicht .card-body { padding: 1rem; font-size: 1rem; line-height: 1.6; }
}


