/* 
* This WebGL template is licensed to the purchaser only.
* Unauthorized copying, redistribution, modification, or use of this template or any of its components � in whole or in part � 
* without a valid license is strictly prohibited and constitutes a violation of international copyright laws and licensing terms.
* This notice must remain intact in this file as a condition of use.
* Copyright � Devon Lively, 2025. All rights reserved. 
*/

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

html, body {
    height: 100%;
    overscroll-behavior: none;
}

body {
    margin: 0;
    background-color: #062100;
}

canvas {
    display: block;
}



#metricsOverlayWrapper {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 9999;
    cursor: grab;
}

    #metricsOverlayWrapper.dragging {
        cursor: grabbing;
    }

#metricsOverlay {
    background: rgba(0, 0, 0, 0.85);
    color: #1EAED3;
    font-family: monospace;
    font-size: 13px;
    padding: 0;
    border-radius: 8px;
    width: 250px;
    box-shadow: 0 0 10px ##1EAED355;
    overflow: hidden;
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 8px 10px;
    border-bottom: 1px solid #1EAED3;
    font-weight: bold;
    font-size: 14px;
    user-select: none;
}

#metricsCloseBtn {
    background: none;
    border: none;
    color: #ff5c5c;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

    #metricsCloseBtn:hover {
        color: #ff1f1f;
    }

.metrics-body {
    padding: 10px;
}

#game-ready {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 4px;
    justify-content: center;
    font-size: 1rem;
    z-index: 9999;
}

#minigame-button {
    pointer-events: auto;
	margin-top: 15px;
    padding: 4px 8px;
    font-size: 16px;
    background-color: #1EAED3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}

    #minigame-button:hover {
        background-color: #1565c0;
    }

 .iframe-container {
    position: relative;
    background: black;
    border: 1px Solid #1EAED3;
    border-radius: 5px;
    overflow: hidden;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    margin: 3% auto;

    width: 90vw;
    height: calc(90vw * 7 / 8); /* 8:7 ratio */
    max-height: 90vh;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
}

.close-iframe-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(0,0,0,0.9);
    color: white;
    border: none;
    font-size: 20px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10000;
}

#play-count{
    position: fixed;
    top: 10px;
    right: 15px;
    color: #FFFFFF;
    font-size: 26px;
    z-index: 9999;
}

#unity-container {
    position: relative; 
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #062100;
}

#unity-canvas {
    width: 100%;
    height: 100%;
    background: #062100;
}

#background-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../loadingScreens/backgroundPortrait.png') no-repeat center center fixed;
    background-size: cover;
    z-index: 9990;
}

/* Landscape override */
@media (orientation: landscape) {
    #background-cover {
        background-image: url('../loadingScreens/backgroundLandscape.png');
    }
}

#loading-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9993;
}

#unity-loading-bar {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#unity-logo {
    text-align: center;
}

    #unity-logo img {
        max-width: 80%;
    }

#unity-progress-bar-empty {
    width: 50%;
    height: 24px;
    margin: 10px 20px 0px 20px;
    border: 1px Solid #F5CF09;
    padding: 1px;
    position: relative;
    background-color: #3D6F3C;
    border-radius: 5px;
    overflow: hidden;
}

:root {
    --pulse-start: #4caf50;
    --pulse-mid: #66bb6a;
}

@keyframes pulseColor {
    0%, 100% {
        background-color: var(--pulse-start);
    }

    50% {
        background-color: var(--pulse-mid);
    }
}

.pulsing {
    animation: pulseColor 1.5s infinite ease-in-out;
}

#unity-progress-bar-full {
    height: 100%;
    width: 0%;
    background-color: #4caf50;
    transition: width 0.3s;
    border-radius: 5px;
}

#progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    z-index: 2;
    pointer-events: none;
    font-size: 12px;
}

#quote-table {
    position: fixed;
    bottom: 28px;
    width: 85%;
    left: 50%;      
    transform: translateX(-50%);
    color: #4EF5FF;
    text-align: center;
    z-index: 9993;
    font-size: 18px;
}

#quote-table a {
    text-decoration: none;  
    color: #4EF5FF;
}

#quote-table a:hover {
    text-decoration: underline; 
    color: #4EF5FF;
}

#version-number-text {
    position: fixed;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: #3DD3DC;
    text-align: center;
    font-size: 16px;
    z-index: 9993;
}

/* Corner Button Menu */
#menu-options {
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
}

/* Corner Button Main Button */
.menu-button {
    position: fixed;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    background-size: contain;
    z-index: 9989;
}

#tap-to-start-button-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

#tap-to-start-button {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: none;
    color: white;
    font-size: 32px;
    border: none;
    z-index: 9992;
    display: block;
    cursor: pointer;
}

/* Main Buttons */
#unity-menu-button {
    bottom: 10px;
    background: url('../cornerMenu/icons/menu-button.png?') no-repeat center;
}

#unity-fullscreen-button {
    bottom: 10px;
    background: url('../cornerMenu/icons/fullscreen-button.png') no-repeat center;
}

#close-menu-button {
    bottom: 10px;
    background: url('../cornerMenu/icons/close-button.png') no-repeat center;
}

.menu-button.small-button {
    width: 28px;
    height: 28px;
    right: 10px;
    margin-bottom: 1px;
    border: none;
}

/* Inner Menu Buttons */
#rating-button.small-button {
    background: url('../cornerMenu/icons/rate-button.png?') no-repeat center;
    border: none;
}

.menu-button.small-button.custom-button {
    background: url('') no-repeat center;
    border: none;
}

#menu-metrics-button.small-button {
    background: url('../cornerMenu/icons/metrics-button.png') no-repeat center;
    border: none;
}

#menu-fs-button.small-button {
    background: url('../cornerMenu/icons/fullscreen-button.png') no-repeat center;
    border: none;
}

#menu-fs-ios-button.small-button {
    background: url('../cornerMenu/icons/fullscreen-button.png') no-repeat center;
    border: none;
}

/* Rating Screen */
#ratingModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#rateTitleText {
    background-color: rgba(0,0,0,0.35);
    border-radius: 5px;
}

.rating-selection-button {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 5px;
    margin-left: 5px;
    margin-right: 5px;
    color: black;
    transition: color 0.2s;
}

    .rating-selection-button.selected {
        color: grey;
    }

#averageRating {
    padding-top: 5px;
}

#ratingWindow {
    background: #1eaed3;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.star {
    font-size: 40px;
    color: rgba(0,0,0,0.35);
    cursor: pointer;
    transition: color 0.2s;
}

    .star.hover,
    .star.selected {
        color: gold;
    }
