* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', cursive;
    min-height: 100vh;
    overflow-x: hidden;
    background: #001;/* Platz für Buttons */
}

.flag-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('usalol.png') center/100px 100px;
    background-repeat: repeat;
    image-rendering: pixelated;
    filter: contrast(234) brightness(1.8);
    animation: flagMove 20s infinite linear;
    opacity: 1;
}

@keyframes flagMove {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(25px, 25px);
    }
    50% {
        transform: translate(0, 50px);
    }
    75% {
        transform: translate(-25px, 25px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* Overlay für zusätzliche Bewegung */
.flag-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    animation: flagMove2 15s infinite linear;
    opacity: 0.5;
    mix-blend-mode: screen;
}

@keyframes flagMove2 {
    0% {
        transform: translate(0, 0) scale(1.1);
    }
    25% {
        transform: translate(-25px, -15px) scale(1.1);
    }
    50% {
        transform: translate(-50px, 0) scale(1.1);
    }
    75% {
        transform: translate(-25px, 15px) scale(1.1);
    }
    100% {
        transform: translate(0, 0) scale(1.1);
    }
}

.content {
    position: relative;
    z-index: 1;
    padding: 1rem;
    min-height: 100vh;
}

.pixel-title {
    text-align: center;
    color: #fff;
    font-size: 2.5rem;
    text-shadow: 4px 4px 0 #000;
    margin-bottom: 2rem;
    margin-top: 2rem;
    animation: glitch 3s infinite;
    position: relative;
}

.pixel-title::before,
.pixel-title::after {
    content: 'Book of Trump Memes';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.pixel-title::before {
    animation: glitch-top 3s infinite linear;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.pixel-title::after {
    animation: glitch-bottom 4s infinite linear;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0% {
        text-shadow: 3px 3px 0 #000;
    }
    20% {
        text-shadow: 3px 3px 0 #000;
    }
    21% {
        text-shadow: -2px -2px 0 #ff0000, 2px 2px 0 #0066ff;
    }
    25% {
        text-shadow: 3px 3px 0 #000;
    }
    35% {
        text-shadow: -2px -2px 0 #ff0000, 2px 2px 0 #0066ff;
    }
    36% {
        text-shadow: 3px 3px 0 #000;
    }
    45% {
        text-shadow: 2px -2px 0 #ff0000, -2px 2px 0 #0066ff;
    }
    46% {
        text-shadow: 3px 3px 0 #000;
    }
    100% {
        text-shadow: 3px 3px 0 #000;
    }
}

@keyframes glitch-top {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(0);
    }
    21% {
        transform: translate(-2px, -2px);
        color: #ff0000;
    }
    25% {
        transform: translate(0);
    }
    35% {
        transform: translate(-2px, 2px);
        color: #ff0000;
    }
    36% {
        transform: translate(0);
    }
    45% {
        transform: translate(2px, -1px);
        color: #ff0000;
    }
    46% {
        transform: translate(0);
    }
    100% {
        transform: translate(0);
    }
}

@keyframes glitch-bottom {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(0);
    }
    21% {
        transform: translate(2px, 2px);
        color: #0066ff;
    }
    25% {
        transform: translate(0);
    }
    35% {
        transform: translate(2px, -2px);
        color: #0066ff;
    }
    36% {
        transform: translate(0);
    }
    45% {
        transform: translate(-2px, 1px);
        color: #0066ff;
    }
    46% {
        transform: translate(0);
    }
    100% {
        transform: translate(0);
    }
}

.book-container {
    max-width: 800px;
    margin: 0 auto;
    perspective: 2000px;
    padding: 20px;
}

.book {
    position: relative;
    width: 100%;
    height: 600px;
    transform-style: preserve-3d;
    transform: rotateX(10deg);
}

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    border: 8px solid #000;
    padding: 30px;
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-shadow: 10px 10px 0 rgba(0,0,0,0.5);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page:not(.current-page) {
    pointer-events: none;
}

.page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    background: #fff;
    border: 8px solid #000;
    box-sizing: border-box;
}

