/* Font Face Definition */
@font-face {
    font-family: 'IBM Plex Mono Light';
    src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'IBM Plex Mono Medium';
    src: url('assets/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

/* Grundlegende Styles */
body {
    background-color: #000000;
    background-size: 100% 100%;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    padding-bottom: 100px;
    min-height: 100vh;
    cursor: none;
    margin: 0;
}

/* Canvas für Stift-Trail */
#drawCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10001;
}

/* Desktop Grid Container */
.desktop {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    body {
        padding-bottom: 60px;
        overflow-x: hidden;
    }
    
    .desktop {
        padding: 5px 5px 10px 5px;
        gap: 20px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .window-container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    #windowPerson {
        width: 100%;
    }
    
    #windowPerson .content-front {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    #windowPerson .content-front .main-title {
        text-align: center;
    }
    
    #windowPerson .window-content {
        padding: 15px;
        min-height: auto;
        height: auto;
    }
    
    .card {
        width: 200px;
        height: 267px;
    }
    
    .window-content {
        padding: 10px;
        min-height: auto;
        height: auto !important;
        overflow: visible !important;
    }
    
    .content-front {
        position: relative !important;
        height: auto !important;
    }
    
    #window2 .window-content,
    #window3 .window-content,
    #window4 .window-content,
    #window5 .window-content,
    #window6 .window-content {
        min-height: auto;
        height: auto;
    }
    
    .carousel {
        aspect-ratio: 16/9;
        height: auto;
    }
    
    .main-title {
        font-size: 12vw;
    }
    
    .reset-button {
        bottom: 60px;
        right: 10px;
        z-index: 10002;
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .window-container:hover {
        transform: none;
        box-shadow: none;
    }
    
    .maximize-btn {
        display: none !important;
    }
    
    #window7 {
        height: 50px;
    }
}

/* Reset Button unten rechts */
.reset-button {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 0;
    width: 50px;
    height: 50px;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-button:hover {
    background: #e0e0e0;
}

.reset-button:active {
    border: 2px inset #c0c0c0;
}

/* Zentraler Reset Button wenn alle Fenster geschlossen */
.reset-button-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgb(255, 0, 221);
    border: 3px solid rgb(255, 234, 0);
    padding: 20px 40px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 24px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    z-index: 10000;
    display: none;
    box-shadow: 0 10px 30px rgba(255, 0, 221, 0.5);
}

.reset-button-center:hover {
    background: rgb(255, 234, 0);
    border-color: rgb(255, 0, 221);
}

.reset-button-center.show {
    display: block;
}

/* Hauptüberschrift */
.main-title {
    font-size: 10vw;
    margin-top: 2vh;
    margin-right: 3vw;
    margin-bottom: 3vh;
    margin-left: 0px;
    padding: 1vh 1vw;
    color: rgb(255, 0, 221);
    font-family: 'Jacquard 24', serif;
    position: relative;
    z-index: 100;
}

/* Windows 98 Fenster Container */
.window-container {
    position: relative;
    width: 100%;
    height: fit-content;
    background-color: #ececec;
    border: 5px outset rgb(255, 0, 221);
    font-family: 'IBM Plex Mono';
    font-size: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    justify-self: center;
    align-self: center;
    perspective: 1000px;
}

/* Person Fenster - Volle Breite */
#windowPerson {
    grid-column: 1 / -1;
    width: 100%;
}

#windowPerson .window-content {
    padding: 20px;
    min-height: 350px;
    background-color: rgb(255, 234, 0);
}

#windowPerson .content-front {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

#windowPerson .content-front .main-title {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: clamp(3rem, 15vw, 10rem);
}

#windowPerson .content-front .card {
    flex-shrink: 0;
}

#windowPerson .content-front {
    perspective: 1000px;
}

#windowPerson .content-back {
    min-height: 350px;
}

