* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body { 
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-image: linear-gradient(to top, #0053c7, white);
    perspective: 1500px; /* gives the 3D depth */
    overflow: hidden; 
}

header {
    width: 100%;
    height: 80px;
    background-color: white;
    display: flex;
    justify-content: left;
    top: 0;
    left: 0;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav button:not(.logo) {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
}

button {
    background: none;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 16px;
    height: 60px;
    min-width: 100px;
    transition: border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

button.active-btn:not(.logo) {
    border: 2px solid #0053c7;
    color: #0053c7;
}

button:focus {
    outline: none;
}

.deck {
    position: relative;
    width: 80vw;
    height: 60vh;
    margin: 10vh auto;
    transform-style: preserve-3d;
}

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* initial State: hidden and tilted back */
    opacity: 0;
    transform: rotateX(-90deg) translateZ(-200px);
    pointer-events: none;
}

.page.active {
    /* active State: flat and visible */
    opacity: 1;
    transform: rotateX(0deg) translateZ(0);
    pointer-events: all;
}

/* style for the page that just left */
.page.exit {
    transform: rotateX(90deg) translateZ(-200px);
    opacity: 0;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer{
    width: 100%;
    background-color: #0053c7;
    color: white;
    padding: 20px;
    text-align: center;
}

/* small screens */
@media (max-width: 600px) {
    header {
        height: auto;
        padding: 10px;
    }

    nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    nav button:not(.logo) {
        padding: 0 8px;
        min-width: 0;
        font-size: 13px;
    }

    nav button.logo {
        padding-right: 5px;
        padding-left: 0;
        min-width: 0;
    }
    
    .logo img {
        width: 40px;
        height: 40px;
    }
}