/* Private Theme & Sections */
:root {
    --private-text: #432818;
    --private-card: #ffffff;
}

body.theme-private, .bg-private, .bg-stories, .bg-recommendations, .bg-interests, .bg-gallery {
    background: var(--private-bg-style) !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    color: var(--private-text);
}

/* Header */
.theme-private .main-header {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 3px solid var(--private-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.theme-private .intro {
    padding-top: 10px;
    margin-bottom: 20px;
}


/* Private Grid */
.private-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.preview-box {
    background: var(--private-card);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 2px solid transparent;
}

.preview-box:hover {
    transform: translateY(-10px);
    border-color: var(--private-primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.preview-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

/* Stories - Buch/Papier-Stapel Look */
.book-icon {
    width: 50px;
    height: 60px;
    background: #81c784;
    border-radius: 4px;
    position: relative;
    box-shadow: 2px 2px 0 #66bb6a;
}
.book-page {
    position: absolute;
    width: 35px;
    height: 2px;
    background: rgba(255,255,255,0.6);
    left: 7px;
}
.book-page:nth-child(1) { top: 15px; }
.book-page:nth-child(2) { top: 30px; }
.book-page:nth-child(3) { top: 45px; width: 20px; }

/* Recommendations - Badge/Siegel Look */
.recommendation-badge {
    width: 60px;
    height: 60px;
    background: #64b5f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(100, 181, 246, 0.4);
    border: 3px double white;
}
.star-rating {
    color: #ffd54f;
    font-size: 1.4rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.check-mark {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #4caf50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Interests - Collage/Bubble Look */
.interests-collage {
    position: relative;
    width: 80px;
    height: 60px;
}
.interest-bubble {
    position: absolute;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.interest-bubble:nth-child(1) { background: #ff7043; top: 0; left: 0; z-index: 2; }
.interest-bubble:nth-child(2) { background: #ffb74d; top: 20px; left: 25px; z-index: 1; }
.interest-bubble:nth-child(3) { background: #4db6ac; top: -5px; left: 45px; z-index: 0; }

.preview-box:hover .interest-bubble:nth-child(1) { transform: translate(-5px, -5px) scale(1.1); }
.preview-box:hover .interest-bubble:nth-child(2) { transform: scale(1.2); }
.preview-box:hover .interest-bubble:nth-child(3) { transform: translate(5px, 5px) scale(1.1); }

/* Gallery - Photo Stack Look */
.photo-stack {
    position: relative;
    width: 60px;
    height: 60px;
}
.photo-frame {
    position: absolute;
    background: white;
    padding: 3px 3px 10px 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}
.photo-frame.p1 { width: 45px; height: 45px; transform: rotate(-10deg); top: 5px; left: 0; background: #f5f5f5; }
.photo-frame.p2 { width: 45px; height: 45px; transform: rotate(5deg); top: 0; left: 15px; background: #eeeeee; }
.photo-frame.p3 { width: 45px; height: 45px; transform: rotate(0); top: 10px; left: 8px; z-index: 3; }
.photo-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ba68c8, #9c27b0);
    border-radius: 2px;
}

.preview-box:hover .photo-frame.p1 { transform: rotate(-20deg) translate(-5px, -5px); }
.preview-box:hover .photo-frame.p2 { transform: rotate(15deg) translate(5px, -5px); }
.preview-box:hover .photo-frame.p3 { transform: scale(1.1); }

/* Games - Gamepad Look */
.gamepad-icon {
    position: relative;
    width: 60px;
    height: 40px;
    margin-top: 10px;
}
.gamepad-body {
    width: 60px;
    height: 35px;
    background: #455a64;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px #263238;
}
.gamepad-button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    background: #ff5252;
}
.gb1 { right: 10px; top: 10px; }
.gb2 { right: 20px; top: 18px; background: #ffd740; }
.gamepad-dpad {
    width: 14px;
    height: 14px;
    background: #263238;
    position: absolute;
    left: 10px;
    top: 10px;
    clip-path: polygon(33% 0%, 66% 0%, 66% 33%, 100% 33%, 100% 66%, 66% 66%, 66% 100%, 33% 100%, 33% 66%, 0% 66%, 0% 33%, 33% 33%);
}
.preview-box:hover .gamepad-icon { transform: scale(1.1) rotate(-5deg); transition: transform 0.3s ease; }

/* Subpages */
.subpage {
    position: relative;
    width: 100%;
    min-height: 100vh;
    z-index: 50; /* Niedriger als Header (100) */
    padding: 20px 0 100px 0;
    background-attachment: fixed;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--private-primary);
    margin-bottom: 20px;
}

/* Stories */
.category-filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
    justify-content: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.filter-btn {
    padding: 10px 20px;
    background: white;
    color: var(--private-text);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.filter-btn.active {
    background: var(--private-primary);
    color: white;
    border-color: var(--private-primary);
}

.stories-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.story-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--private-primary);
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.story-card h3 { margin: 0 0 15px 0; color: var(--private-text); }
.story-card p { flex-grow: 1; color: #666; font-size: 0.95rem; line-height: 1.6; }

.story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.read-more { font-weight: bold; color: var(--private-primary); font-size: 0.9rem; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0 80px 0;
}

.pagination a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--private-text);
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.pagination a:hover, .pagination a.active {
    background: var(--private-primary);
    color: white;
}

.story-full-text { line-height: 1.8; font-size: 1.1rem; color: var(--private-text); }

/* Recommendations */
.rec-highlight-card {
    display: flex;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.rec-highlight-card .rec-image {
    flex: 0 0 300px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.rec-highlight-card .rec-image img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.rec-highlight-card .rec-content { padding: 40px; flex: 1; }

/* Bild-/Rezeptkarten als eigenes Grid */
.rec-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
    gap: 30px;
    align-items: start;
    justify-content: center;
    margin-bottom: 40px;
}

/* Einzelne Bildkarte */
.rec-highlight-card--image-mode {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    margin: 0;
    border-radius: 24px;
}

/* Bildbereich der Bildkarte */
.rec-highlight-card--image-mode .rec-image {
    flex: 0 0 auto;
    width: 100%;
    padding: 14px;
    background: linear-gradient(180deg, #f8f9fb 0%, #eef1f7 100%);
    box-sizing: border-box;
}

/* Bild selbst: Vorschau, nicht riesige Vollansicht */
.rec-highlight-card--image-mode .rec-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: 14px;
}

/* Textbereich kompakter */
.rec-highlight-card--image-mode .rec-content {
    width: 100%;
    box-sizing: border-box;
    padding: 22px 24px 26px;
}

.rec-highlight-card--image-mode .rec-header {
    gap: 12px;
    margin-bottom: 14px;
}

.rec-highlight-card--image-mode .rec-header h3 {
    font-size: 1.05rem;
    margin: 0;
}

.rec-highlight-card--image-mode .rec-intro {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.rec-highlight-card--image-mode .rec-text {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.rec-category-title {
    color: var(--private-primary);
    font-weight: 800;
    font-size: 1.8rem;
    position: relative;
    padding-left: 20px;
    border-left: 5px solid var(--private-primary);
}

.rec-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }

/* Allgemeine Bild-Lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    box-sizing: border-box;
}

.image-lightbox.hidden {
    display: none !important;
}

.image-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    cursor: default;
}

.image-lightbox-close {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 5001;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.image-lightbox-close:hover {
    transform: scale(1.06);
}

[data-lightbox-image] {
    cursor: pointer;
}

@media (max-width: 768px) {
    .image-lightbox {
        padding: 16px;
    }

    .image-lightbox img {
        max-width: 96vw;
        max-height: 90vh;
    }

    .image-lightbox-close {
        top: 14px;
        right: 14px;
        width: 42px;
        height: 42px;
        font-size: 1.8rem;
    }
}

@media (max-width: 767px) {
    .rec-header {
        flex-direction: column;
        gap: 10px;
    }
}
.rating { color: #ffc107; font-size: 1.2rem; }
.star.filled { color: #ffc107; }
.star:not(.filled) { color: #e4e5e9; }
.rec-intro { font-size: 1.1rem; color: var(--private-primary); margin-bottom: 15px; }
.rec-text { line-height: 1.6; color: #555; margin-bottom: 25px; }

.rec-button {
    display: inline-block;
    padding: 12px 25px;
    background: var(--private-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: background 0.3s;
}

.rec-button:hover { background: #1b4332; }

/* Neueste Empfehlung */
.rec-latest-section {
    padding-bottom: 30px;
    border-bottom: 2px dashed rgba(0,0,0,0.1);
}

.latest-card {
    border: 4px solid var(--private-primary);
    transform: scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

/* Kategorie Navigation */
.rec-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.rec-cat-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rec-cat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.rec-cat-card .cat-image {
    height: 160px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rec-cat-card .cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rec-cat-card:hover .cat-image img {
    transform: scale(1.1);
}

.rec-cat-card .cat-icon-placeholder {
    height: 160px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}

.rec-cat-card .cat-info {
    padding: 20px;
    text-align: center;
}

.rec-cat-card .cat-name {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 5px;
}

.rec-cat-card .cat-count {
    font-size: 0.9rem;
    color: #888;
    background: transparent;
    padding: 0;
}

/* Kleine Kacheln für Unterkategorien */
.rec-cat-card.small {
    flex-direction: row;
    align-items: center;
}

.rec-cat-card.small .cat-image,
.rec-cat-card.small .cat-icon-placeholder {
    height: 80px;
    width: 80px;
    flex-shrink: 0;
    font-size: 2rem;
}

.rec-cat-card.small .cat-info {
    text-align: left;
    padding: 15px;
}

/* Breadcrumbs */
.rec-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.95rem;
    color: #666;
    background: rgba(255,255,255,0.5);
    padding: 10px 20px;
    border-radius: 10px;
}

.breadcrumb-item {
    cursor: pointer;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--private-primary);
    text-decoration: underline;
}

.breadcrumb-item.active {
    font-weight: bold;
    color: #333;
    cursor: default;
}

.breadcrumb-item.active:hover {
    text-decoration: none;
}

.breadcrumb-sep {
    color: #ccc;
}

.rec-navigation.hidden {
    display: none;
}

.rec-category-section {
    animation: fadeIn 0.4s ease-out;
}

.rec-category-section.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Interests */
.interests-masonry { column-count: 3; column-gap: 20px; padding-bottom: 50px; }
.interest-item { break-inside: avoid; margin-bottom: 20px; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.interest-item:hover { transform: scale(1.03) rotate(1deg); z-index: 10; }

.interest-inner { 
    background: white; 
    border-radius: 30px; 
    border: 2px solid var(--accent-color); 
    box-shadow: 10px 10px 0 var(--accent-color); 
    position: relative; 
    overflow: hidden; 
}

/* Größen-Variationen */
.interest-item.size-small .interest-inner { padding: 20px; }
.interest-item.size-small .interest-icon { font-size: 2.2rem; }
.interest-item.size-small h3 { font-size: 1.1rem; }

.interest-item.size-medium .interest-inner { padding: 30px; }
.interest-item.size-medium .interest-icon { font-size: 3rem; }

.interest-item.size-large .interest-inner { padding: 45px; }
.interest-item.size-large .interest-icon { font-size: 4.5rem; }
.interest-item.size-large h3 { font-size: 1.8rem; }
.interest-item.size-large p { font-size: 1.1rem; }

.interest-icon { margin-bottom: 15px; }

@media (max-width: 900px) { .interests-masonry { column-count: 2; } }
@media (max-width: 600px) { .interests-masonry { column-count: 1; } }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 30px; }
.gallery-item { position: relative; border-radius: 15px; overflow: hidden; height: 250px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-caption { position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(0,0,0,0.6); color: white; padding: 10px; font-size: 0.9rem; transform: translateY(100%); transition: transform 0.3s ease; }
.gallery-item:hover .gallery-caption { transform: translateY(0); }

.bg-games {
    --games-accent: #673ab7;
    background: var(--private-bg-style) !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--games-accent);
}

.game-card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.game-card h3 {
    margin: 0 0 15px 0;
    color: var(--private-text);
}

.game-card p {
    flex-grow: 1;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.game-card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.play-btn {
    font-weight: bold;
    color: var(--games-accent);
}

/* Mobile: Spiel-Gamepad angepasst */
@media (max-width: 768px) {
    .gamepad-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .gamepad-btn.action {
        width: 80px;
        height: 80px;
    }
}

/* Virtual Gamepad */
.virtual-gamepad {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none; /* Klicks gehen durch das Container-Div */
    z-index: 2100;
}

.virtual-gamepad .dpad, .virtual-gamepad .actions {
    display: grid;
    gap: 10px;
    pointer-events: auto; /* Buttons sind klickbar */
}

.virtual-gamepad .dpad {
    grid-template-areas: 
        ". up ."
        "left . right"
        ". down .";
}

.gamepad-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gamepad-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.9);
}

.gamepad-btn.up { grid-area: up; }
.gamepad-btn.down { grid-area: down; }
.gamepad-btn.left { grid-area: left; }
.gamepad-btn.right { grid-area: right; }

.gamepad-btn.action {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(217, 70, 239, 0.4); /* Private Primary Color transparent */
    border-color: rgba(217, 70, 239, 0.6);
    font-size: 1rem;
    font-weight: bold;
}

/* Responsive Private */
@media (max-width: 768px) {
    .rec-highlight-card {
        flex-direction: column;
    }

    .rec-highlight-card .rec-image {
        flex: 0 0 auto;
    }

    .rec-image-grid {
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
    }

    .rec-highlight-card--image-mode {
        max-width: 100%;
    }

    .rec-highlight-card--image-mode .rec-image img {
        max-height: 70vh;
    }

    .rec-highlight-card--image-mode .rec-content {
        padding: 22px;
    }

    .modal-content {
        padding: 30px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }
}

/* Private Scroll to Top Button */
body.theme-private #scroll-to-top {
    background: linear-gradient(135deg, var(--private-primary) 0%, var(--private-secondary) 100%);
    color: white;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

body.theme-private #scroll-to-top:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(217, 70, 239, 0.4);
}

/* Contact submit button — match Private theme look */
body.theme-private .contact-submit-btn {
    background: linear-gradient(135deg, var(--private-primary) 0%, var(--private-secondary) 100%);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

body.theme-private .contact-submit-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px rgba(217, 70, 239, 0.35);
    filter: brightness(1.03);
}

body.theme-private .contact-submit-btn:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}
