.start-screen {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    aspect-ratio: 19 / 12;
    height: auto;
    max-height: calc(100vh - 32px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 204, 0, 0.65);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.start-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.start-button {
    position: absolute;
    top: 36px;
    padding: 14px 40px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffd24d 0%, #ffb300 100%);
    color: #331d00;
    font-family: 'Midnight Crimson', sans-serif;
    font-size: 34px;
    letter-spacing: 3px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.impressum-button {
    position: absolute;
    right: 20px;
    bottom: 20px;
    padding: 10px 20px;
    border: 0;
    border-radius: 10px;
    background: rgba(33, 19, 0, 0.82);
    color: #ffcc00;
    font-family: 'Midnight Crimson', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.start-button:hover,
.restart-button:hover,
.impressum-button:hover {
    transform: translateY(-2px);
}

.impressum-screen {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.72);
}

.impressum-card {
    width: min(540px, 92vw);
    max-height: min(88vh, 760px);
    padding: 28px;
    border: 4px solid rgba(255, 204, 0, 0.65);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(62, 33, 5, 0.96) 0%, rgba(28, 16, 3, 0.96) 100%);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.impressum-card h2 {
    margin: 0 0 18px;
    color: #ffcc00;
    font-family: 'Midnight Crimson', sans-serif;
    font-size: 38px;
    letter-spacing: 2px;
    text-align: center;
}

.impressum-card p {
    margin: 10px 0;
    font-size: 24px;
    text-align: left;
    color: #ffffff;
    font-family: 'Arimo', sans-serif;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.impressum-note {
    color: #fff7d1;
    opacity: 1;
}

.game-over-screen,
.win-screen {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.game-over-screen {
    background: rgba(0, 0, 0, 0.6);
}

.win-screen {
    background: rgba(10, 36, 12, 0.58);
}

.game-over-screen img,
.win-screen img {
    width: min(335px, 92vw);
    padding: 16px;
    height: auto;
    display: block;
}

.win-screen img {
    border-color: rgba(170, 255, 120, 0.82);
    box-shadow: 0 14px 40px rgba(28, 89, 21, 0.45);
}

.restart-button {
    padding: 10px 20px;
    border: 0;
    border-radius: 10px;
    background: rgb(33 19 0 / 45%);
    color: #ffcc00;
    font-family: 'Midnight Crimson', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.loading-screen {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: calc(100vh - 32px);
    box-sizing: border-box;
    overflow: hidden;
    border: 4px solid rgba(255, 204, 0, 0.65);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
    background-color: #e6a24f;
}

.loading-puzzle {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.loading-piece {
    position: absolute;
    width: 50%;
    height: 50%;
    background-image: url('../img/5_background/second_half_background.png');
    background-size: 200% 200%;
    background-repeat: no-repeat;
    opacity: 0;
    animation: loadingPuzzleAssemble 1.35s cubic-bezier(0.18, 0.86, 0.32, 1.08) forwards;
    box-shadow: inset 0 0 0 1px rgba(255, 204, 0, 0.22);
}

.loading-piece-top-left {
    top: 0;
    left: 0;
    background-position: 0 0;
    --start-x: -115%;
    --start-y: -115%;
    --settle-x: -3%;
    --settle-y: -2%;
    --start-rotation: -8deg;
}

.loading-piece-top-right {
    top: 0;
    right: 0;
    background-position: 100% 0;
    --start-x: 115%;
    --start-y: -115%;
    --settle-x: 3%;
    --settle-y: -2%;
    --start-rotation: 8deg;
    animation-delay: 0.12s;
}

.loading-piece-bottom-left {
    bottom: 0;
    left: 0;
    background-position: 0 100%;
    --start-x: -115%;
    --start-y: 115%;
    --settle-x: -3%;
    --settle-y: 2%;
    --start-rotation: 8deg;
    animation-delay: 0.24s;
}

.loading-piece-bottom-right {
    right: 0;
    bottom: 0;
    background-position: 100% 100%;
    --start-x: 115%;
    --start-y: 115%;
    --settle-x: 3%;
    --settle-y: 2%;
    --start-rotation: -8deg;
    animation-delay: 0.36s;
}

.loading-pepe {
    position: absolute;
    left: 50%;
    bottom: 13%;
    width: min(160px, 24vw);
    height: auto;
    transform: translateX(-50%);
    filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.35));
}

@keyframes loadingPuzzleAssemble {
    0% {
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y)) rotate(var(--start-rotation));
    }

    70% {
        opacity: 1;
        transform: translate(0, 0) rotate(0);
    }

    84% {
        opacity: 1;
        transform: translate(var(--settle-x), var(--settle-y)) rotate(0);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(0);
    }
}

.orientation-hint {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.86);
    color: #ffcc00;
    text-align: center;
}

.orientation-hint p {
    margin: 0;
    font-size: 32px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.75);
}

.phone-icon {
    width: 58px;
    height: 92px;
    border: 5px solid #ffcc00;
    border-radius: 14px;
    position: relative;
    transform: rotate(90deg);
    box-shadow: 0 0 24px rgba(255, 204, 0, 0.35);
}

.phone-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffcc00;
    transform: translateX(-50%);
}

.fullscreen-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background-position: center;
    background-color: transparent;
    background-image: url('../icon/fullscreen.png');
    border: none;
    background-repeat: no-repeat;
    background-size: contain;
    outline: none;
    cursor: pointer;
    z-index: 1000;
}