/* Impressum Bereich */
.impressum {
    width: 100%;
    background-color: #000000;
    color: rgb(255, 234, 0);
    padding: 40px 20px 80px 20px;
    text-align: center;
    font-family: 'IBM Plex Mono Light', 'IBM Plex Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 60px;
}

.impressum strong {
    font-family: 'IBM Plex Mono Medium', 'IBM Plex Mono', monospace;
    font-weight: 500;
    display: block;
    margin-top: 10px;
}

.impressum p {
    margin: 0;
}

/* Social Media Banner - durchlaufender Text am unteren Rand */
#window7 {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgb(255, 0, 221);
    border-top: 3px solid rgb(255, 234, 0);
    z-index: 1000;
    overflow: hidden;
}

.social-links {
    display: inline-flex;
    flex-direction: row;
    gap: 50px;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: scrollText 40s linear infinite;
    will-change: transform;
}

@keyframes scrollText {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 30px;
    background: rgb(255, 234, 0);
    border: 3px solid #000;
    text-decoration: none;
    color: #000;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    min-width: 150px;
}

.social-link:hover {
    background: #000;
    color: rgb(255, 234, 0);
}

.social-icon {
    font-size: 24px;
}

.social-text {
    font-weight: bold;
}

/* Carousel Fenster - höherer min-height */
#window2 .window-content,
#window3 .window-content,
#window4 .window-content,
#window5 .window-content {
    min-height: 0;
}

#window2 .content-front,
#window3 .content-front,
#window4 .content-front,
#window5 .content-front {
    position: relative;
}

/* Window 1 (Card) */
#window .window-content {
    min-height: 350px;
}

#window .content-front {
    position: relative;
}

/* Window 6 (Video) */
#window6 .window-content {
    min-height: 350px;
}

#window6 .content-front {
    position: relative;
}

/* Window 7 (Festwochen Video) */
#window7New .window-content {
    min-height: 350px;
}

#window7New .content-front {
    position: relative;
}

/* Window 8 (CCA Karussell) */
#window8 .window-content {
    min-height: 0px;
    padding: 5px;
}

#window8 .content-front {
    position: relative;
}

#window8 .carousel {
    aspect-ratio: unset;
    height: fit-content;
}

#window8 .carousel-image {
    position: absolute;
    width: 100%;
    height: auto;
    top: 0;
    left: 0;
    opacity: 0;
}

#window8 .carousel-image.active {
    opacity: 1;
    z-index: 1;
    position: relative;
}

/* Window 9 (Font Karussell) */
#window9 .window-content {
    min-height: 0;
    padding: 5px;
}

#window9 .content-front {
    position: relative;
}

#window9 .carousel {
    aspect-ratio: unset;
    height: fit-content;
}

#window9 .carousel-image {
    position: absolute;
    width: 100%;
    height: auto;
    top: 0;
    left: 0;
    opacity: 0;
}

#window9 .carousel-image.active {
    opacity: 1;
    z-index: 1;
    position: relative;
}

/* Window 10 (DG Karussell) */
#window10 .window-content {
    min-height: 0;
    padding: 5px;
}

#window10 .content-front {
    position: relative;
}

#window10 .carousel {
    aspect-ratio: unset;
    height: fit-content;
}

#window10 .carousel-image {
    position: absolute;
    width: 100%;
    height: auto;
    top: 0;
    left: 0;
    opacity: 0;
}

#window10 .carousel-image.active {
    opacity: 1;
    z-index: 1;
    position: relative;
}

/* Window 11 (EDC Einzelbild) */
#window11 .window-content {
    min-height: 0;
    padding: 5px;
}

#window11 .content-front {
    position: relative;
}

.single-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Impressum Fenster */
#windowImpressum .window-content {
    min-height: 200px;
}

#windowImpressum .content-front {
    position: relative;
}

#windowPerson:hover,
#window:hover,
#window2:hover,
#window3:hover,
#window4:hover,
#window5:hover,
#window6:hover,
#window7New:hover,
#window8:hover,
#window9:hover,
#window10:hover,
#window11:hover,
#windowImpressum:hover {
    transform: rotate(4deg);
    box-shadow: 5px 10px 0px rgb(255, 234, 0);
}

