/* Globale Variablen für ein einfaches Theme */
:root {
    --primary-color: #eb443f;
    --primary-color-dark: #d6252c;
    --bg-color: #ffffff;
    --panel-color: #f5f5f9;
    --panel-strong: #e3e4fd;
    --sidebar-bg: #f4f4ff;
    --text-color: #333657;
    --muted-color: #696e8d;
    --border-color: #d9dced;
    --shadow-color: rgba(105, 110, 141, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
    color: var(--text-color);
}

/* Layout-Grid */
.app-container {
    max-width: 1320px;
    margin: 18px auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 18px 40px rgba(105, 110, 141, 0.18);
    border-radius: 16px;
    overflow: hidden;
}

/* Header & Top-Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #eef0ff 0%, #e3e4fd 100%);
    color: var(--text-color);
    padding: 0 28px;
    height: 116px;
    overflow: hidden;
    border-bottom: 1px solid rgba(105, 110, 141, 0.14);
}

/* Container für Logo und Titel nebeneinander */
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Das kleine CHIP-Logo */
.main-logo {
    height: 40px; 
    width: auto;
    object-fit: contain;
}

#ausgabennr {
    font-size: 18px;
    margin: 0;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* NEU: DVD Switcher mit Bildern */
.dvd-switcher {
    display: flex;
    align-items: flex-end; /* DVDs an die untere Kante setzen */
    height: 100%;
    gap: 15px;
}

.dvd-switcher a {
    display: block;
    background: transparent !important; /* Überschreibt alte rote Buttons */
    margin-bottom: -12px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s; /* Sanfter "Bounce"-Effekt */
    filter: saturate(0.88) brightness(0.9);
}

/* Die aktive DVD oder beim drüberfahren mit der Maus */
.dvd-switcher a.active, .dvd-switcher a:hover {
    transform: translateY(-10px); /* Hebt die DVD an */
    filter: brightness(1) drop-shadow(0 10px 18px rgba(105, 110, 141, 0.22));
}

.dvd-switcher img {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

/* Main Layout (Sidebar links, Content rechts) */
.main-layout {
    display: flex;
    min-height: calc(100vh - 116px);
}

/* Sidebar */
.sidebar {
    width: clamp(220px, 18vw, 280px);
    min-width: clamp(220px, 18vw, 280px);
    max-width: clamp(220px, 18vw, 280px);
    flex: 0 0 clamp(220px, 18vw, 280px);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 24px 20px;
    position: relative;
}
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(227, 228, 253, 0.75) 0%, rgba(244, 244, 255, 0) 34%);
    pointer-events: none;
}
.sidebar h3 { margin-bottom: 10px; margin-top: 20px; font-size: 13px; text-transform: uppercase; color: var(--muted-color); letter-spacing: 0.08em; position: relative; }
.sidebar h3:first-child { margin-top: 0; }
.sidebar ul { list-style: none; }
.sidebar li a {
    display: block;
    padding: 9px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}
.sidebar li a:hover, .sidebar li a.active {
    background: rgba(227, 228, 253, 0.95);
    color: #000;
    box-shadow: 1px 1px 4px rgba(105, 110, 141, 0.12);
}

/* Content Area */
.content {
    flex-grow: 1;
    padding: 32px 34px;
    overflow-y: auto;
}

/* Software Liste (Cards) */
.item-card {
    border: 1px solid rgba(105, 110, 141, 0.14);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    display: flex;
    gap: 20px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    background: #fff;
}
.item-card:hover {
    box-shadow: 0 8px 24px rgba(105, 110, 141, 0.12);
    border-color: rgba(105, 110, 141, 0.24);
    transform: translateY(-1px);
}

.item-card img { 
    width: 50px; /* Deutlich kleiner */
    height: 50px; 
    object-fit: contain; 
    flex-shrink: 0; /* Verhindert, dass Flexbox das Bild zusammenquetscht */
}

.item-info h2 { font-size: 18px; color: var(--primary-color); margin-bottom: 5px;}
.item-info p { font-size: 14px; color: var(--muted-color); }

/* --- NEU: Prominente Darstellung (z.B. für Exklusiv-Software) --- */
.item-card.prominent {
    border-color: var(--primary-color);
    border-left: 5px solid var(--primary-color);
    background: linear-gradient(180deg, rgba(255, 247, 247, 1) 0%, rgba(255, 252, 252, 1) 100%);
}
.item-card.prominent img {
    width: 100px;  /* Doppelt so großes Bild */
    height: 100px;
}
.item-card.prominent .item-info h2 {
    font-size: 22px; /* Größere Schrift */
    margin-bottom: 8px;
}
.item-card.prominent .item-info p {
    font-size: 15px;
    color: #444;
}

/* Detailansicht */
.detail-view h1 { color: var(--primary-color); margin-bottom: 10px; }
.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.detail-nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.detail-hero {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.detail-media {
    width: min(320px, 32%);
    min-width: 220px;
    height: clamp(220px, 25vh, 320px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 8px 22px rgba(0,0,0,0.14);
    overflow: hidden;
    flex-shrink: 0;
    padding: 14px;
}
.detail-media img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.detail-summary {
    flex: 1;
    min-width: 0;
}
.detail-summary p {
    font-size: 1.05em;
    margin-top: 10px;
}
.detail-meta {
    background: var(--panel-color);
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 78px;
    height: 78px;
}
.detail-meta-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}
.detail-meta-line {
    min-height: 22px;
    line-height: 1.35;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.detail-meta-entry strong {
    color: #111;
}
.detail-meta-entry a {
    color: inherit;
    text-decoration: none;
}
.detail-meta-entry a:hover {
    text-decoration: underline;
}
.detail-meta-separator {
    color: #999;
    margin: 0 6px;
}
.detail-meta-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}
.detail-copy {
    line-height: 1.7;
    color: #444;
}
.detail-copy p + p {
    margin-top: 0.85em;
}
.detail-copy h2 {
    color: var(--primary-color);
    font-size: 20px;
    line-height: 1.25;
    margin: 1.15em 0 0.35em;
}
.detail-copy h2:first-child {
    margin-top: 0;
}
.btn-download {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(235, 68, 63, 0.24);
}
.btn-download.external-download {
    background: #111;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}
/* --- NEU: Jumplist / Sub-Menü in der Sidebar --- */
.sub-menu {
    display: none; /* Standardmäßig versteckt */
    padding-left: 15px;
    margin-bottom: 10px;
}
.sub-menu.open {
    display: block; /* Zeigen, wenn Klasse "open" gesetzt wird */
}
.sub-menu li a {
    font-size: 13px;
    color: var(--muted-color);
    padding: 5px 10px;
    margin-bottom: 0;
}
/* Sub-Item aktiv oder Hover */
.sub-menu li a:hover, .sub-menu li a.active {
    background: transparent;
    color: var(--primary-color);
    text-decoration: underline;
}

@media (max-width: 860px) {
    .detail-nav,
    .detail-hero,
    .detail-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-nav-actions,
    .detail-meta-actions {
        justify-content: flex-start;
        align-items: stretch;
    }

    .detail-media {
        width: 100%;
        min-width: 0;
    }

    .detail-meta {
        height: auto;
        min-height: 0;
    }

    .detail-meta-line {
        white-space: normal;
    }
}
