@font-face {
    font-family: 'Zabars';
    src: url('fonts/Zabars.ttf');
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Bold.woff2') format('woff2');
    font-weight: 700;
}

html {
    background-image: url('img/background-image.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position-x: center;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

h1, h2 {
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: bold;
}

h1 {
    font-family: 'Zabars', Arial, Helvetica, sans-serif;
    font-size: 48px;
}

h2 {
    font-size: clamp(18px, 6vh, 32px);
}

canvas {
    background-color: black;
}

#game_container {
    position: relative;
    width: 720px;
    aspect-ratio: 3 / 2;
    max-width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
}

#canvas {
    width: 100%;
    height: 100%;
}

.game_overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen_background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.overlay_content {
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.6);
    padding: clamp(8px, 2.5vh, 20px) clamp(14px, 5vw, 30px);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 1.5vh, 12px);
    max-height: 90%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.overlay_content::-webkit-scrollbar {
    display: none;
}

.overlay_button {
    padding: clamp(5px, 1.3vh, 10px) clamp(14px, 4vw, 24px);
    font-size: clamp(16px, 3.2vh, 22px);
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background-color: #e8a33d;
    color: #222;
    font-weight: bold;
}

.overlay_button:hover {
    background-color: #ffbb55;
}

.primary_button {
    font-size: clamp(16px, 3.8vh, 26px);
    padding: clamp(7px, 1.8vh, 14px) clamp(20px, 6vw, 40px);
}

.start_screen_icons {
    display: flex;
    gap: clamp(6px, 1.8vh, 14px);
}

.ingame_controls {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 10px;
}

.icon_button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.icon_button img {
    display: block;
    width: 28px;
    height: 28px;
    padding: 10px;
    border-radius: 50%;
    background-color: #e8a33d;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-drag: none;
}

.icon_button:hover img {
    background-color: #ffbb55;
}

.start_screen_icons .icon_button img {
    width: clamp(18px, 3.2vh, 28px);
    height: clamp(18px, 3.2vh, 28px);
    padding: clamp(5px, 1.3vh, 10px);
}

.mobile_controls {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 20px 20px 20px;
    z-index: 2;
    pointer-events: none;
}

.mobile_controls_left,
.mobile_controls_right {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.rotate_icon {
    width: 64px;
    height: 64px;
}

#rotate_device {
    position: fixed;
    inset: 0;
    z-index: 10;
    background-color: rgb(20, 12, 6);
}

#options_screen,
#impressum_screen {
    z-index: 4;
    background-color: rgba(0, 0, 0, 0.7);
}

.impressum_content {
    max-width: 90%;
    max-height: 85%;
    overflow-y: auto;
}

.impressum_text {
    text-align: left;
    font-size: clamp(16px, 2.8vh, 17px);
    line-height: 1.4;
}

.controls_box {
    margin-top: clamp(2px, 0.8vh, 6px);
    padding-top: clamp(5px, 1.8vh, 14px);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    width: 100%;
}

.controls_box h3 {
    margin: 0 0 clamp(2px, 1vh, 8px) 0;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #e8a33d;
}

.controls_table {
    color: white;
    border-collapse: collapse;
    font-size: clamp(16px, 2.6vh, 18px);
    margin: 0 auto;
}

.controls_table td {
    padding: clamp(1px, 0.6vh, 4px) 10px;
    text-align: left;
}

.overlay_content p {
    font-size: clamp(16px, 3vh, 20px);
}

.d_none {
    display: none;
}

@media (max-height: 500px) {
    h1 {
        display: none;
    }
}
