/* General Styles */
body {
    font-family: Metropolis;
    background: linear-gradient(180deg, #0f2027, #203a43, #2c5364);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite, fadeIn 0.40s ease forwards;
    color: white;
    text-align: center;
    margin: 0;
    padding: 15px;
    opacity: 0;
}

/* Main Container */
.container {
    max-width: 70%;
    margin: auto;
    padding: 15px;
    opacity: 0;
    animation: fadeIn 0.40s ease forwards 0.40s;
}

/* Input Fields */
input {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 10px;
    margin: 10px 0;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #66ccff;
    box-shadow: 0 0 8px #66ccff;
    transition: all 0.3s ease;
    transform: scale(1.02);
}

/* Structures Layout */
#structures {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
}

/* Structure Box */
.structure {
    border: 2px solid white;
    padding: 15px;
    width: calc(33.33% - 20px);
    min-width: 250px;
    box-sizing: border-box;
    background-color: transparent;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(255, 255, 255, 0.1);
}

/* Totals Box */
.totals-box {
    border: 2px solid white;
    padding: 20px;
    margin-top: 15px;
    border-radius: 8px;
    background-color: transparent;
    box-shadow: 2px 2px 10px rgba(255, 255, 255, 0.1);
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}

/* Total Area and Total Squares Text Inside Box */
#totalArea, #totalSquares {
    margin: 0.25em 0;
    padding: 0;
    border: none;
    box-shadow: none;
    font-size: inherit;
}

/* Buttons */
button {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    border-radius: 5px;
    padding: 10px;
    transition: transform 0.2s ease;
}

button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Add Structure Button */
#addStructureBtn {
    width: calc(33.33% - 20px);
    min-width: 0px;
    height: 40px;
    padding: 0;
    box-sizing: border-box;
    margin-top: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
}

/* Material List Section */
#materialList {
    margin-top: 15px;
}

.material-result {
    margin-top: 15px;
    font-size: 0.8em;
    color: #66ccff;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        max-width: 95%;
        padding: 10px;
    }

    #structures {
        flex-direction: column;
        margin-right: 0;
    }

    .structure {
        width: 100%;
        min-width: auto;
    }

    #addStructureBtn {
        width: 100%;
        margin-top: 10px;
    }

    .totals-box {
        width: 100%;
        margin: 10px auto;
        box-sizing: border-box;
    }

    #totalArea, 
    #totalSquares {
        font-size: 1em;
    }

    #totalSquares {
        margin-top: 0;
    }
}

button {
    font-size: 1em;
}

input {
    font-size: 1em;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Fade In Animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
