@import url('https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    user-select: none;
    background-color: #26282b;
}

body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: #26282b;
}

body::-webkit-scrollbar-thumb {
    background-color: #ffffff;
    border-radius: 20px;
    border: 4px solid #26282b;
}

header {
    background-color: #003a1e;
    color: #fff;
    text-align: start;
    padding: 16px 100px;
    font-size: 24px;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0.8;
}

header:hover {
    opacity: 1;
}

header p {
    position: start;
    text-align: start;
}

#headerinput {
    margin-top: -40px;
    display: flex;
    justify-content: end;
    align-items: flex-end;
    text-align: end;
}

#headerinput a button {
    cursor: pointer;
}

#überschriftlink {
    text-decoration: none;
    color: #fff;
}

.button {
    transition: background-color 0.5s, color 0.5s;
    background-color: #012f6b;
    color: #fff;
    text-decoration: none;
    border: unset;
    padding: 12px;
    border-radius: 7px;
    min-width: 160px;
    font-weight: 600;
    margin-left: 10px;
    box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%);
}

.button:hover {
    transition: background-color 0.5s, color 0.5s;
    background-color: #006eff;
    color: #003a1e;
}

.button a {
    transition: 0.5s;
    color: #fff;
    text-decoration: none;
}

#tetrishintergrund {
    background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.72)), url("/bilder/ubodigat.com Tetris Hintergrund.svg");
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}


/*Responsive header*/

@media (max-width: 960px) {
    #headerinput a {
        margin-top: 50px;
    }
}

@media (max-width: 680px) {
    #headerinput a {
        margin-top: 50px;
    }
}

@media (max-width: 600px) {
    #headerinput a {
        margin-left: 40px;
        margin-right: -40px;
    }
}

@media (max-width: 560px) {
    #headerinput a {
        margin-left: 65px;
        margin-right: -65px;
    }
}

@media (max-width: 540px) {
    header p a {
        margin-left: -70px;
    }
    #headerinput {
        display: flex;
        margin-top: -85px;
        margin-bottom: 0px;
    }
    #headerinput a button {
        font-size: 10px;
        margin-top: 40px;
        margin-left: 900px;
        padding: 10px;
        min-width: 100px;
        font-weight: 600;
        margin-left: 5px;
    }
}

@media (max-width: 400px) {
    nav header div {
        margin-bottom: 10px;
    }
    header p a {
        margin-left: -70px;
    }
    #headerinput {
        display: flex;
        margin-top: -80px;
        margin-bottom: 0px;
    }
    #headerinput a button {
        font-size: 10px;
        margin-top: 40px;
        margin-left: 900px;
        padding: 10px;
        min-width: 100px;
        font-weight: 600;
        margin-left: 5px;
    }
}

@media (max-width: 350px) {
    nav header div {
        margin-bottom: 10px;
    }
    header p a {
        margin-left: -70px;
    }
    #headerinput {
        display: flex;
        margin-top: -80px;
        margin-bottom: 0px;
    }
    #headerinput a {
        margin-left: 80px;
        margin-right: -80px;
    }
    #headerinput a button {
        font-size: 10px;
        margin-top: 40px;
        margin-left: 900px;
        padding: 10px;
        min-width: 100px;
        font-weight: 600;
        margin-left: 5px;
    }
}


/* Ab hier kein Grundcss code mehr*/

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #1c1c1c;
    color: white;
}

main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 24px 16px;
}

.instructions {
    background: #333;
    padding: 20px;
    border-radius: 12px;
    width: 260px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.instructions h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.instructions ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.instructions li {
    margin: 8px 0;
    font-size: 0.95rem;
}

#startButton {
    background: linear-gradient(to right, #00bcd4, #009cb1);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#startButton:hover {
    transform: scale(1.03);
}

canvas {
    display: block;
    background: #111;
    border-radius: 8px;
}

#next {
    width: 180px;
    height: 180px;
    background-color: #111;
    border: 2px solid #444;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.game-area {
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.3);
    border-radius: 12px;
    padding: 10px;
}

#fullscreenToggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid #888;
    border-radius: 5px;
    font-size: 0.9rem;
    padding: 6px 10px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-area:hover #fullscreenToggle,
.fullscreen #fullscreenToggle {
    opacity: 1;
}

.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen canvas#tetris {
    width: auto !important;
    height: 90vh !important;
}

.fullscreen canvas#next {
    position: absolute;
    top: 20px;
    left: 20px;
}