/* Maximiertes Fenster */
.window-container.maximized {
    position: fixed !important;
    top: 100px !important;
    left: 100px !important;
    right: 100px !important;
    bottom: 100px !important;
    width: calc(100vw - 200px) !important;
    height: calc(100vh - 200px) !important;
    transform: none !important;
    box-shadow: none !important;
    z-index: 9999 !important;
    max-width: none !important;
}

.window-container.maximized:hover {
    transform: none;
}

.window-container.maximized .window-content {
    height: calc(100vh - 245px) !important;
    box-sizing: border-box;
    padding: 20px;
    transform-style: preserve-3d;
}

.window-container.maximized .content-front {
    overflow: auto;
    height: 100%;
}

.window-container.maximized .content-back {
    height: 100% !important;
    overflow: auto;
}

.window-container.maximized .carousel {
    width: calc(100vw - 260px) !important;
    height: calc(100vh - 325px) !important;
    max-width: none !important;
    aspect-ratio: unset !important;
}

.window-container.maximized .carousel-container {
    width: 100% !important;
    height: 100% !important;
}

.window-container.maximized .carousel-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.window-container.maximized .carousel-btn {
    z-index: 20 !important;
}

.window-container.maximized .video-player {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - 285px) !important;
    object-fit: contain !important;
}

.window-container.maximized:hover {
    transform: none;
    box-shadow: none;
}

/* Reset Button über maximierten Fenstern */
.reset-button {
    z-index: 10000;
}

/* Fenster Titelleiste */
.window-titlebar {
    background: rgb(255, 0, 221);
    color: rgb(0, 0, 0);
    padding: 4px 4px;
    font-weight: bold;
    border-bottom: 5px solid rgb(255, 0, 221);
    margin: 0px 0px 0px 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-titlebar span {
    font-family: 'IBM Plex Mono Bold', 'IBM Plex Mono', monospace;
    font-weight: bold;
}

/* Button Container */
.button-container {
    display: flex;
    gap: 4px;
}

/* Basis Button Style */
.window-button {
    width: 36px;
    height: 30px;
    display: flex;
    border: 4px outset #c0c0c0;
    background: #c0c0c0;
    cursor: pointer;
    transition: background 0.1s;
}

.window-button:hover {
    background: #e0e0e0;
}

.window-button:active {
    border: 4px inset #c0c0c0;
    background: #a0a0a0;
}

/* Minimieren Button */
.minimize-btn {
    font-size: 12px;
    justify-content: center;
    align-items: center;
    font-family: 'IBM Plex Mono', monospace;
    padding: 0;
}

.minimize-btn::before {
    content: '.txt';
}

/* Maximieren Button */
.maximize-btn {
    font-size: 17px;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    padding: 0;
    line-height: 1;
}

/* Schließen Button */
.close-btn {
    font-size: 20px;
    justify-content: flex-end;
    align-items: flex-start;
    padding-right: 8px;
    padding-top: 1px;
}

/* Fenster Inhaltsbereich */
.window-content {
    padding: 10px;
    background-color: white;
    position: relative;
    min-height: 200px;
    height: fit-content;
    overflow: visible;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-in-out;
}

.window-content.flipped {
    transform: rotateY(-180deg);
}

/* Vorder- und Rückseite des Fensterinhalts */
.content-front,
.content-back {
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.content-front {
    position: relative;
    z-index: 2;
}

.content-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
    background-color: white;
    transform: rotateY(180deg);
    z-index: 1;
}

.back-text {
    font-family: 'IBM Plex Mono Light', 'IBM Plex Mono', monospace;
    font-size: clamp(12px, 2.5vw, 28px);
    font-weight: 300;
    text-align: left;
    color: #000;
    line-height: 1.6;
    width: 100%;
}

.back-text strong {
    font-family: 'IBM Plex Mono Medium', 'IBM Plex Mono', monospace;
    font-weight: 500;
}

/* Fenster Titel soll sich anpassen */
.window-titlebar span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Taskleiste für minimierte Fenster */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: rgb(255, 0, 221);
    border-top: 2px solid rgb(174, 0, 255);
    display: flex;
    align-items: center;
    padding: 5px;
}

