/* ---------------------------------------------------
   Root & Body 
   --------------------------------------------------- */
html {
    font-size: 100%;      /* typically 16px base */
    line-height: normal;
    height: 100%;
    overflow: hidden;     /* matches reference: no scrolling at root */
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    /* Use Courier New as default for body & footer text */
    font-family: 'Courier New', Courier, monospace;
    background: url('background.jpg') no-repeat center center fixed;
    background-size: cover;
}

/* ---------------------------------------------------
   Canvas
   --------------------------------------------------- */
canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1; /* behind all other elements */
}

/* ---------------------------------------------------
   Floating Buttons Container
   --------------------------------------------------- */
.floating-buttons {
    position: absolute;
    top: 65%;
    left: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translate(-50%, -50%);
}
.button-wrapper {}

/* Desktop Buttons (Montserrat) */
.btn-left, .btn-right {
    font-family: 'Montserrat', sans-serif; /* override Courier New for buttons */
    font-size: 20px;
    padding: 14px 28px;
    background: rgba(30, 30, 30, 0.7);
    color: white;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    position: absolute;
}
.btn-left {
    left: 20%;
    text-align: left;
}
.btn-right {
    right: 20%;
    text-align: right;
}

/* Hover Effects */
.btn-left:hover {
    transform: scale(1.1);
    background: rgba(50, 50, 50, 0.9);
    color: red;
    text-shadow: 0 0 10px red;
}
.btn-right:hover {
    transform: scale(1.1);
    background: rgba(50, 50, 50, 0.9);
    color: rgb(0, 174, 255);
    text-shadow: 0 0 20px rgb(0, 174, 255);
}

/* ---------------------------------------------------
   Footer (Restoring original sizes, now matched to Human version)
   --------------------------------------------------- */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: #FFFFFF;
    padding: 1rem;
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 3;
}
/* Revert text to 14px from 13px */
.footer-left {
    font-size: 14px;
    color: #bbb;
}
.footer-right {
    display: flex;
    gap: 15px;
    margin-right: 30px;
}
/* Changed icons to 20px from 24px to match Human version */
.footer-right a {
    text-decoration: none;
    color: #fff;
    font-size: 20px; /* Updated to match Human version */
    transition: all 0.3s ease;
}
.footer-right a:hover {
    color: #FFFFFF;
    text-shadow: 0 0 10px #FFFFFF;
    transform: scale(1.2);
}

/* ---------------------------------------------------
   Tablet: 481px to 768px
   --------------------------------------------------- */
@media (min-width: 481px) and (max-width: 768px) {
    .floating-buttons {
        top: 65%;
        left: 50%;
        transform: translate(-50%, -50%);
        flex-direction: row;
        justify-content: space-between;
    }
    .btn-left, .btn-right {
        width: auto;
        font-family: 'Montserrat', sans-serif;
        font-size: 18px;
        padding: 12px 24px;
        position: absolute;
    }
    .btn-left {
        left: 20%;
        text-align: left;
    }
    .btn-right {
        right: 20%;
        text-align: right;
    }
    /* Slight canvas scale for tablets */
    canvas {
        transform: scale(0.95);
        transform-origin: bottom center;
        position: absolute;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100vw;
        height: 100vh;
        object-fit: cover;
    }
    footer {
        padding: 1rem;
    }
    .footer-right a {
        font-size: 20px; /* Updated to match Human version */
    }
}

/* ---------------------------------------------------
   Mobile: 480px or less
   --------------------------------------------------- */
@media (max-width: 480px) {
    /* Canvas pinned at bottom */
    canvas {
        position: absolute;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100vw;
        height: 90vh;
        object-fit: cover;
        transform: none;
    }

    /* Buttons pinned at bottom, full width */
    .floating-buttons {
        position: fixed;
        bottom: 80px;
        left: 0;
        right: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 9999;
        transform: none;
    }
    .button-wrapper {
        flex: 1;
        display: flex;
        align-items: center;
    }
    .button-wrapper.left {
        justify-content: flex-start;
    }
    .button-wrapper.right {
        justify-content: flex-end;
    }
    /* Montserrat for mobile buttons too */
    .btn-left, .btn-right {
        position: static;
        display: inline-block;
        font-family: 'Montserrat', sans-serif;
        font-size: 16px;
        background: rgba(30, 30, 30, 0.7);
        color: white;
        text-decoration: none;
        padding: 10px 20px;
        border: none;
        border-radius: 30px;
        transition: all 0.3s ease-in-out;
        margin: 0;
        white-space: nowrap;
    }
    .btn-left {
        border-radius: 0 30px 30px 0;
    }
    .btn-right {
        border-radius: 30px 0 0 30px;
    }

    /* Footer visible on mobile, icons at 20px */
    footer {
        display: flex;
    }
    .footer-right a {
        font-size: 20px; /* Updated to match Human version */
    }
}