body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    background: url('/static/images/d.png') no-repeat center center fixed;
    background-size: cover;
}

.main-container {
    text-align: center;
    width: calc(100% - 40px);
    max-width: 400px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

.loading {
    font-size: 1.5em;
    font-weight: bold;
    animation: bounce 1s infinite;
}

.loading-text {
    margin-top: 10px;
    font-size: 1em;
    color: #555;
}

img {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 20px;
    border: 5px solid #000;
}

.button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 1em;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.button:disabled {
    background-color: #ccc;
}

textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    transition: height 0.5s ease-in-out;
    resize: vertical;
}

textarea:focus {
    height: 150px;
}

hr {
    border: none;
    height: 2px;
    background-color: #ccc;
    margin: 20px 0;
}

.error-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    z-index: 1000;
}

.error-popup-content {
    margin-bottom: 10px;
    font-size: 1.5em;
    color: red;
}

.error-popup-close {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 20px;
    display: inline-block;
    font-size: 1.2em;
}

.error-popup-close:focus {
    outline: none;
}

@keyframes bounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

select#styleSelect {
    font-size: 1em;
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    transition: height 0.5s ease-in-out;
    resize: vertical;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/d.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-logo {
    width: 100px;
    height: 100px;
    background: url('/static/images/logo1.png') no-repeat center center;
    background-size: contain;
    animation: bounce 1s infinite;
}

.reddish-gradient {
    background: linear-gradient(45deg, #ff4e50, #f9d423);
}

.main-container {
    margin: 0 auto;
    width: 80%;
    text-align: center;
}

#resultContainers {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.result-container {
    flex: 1 1 calc(25% - 10px);
    margin: 5px;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}

.result-image {
    max-width: 100%;
    height: auto;
}

.download-button {
    display: block;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .result-container {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .result-container {
        flex: 1 1 100%;
    }
}

.promo-popup {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1000;
    text-align: center;
}

.promo-popup h2 {
    margin: 0;
    font-size: 1.5em;
}

.promo-popup a {
    display: block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.promo-popup a:hover {
    background-color: #0056b3;
}
