@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --gt-blue: #002244;
    --gt-yellow: #f8c000;
    --gt-white: #ffffff;
    --gt-black: #000000;
    --gt-dirt: #8b5a2b;
    --gt-grass: #47a025;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'VT323', monospace;
    image-rendering: pixelated;
}

body {
    background: url('growtopia_bg.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--gt-white);
    font-size: 1.6rem;
    overflow-x: hidden;
}

/* Moving Clouds Layer */
.clouds-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 100vh;
    background: url('growtopia_bg.png') repeat-x;
    background-size: 100% 100%;
    opacity: 0.2;
    z-index: -1;
    animation: moveClouds 60s linear infinite;
}

@keyframes moveClouds {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.auth-gt-container {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Authentic Logo */
.gt-logo {
    width: 300px;
    margin-bottom: 30px;
    filter: drop-shadow(4px 4px 0px #000);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Dialog Frame Styling with Entry Animation */
.gt-dialog {
    background: var(--gt-blue);
    border: 30px solid transparent;
    border-image: url('dialog_frame.png') 60 stretch;
    padding: 10px;
    max-width: 800px;
    width: 95%;
    margin: 20px 0;
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.5);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.gt-dialog:nth-child(2) {
    animation-delay: 0.2s;
}

.gt-dialog:nth-child(3) {
    animation-delay: 0.4s;
}

.gt-dialog:nth-child(4) {
    animation-delay: 0.6s;
}

.gt-dialog:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.6), 0 0 15px var(--gt-yellow);
    z-index: 10;
}

.gt-header {
    color: var(--gt-yellow);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0px #000;
}

/* Inventory Grid */
.gt-inventory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border: 3px solid #000;
}

.gt-slot {
    width: 80px;
    height: 80px;
    background: url('inventory_slot.png');
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.1s;
    border: 2px solid transparent;
}

.gt-slot:hover {
    border-color: var(--gt-white);
    transform: scale(1.05);
}

.gt-slot i {
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 0px #000);
}

/* Authentic GT Buttons */
.gt-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #47a025;
    /* Grass Green */
    color: white;
    text-decoration: none;
    border: 4px solid #000;
    box-shadow: inset -4px -4px 0 #3b821b, inset 4px 4px 0 #68c13f;
    margin-top: 15px;
    cursor: pointer;
}

.gt-btn:hover {
    transform: scale(1.1);
    animation: bounce 0.5s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1.1) translateY(0);
    }

    50% {
        transform: scale(1.1) translateY(-5px);
    }
}

.gt-btn.yellow {
    background: #f8c000;
    box-shadow: inset -4px -4px 0 #c29600, inset 4px 4px 0 #ffda5a;
}

/* World Info Bar */
.gt-world-info {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 10%;
    display: flex;
    justify-content: space-between;
    border-bottom: 4px solid #000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.world-name {
    color: var(--gt-yellow);
    font-weight: bold;
}

/* Fix Project Card Layout - Using a separate class for text blocks vs inventory slots */
.gt-project-card {
    background: var(--gt-blue);
    border: 20px solid transparent;
    border-image: url('dialog_frame.png') 60 stretch;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: 0.2s;
    min-height: 180px;
    justify-content: center;
}

.gt-project-card:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.6), 0 0 15px var(--gt-yellow);
    z-index: 10;
}

@media (max-width: 600px) {
    .gt-inventory {
        grid-template-columns: repeat(4, 1fr);
    }

    .gt-slot {
        width: 60px;
        height: 60px;
    }

    .gt-slot i {
        font-size: 1.8rem;
    }
}