.meme-image-container {
    width: 70%;
    aspect-ratio: 1;
    max-width: 300px;
    margin: 10px auto;
    padding: 15px;
    background: #fff;
    border: 8px solid #000;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.meme-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.pixel-btn {
    font-family: 'Press Start 2P', cursive;
    padding: 1rem 2rem;
    background: #000;
    color: #fff;
    border: 4px solid #fff;
    cursor: pointer;
    margin: 1rem;
    image-rendering: pixelated;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.8rem;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.5);
}

.pixel-btn:hover {
    transform: scale(1.1);
    background: #f00;
}

.pixel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #666;
}

.book-controls {
    text-align: center;
    margin: 2rem auto;
    position: relative;
    z-index: 1000;
    width: 100%;
    padding: 10px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .book {
        height: 500px;
        margin-bottom: 20px;
    }

    .meme-image-container {
        width: 80%;
        max-width: 250px;
        padding: 12px;
    }

    .page {
        padding: 20px;
    }

    .page h2 {
        font-size: 1.2rem !important;
    }

    .pixel-btn {
        padding: 0.8rem 1.5rem;
        margin: 0.5rem;
    }

    body {
        padding-bottom: 80px;
    }

    .pixel-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .book {
        height: 400px;
        margin-bottom: 15px;
    }

    .meme-image-container {
        width: 85%;
        max-width: 200px;
        padding: 10px;
    }

    .page {
        padding: 15px;
    }

    .page h2 {
        font-size: 1rem !important;
        line-height: 1.4;
    }

    .pixel-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.7rem;
        margin: 0.5rem;
    }

    body {
        padding-bottom: 60px;
    }

    .content {
        padding: 0.5rem;
    }

    .pixel-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        text-shadow: 3px 3px 0 #000;
    }
}

.enter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.3);
}

.enter-btn {
    margin-top: 2rem;
    padding: 1.5rem 4rem !important;
    font-size: 1.2rem !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .enter-btn {
        padding: 1.2rem 3rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .enter-btn {
        padding: 1rem 2.5rem !important;
        font-size: 0.8rem !important;
    }
}

.meme-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 15px;
    color: #000;
    text-transform: uppercase;
    padding: 8px;
    max-width: 90%;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .meme-title {
        font-size: 0.8rem;
        margin-top: 10px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .meme-title {
        font-size: 0.7rem;
        margin-top: 8px;
        padding: 4px;
    }
}

.ca-address {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    text-align: center;
    padding: 8px;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    margin-top: 1rem;
    animation: flash 0.5s infinite;
    user-select: none;
    pointer-events: none;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 1px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-all;
}

@keyframes flash {
    0% {
        background: #ff0000;
        color: #fff;
    }
    33% {
        background: #fff;
        color: #000;
    }
    66% {
        background: #0066ff;
        color: #fff;
    }
    100% {
        background: #ff0000;
        color: #fff;
    }
}

@media (max-width: 768px) {
    .ca-address {
        font-size: 0.45rem;
        padding: 6px;
        letter-spacing: 0;
        margin: 1rem auto;
        width: 90%;
    }
}

@media (max-width: 480px) {
    .ca-address {
        font-size: 0.35rem;
        padding: 4px;
        letter-spacing: 0;
        margin: 0.8rem auto;
        width: 95%;
    }
}

.copy-btn {
    font-family: 'Press Start 2P', cursive;
    padding: 0.5rem 1rem;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    margin: 0.5rem auto;
    display: block;
    font-size: 0.7rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
    transition: all 0.2s;
}

.copy-btn:hover {
    transform: scale(1.05);
    background: #0066ff;
}

.copy-btn:active {
    transform: translateY(2px);
    box-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

@media (max-width: 480px) {
    .copy-btn {
        font-size: 0.6rem;
        padding: 0.4rem 0.8rem;
    }
} 