/* ===================================================
 * 3D BUCH LAYOUT - Premium Kategorie-Übersicht
 * Extrem hochwertiges, modernes Design
 * =================================================== */

/* === BOOK CONTAINER === */
.book-container {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 100;
}

.book-container::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -100px;
    right: -100px;
    bottom: -100px;
    background: rgba(24, 24, 27, 0.3);
    backdrop-filter: blur(80px);
    -webkit-backdrop-filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, 
        rgba(0,0,0,1) 20%, 
        rgba(0,0,0,0.6) 50%, 
        rgba(0,0,0,0) 75%);
    -webkit-mask-image: radial-gradient(circle at center, 
        rgba(0,0,0,1) 20%, 
        rgba(0,0,0,0.6) 50%, 
        rgba(0,0,0,0) 75%);
}

.book-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    padding: 1rem 2rem;
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes goldShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* === BOOK WRAPPER === */
.book-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

/* === BOOK PAGES === */
.book-page {
    position: relative;
    background: rgba(24, 24, 27, 0.4);
    border: 1px solid rgba(63, 63, 70, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Custom Scrollbar */
.book-page::-webkit-scrollbar {
    width: 8px;
}

.book-page::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.book-page::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFD700, #FF8C00);
    border-radius: 10px;
}

.book-page::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FFA500, #FFD700);
}

/* === LINKE SEITE - CLEAN FLAT === */
.book-page-left {
    border-radius: 12px;
}

/* === RECHTE SEITE - CLEAN FLAT === */
.book-page-right {
    border-radius: 12px;
}

/* === SPINE NICHT MEHR BENÖTIGT === */
.book-spine {
    display: none;
}

/* === CATEGORY ITEM === */
.category-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: rgba(39, 39, 42, 0.6);
    border: 1px solid rgba(63, 63, 70, 0.5);
    border-radius: 8px;
    transition: all 0.15s ease;
    overflow: hidden;
    cursor: pointer;
}

/* Linke Seite: Button links, Text rechts, Border-Akzent links */
.book-page-left .category-item {
    flex-direction: row-reverse;
    border-left: 3px solid var(--category-color, rgba(255, 215, 0, 0.7));
    border-right: 1px solid rgba(63, 63, 70, 0.5);
}

/* Rechte Seite: Border-Akzent rechts statt links */
.book-page-right .category-item {
    border-left: 1px solid rgba(63, 63, 70, 0.5);
    border-right: 3px solid var(--category-color, rgba(255, 215, 0, 0.7));
}

/* Linke Seite: Pfeil nach links drehen */
.book-page-left .category-arrow-btn i {
    transform: rotate(180deg);
}

/* Linke Seite: Highlighter links */
.book-page-left .category-item:hover {
    background: rgba(52, 52, 55, 0.8);
    border-color: rgba(82, 82, 91, 0.8);
    border-left-color: var(--category-color, rgba(255, 215, 0, 1));
    border-left-width: 3px;
}

/* Rechte Seite: Highlighter rechts (bereits definiert, aber hier nochmal für Klarheit) */
.book-page-right .category-item:hover {
    background: rgba(52, 52, 55, 0.8);
    border-color: rgba(82, 82, 91, 0.8);
    border-right-color: var(--category-color, rgba(255, 215, 0, 1));
    border-right-width: 3px;
}

/* Completed Category - behält Kategorie-Farbe */
.category-item.category-complete .category-percentage {
    animation: glowPulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px var(--category-color, rgba(255, 215, 0, 0.8));
}

@keyframes glowPulse {
    0%, 100% { 
        text-shadow: 0 0 10px var(--category-color, rgba(255, 215, 0, 0.8));
        filter: brightness(1);
    }
    50% { 
        text-shadow: 0 0 20px var(--category-color, rgba(255, 215, 0, 1));
        filter: brightness(1.3);
    }
}

/* === CATEGORY INFO === */
.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Linke Seite: Text rechtsbündig */
.book-page-left .category-info {
    align-items: flex-end;
    text-align: right;
}

.category-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    letter-spacing: 0.3px;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.category-item:hover .category-name {
    color: rgba(255, 255, 255, 1);
}

.category-stats-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Linke Seite: Stats umgekehrt (Prozent links, Count rechts) */
.book-page-left .category-stats-row {
    flex-direction: row-reverse;
}

.category-count {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.category-percentage {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--category-color, rgba(255, 215, 0, 0.95));
    letter-spacing: 0.3px;
}

/* === CATEGORY CARDS ICONS === */
.category-cards-icons {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Linke Seite: Icons von rechts nach links */
.book-page-left .category-cards-icons {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

/* Rechte Seite: Icons von links nach rechts */
.book-page-right .category-cards-icons {
    flex-direction: row;
    justify-content: flex-start;
}

.category-cards-icons i {
    font-size: 1rem;
    color: var(--category-color, rgba(255, 215, 0, 0.8));
    transition: all 0.2s ease;
    transform: scaleY(1.4);
}

.category-cards-icons i.far {
    color: rgba(255, 255, 255, 0.15);
}

.category-item:hover .category-cards-icons i.fas {
    color: var(--category-color, rgba(255, 215, 0, 1));
    transform: scaleY(1.4) scale(1.08);
}

/* === ARROW BUTTON - Fund Button Style === */
.category-arrow-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #4a4a5a, #3a3a4a);
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    transform: translateY(-2px);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3), 0 -1px 0 rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 2px 0 #2a2a3a,
        0 3px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-arrow-btn:hover {
    transform: translateY(-1px) scale(1.03);
    background: linear-gradient(145deg, #5a5a6a, #4a4a5a);
    box-shadow: 
        0 1px 0 #2a2a3a,
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.category-arrow-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 
        0 0px 0 #2a2a3a,
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.category-arrow-btn i {
    transition: transform 0.2s ease;
}

.category-arrow-btn:hover i {
    transform: translateX(2px);
}

/* Linke Seite: Pfeil nach links bewegen beim Hover */
.book-page-left .category-arrow-btn:hover i {
    transform: rotate(180deg) translateX(-2px);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .book-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .book-container {
        padding: 0 1rem;
        margin: 2rem auto;
    }
    
    .book-title {
        margin-bottom: 1.5rem;
    }
    
    .book-page {
        padding: 1rem;
    }
    
    .category-item {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .category-name {
        font-size: 0.875rem;
    }
    
    .category-arrow-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}
