/* styles/layout.css */

.game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #000;
}

#main-logo {
    position: absolute;
    top: 5%;
    left: 3%;
    width: 10%;
    height: auto;
    z-index: 1000;
    pointer-events: none;
    filter: drop-shadow(0 0.4vw 0.8vw rgba(0, 0, 0, 0.4));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Layer System */
.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.layer-sky {
    z-index: 1;
}

.layer-bg {
    z-index: 2;
}

.layer-flowers {
    z-index: 3;
}

.layer-ui {
    z-index: 10;
    pointer-events: auto;
}

/* Background Images */
.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity var(--bg-speed) ease-in-out;
}

/* Scene Specific Layouts */
.scene {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
}

/* UI Elements */
.title-img {
    width: 50%;
    margin-bottom: -5%;
}

.start-btn {
    width: 25%;
    transition: transform 0.2s;
}

.start-btn:hover {
    transform: scale(1.1);
}

/* Game Screen Layout */
.game-ui-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.garden-side {
    flex: 1.2;
    position: relative;
}

.tree-panel-side {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-right: 5%;
}

.card-container {
    width: 70%;
    aspect-ratio: 1;
    position: relative;
    margin-bottom: 26%;
    margin-left: 35%;
    animation: breathe 6s ease-in-out infinite;
}

.active-card {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.action-buttons {
    display: flex;
    gap: 5%;
    width: 80%;
    margin-left: 40%;
    margin-top: -20%;
}

.kind-btn {
    width: 45%;
    animation: danceBreathe 3s ease-in-out infinite;
}

.unkind-btn {
    width: 60%;
    animation: danceBreathe 3s ease-in-out infinite;
    animation-delay: -1.5s;
    /* Offset to alternate with kind-btn */
}

/* Tutorial & Result */
.tutorial-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin-bottom: 2%;

}

.tutorial-img-1 {
    width: 55%;
    height: auto;
    margin-left: -15%;
}

.tutorial-img-2 {
    width: 25%;
    height: auto;
    margin-left: -15%;
    animation: dance 3s ease-in-out infinite;
}

.result-text-img {
    width: 50%;
    margin-bottom: 10%;
    animation: dance 3s ease-in-out infinite;
}

.continue-btn {
    width: 20%;
    position: absolute;
    bottom: -2%;
}

.cloud-container {
    position: absolute;
    top: -10%;
    /* Bring the entire group more up using percentage */
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: filter 0.8s ease-in-out;
}

.clouds-stormy {
    filter: grayscale(1) brightness(0.7) !important;
}

.cloud {
    position: absolute;
    pointer-events: none;
    z-index: 5;
    opacity: 0.8;
    filter: brightness(1.1);
    user-select: none;
}

/* Credits System */
.credits-link {
    position: absolute;
    bottom: 3%;
    right: 3%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Outfit', sans-serif;
    font-size: 1.2vw;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
    z-index: 100;
}

.credits-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.credits-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.credits-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.credits-content {
    background: white;
    padding: 3vw 5vw;
    border-radius: 2vw;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    max-width: 60%;
    color: #333;
    font-family: 'Outfit', sans-serif;
}

.credits-content h2 {
    font-size: 2.5vw;
    margin-bottom: 2vw;
    color: #4CAF50;
}

.credits-content p {
    font-size: 1.4vw;
    margin: 1vw 0;
}

.credits-content a {
    color: #2196F3;
    text-decoration: none;
}

.credits-content a:hover {
    text-decoration: underline;
}

.credits-close-btn {
    position: absolute;
    top: 1vw;
    right: 2vw;
    background: transparent;
    border: none;
    font-size: 3vw;
    cursor: pointer;
    color: #999;
}

.credits-close-btn:hover {
    color: #333;
}