html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
}
main {
    display: flex;
    flex: 1 0 auto;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}
main section {
    flex: 1 1 40%;
    max-width: 40%;
}

header {
    background-color: dodgerblue;
    letter-spacing: 0.1cm;
    padding: 1%;
    font-variant: small-caps;
    font-family: "Ink Free", sans-serif;
    font-weight: bold;
    background-image: url("image/gato.png");
    background-repeat: no-repeat;
    background-size: 150px 160px;
    color: white;
    font-size: large;
    text-align: center;
}
header h1 {
    margin-left: 150px;
}
.small-img {
    width: 100px;
}
footer {
    background-color: white;
    border-top: 5px dashed dodgerblue; /*dotted dashed double*/
    padding: 1% 0;
    text-align: center;
    width: 100%;
}
section.osa1 {
    border-left: 2px dashed red;
    border-right: 2px dashed red;
    padding: 2%;
    border-radius: 60px;
    margin-bottom: 50px;
}
section.osa2 {
    border-left: 2px solid dodgerblue;
    border-right: 2px solid dodgerblue;
    padding: 2%;
    border-radius: 60px;
    text-align: center;
}
.osa1 h2 {
    color: red;
    font-family: Roboto, sans-serif;
    background-image: url("image/fire.jpg");
    background-repeat: no-repeat;
    background-size: 100% 75px;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    font-variant: small-caps;
}
.osa2 h2 {
    color: dodgerblue;
    font-family: "Comic Sans MS", sans-serif;
    border-bottom: 2px solid dodgerblue;
    padding: 5px;
    text-align: center;
}
.osa1 div {
    padding: 10px;
    font-family: Roboto, sans-serif;
}
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: lightskyblue;
    overflow: hidden; /*peidetud*/
}
nav ul li {
    float: left;
}
nav ul li a {
    display: block;
    color: white;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    font-variant: small-caps;
    font-family: "Ink Free", sans-serif;
    font-weight: bold;
    font-size: 25px;

    border-bottom: 2px solid lightskyblue; /* invisible placeholder */
}
nav ul li a:hover {
    color: dodgerblue;
    border-bottom: 2px solid dodgerblue;
}
ul#teemad {
    list-style-type: none;
    text-align: center;
    padding: 20px;
}
#teemad li {
    border: 1px solid red;
    padding: 40px 0;
    margin: 20px 0;
    text-align: center;
    font-variant: small-caps;
    font-family: "Bahnschrift", sans-serif;
    font-weight: bold;
    font-size: 30px;
    color: white;
    text-shadow: 0 0 20px rgba(0, 0, 0, 1);
}
#teemad li#html {
    background-image: url("image/html.png");
    background-repeat: no-repeat;
    background-size: 100px 100px;
    background-position: calc(25% - 50px) center;
    background-color: darkorange;
}
#teemad li#css {
    background-image: url("image/css.png");
    background-repeat: no-repeat;
    background-size: 100px 100px;
    background-position: calc(25% - 50px) center;
    background-color: dodgerblue;
}
#teemad li#js {
    background-image: url("image/js.png");
    background-repeat: no-repeat;
    background-size: 100px 100px;
    background-position: calc(100% - 20px) center;
    background-color: #F7DF1E;
}

.rotating {
    animation: rotate360 20s linear infinite;

}

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Full-page image styles */
.spin-cat {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;       /* Full viewport width */
    height: 100vh;      /* Full viewport height */
    object-fit: cover;  /* Cover the entire area without distortion */
    transform-origin: center center;
    transform-style: preserve-3d;
    z-index: -1;
}
.gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.gallery img {
    width: 200px;
}
#youtube-iframe {
    border: none;
}
#spotify-iframe {
    border: none;
    width: 100%;
}
#google-maps-iframe {
    border: none;
}
.centered {
    display: flex;
    align-items: center;
    justify-content: center;
}
.button-table {
    table-layout: fixed;
    width: 100%;
    padding: 10px;
}
.button-table td {
    padding: 10px;
    text-align: center;
}
.button2 {
    background-color: dodgerblue;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-weight: bold;
}
.button2:hover {
    background-color: lightskyblue;
}
.text-answer {
    border: 2px solid dodgerblue;
    border-radius: 10px;
    padding: 10px;
    width: 500px;
}
h1 {
    position: relative; /* on vaja et h1 saab liikuda lehel */
    display: inline-block;
    transition: transform 0.3s;
}
.black { color: black; }
.white { color: white; }
.draggableImage {
    width: 100px;
}
.floating-div {
    position: absolute;
    background-color: skyblue;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    left: 80%;
    top: 2%;
}
.floating-div h2 {
    color: white;
    font-family: "Comic Sans MS", sans-serif;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid white;
}
.list1 {
    color: white;
    font-size: 18px;
}
.list1 li::marker {
    color: dodgerblue;
}