.taskbar-button {
    height: 30px;
    min-width: 80px;
    max-width: 200px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 5px 15px;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.taskbar-button:hover {
    background: #e0e0e0;
}

/* Card Styles */
.card {
    width: 240px;
    height: 320px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s;
    cursor: pointer;
    box-shadow: 10px 15px 20px rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    border: 2px solid #a5b1c2;
    margin: 0 auto;
}

.card:hover {
    transform: rotate3d(2, 50, 5, 180deg);
}

.card.flipped {
    transform: rotate3d(2, 50, 5, 180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.card-front {
    background-image: url('assets/images/MH1.jpg');
    background-size: cover;
    background-position: center;
    background-color: #333;
}

.card-back {
    background-image: url('assets/images/MH2.jpg');
    background-size: cover;
    background-position: center;
    background-color: #555;
    transform: rotateY(180deg);
}

/* Karussell Styles */
.carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin: 0 auto;
    background-color: #ffffff;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Kein Übergang für Fenster 5 */
#window5 .carousel-image {
    transition: none;
}

/* Fenster 3 - eingezoomte Bilder */
#window3 .carousel-image {
    object-fit: cover;
}

.carousel-image.active {
    opacity: 1;
    z-index: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(246, 255, 0, 1);
    border: none;
    font-size: 24px;
    padding: 0px 10px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgb(255, 0, 255);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Video Player Styles */
.video-player {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    background-color: #000;
}

.cooperation-text {
    text-align: center;
    margin-top: 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #000;
    font-style: italic;
}

.cooperation-text a {
    color: rgb(255, 0, 221);
    text-decoration: none;
    font-weight: bold;
}

.cooperation-text a:hover {
    text-decoration: underline;
    color: rgb(174, 0, 255);
}

/* FENSTER 12 CSS */
#window12 .window-content {
    min-height: 0;
    height: auto;
}

#window12 .content-front {
    position: relative;
}

#window12 .video-player {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

#window12:hover {
    transform: rotate(4deg);
    box-shadow: 5px 10px 0px rgb(255, 234, 0);
}

/* FENSTER 13 CSS */
#window13 .window-content {
    min-height: 0;
    height: auto;
}

#window13 .content-front {
    position: relative;
}

#window13 .carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin: 0 auto;
    background-color: #000;
}

#window13 .carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#window13 .carousel-image {
    width: 100%;
    height: 100%;
    display: none;
    object-fit: cover;
    position: absolute;
}

#window13 .carousel-image.active {
    display: block;
}

#window13 .video-player {
    width: 100%;
    height: 100%;
}

#window13 .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}

#window13 .carousel-btn.prev {
    left: 10px;
}

#window13 .carousel-btn.next {
    right: 10px;
}

#window13:hover {
    transform: rotate(4deg);
    box-shadow: 5px 10px 0px rgb(255, 234, 0);
}

/* FENSTER 14 CSS */
#window14 .window-content {
    min-height: 0;
    height: auto;
}

#window14 .content-front {
    position: relative;
}

#window14 .carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin: 0 auto;
    background-color: #000;
}

#window14 .carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#window14 .carousel-image {
    width: 100%;
    height: 100%;
    display: none;
    object-fit: cover;
    position: absolute;
}

#window14 .carousel-image.active {
    display: block;
}

#window14 .video-player {
    width: 100%;
    height: 100%;
}

#window14 .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}

#window14 .carousel-btn.prev {
    left: 10px;
}

#window14 .carousel-btn.next {
    right: 10px;
}

#window14:hover {
    transform: rotate(4deg);
    box-shadow: 5px 10px 0px rgb(255, 234, 0);
}