body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    margin: 0;
}

.card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
    width: 100%;
    max-width: 450px;
}

.title {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    font-weight: normal;
    background: linear-gradient(145deg, #4d7ee8, #a347ff, #4d7ee8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: #333;
}

.description {
    color: #888;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 2.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    background-color: #f9f9f9;
}

.upload-area p {
    margin: 0;
    color: #555;
}

.formats {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 0.5rem !important;
}

.images-preview {
    margin-top: 0; /* removed large gap between upload box and buttons */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0; /* don't reserve vertical space when empty */
}

img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.buttons {
    margin-top: 30px; /* add at least 30px spacing below upload area */
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Mobile friendly adjustments */
@media (max-width: 480px) {
    .upload-area { padding: 1.25rem; min-height: 130px; }
    .card { padding: 1.5rem; border-radius: 12px; }
    .buttons { flex-direction: column; gap: 0.75rem; align-items: stretch; }
    .btn { width: 100%; }
    .formats { font-size: 0.75rem; }
    .title { font-size: 1.8rem; }
}
.btn {
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: #8a63ff;
    color: white;
}

.btn-primary:hover {
    background-color: #7a53ff;
}

.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 1rem 0;
}

.progress-bar {
    width: 0%;
    height: 10px;
    background-color: #76c7c0;
    border-radius: 4px;
    transition: width 0.1s linear;
}

#time-taken {
    font-size: 0.9rem;
    color: #888;
}

/* Make upload box a positioned container so the preview image can be centered inside it */
.upload-area {
    position: relative;
    overflow: hidden;
}

.upload-area .box-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

/* Dismiss button overlay inside upload box */
.dismiss-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.dismiss-btn:hover {
    background: rgba(0,0,0,0.75);
}