/* Import font dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    /* Gradien Langit Biru Cerah */
    background: linear-gradient(to bottom, #56CCF2 0%, #2F80ED 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- ANIMASI LATAR BELAKANG LANGIT --- */
.sky-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 1. Matahari */
.sun {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 120px;
    height: 120px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 60px #FF8C00, 0 0 100px #FFD700;
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); box-shadow: 0 0 60px #FF8C00, 0 0 100px #FFD700; }
    to { transform: scale(1.05); box-shadow: 0 0 80px #FF8C00, 0 0 130px #FFD700; }
}

/* 2. Awan CSS Murni */
.cloud {
    position: absolute;
    background: #fff;
    border-radius: 50px;
    opacity: 0.8;
    animation: floatClouds linear infinite;
}
.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 50%;
}
.cloud::before {
    width: 60px; height: 60px;
    top: -25px; left: 15px;
}
.cloud::after {
    width: 40px; height: 40px;
    top: -15px; right: 15px;
}

/* Variasi ukuran dan kecepatan awan */
.cloud1 { width: 120px; height: 40px; top: 20%; left: -150px; animation-duration: 35s; transform: scale(1.5); opacity: 0.9; }
.cloud2 { width: 100px; height: 35px; top: 40%; left: -150px; animation-duration: 25s; animation-delay: 5s; transform: scale(1); }
.cloud3 { width: 150px; height: 50px; top: 65%; left: -200px; animation-duration: 45s; animation-delay: 10s; transform: scale(1.2); opacity: 0.7; }
.cloud4 { width: 90px; height: 30px; top: 10%; left: -100px; animation-duration: 20s; animation-delay: 15s; transform: scale(0.8); }

@keyframes floatClouds {
    0% { transform: translateX(-10vw); }
    100% { transform: translateX(110vw); }
}

/* 3. Angin */
.wind {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    height: 2px;
    border-radius: 2px;
    animation: blowWind linear infinite;
}

.wind1 { width: 150px; top: 30%; left: -200px; animation-duration: 6s; }
.wind2 { width: 100px; top: 50%; left: -150px; animation-duration: 4s; animation-delay: 2s; }
.wind3 { width: 250px; top: 70%; left: -300px; animation-duration: 8s; animation-delay: 1s; }
.wind4 { width: 80px; top: 85%; left: -100px; animation-duration: 5s; animation-delay: 3s; }

@keyframes blowWind {
    0% { transform: translateX(-10vw); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(110vw); opacity: 0; }
}

/* --- KONTEN UI (BERSIH & MODERN) --- */
.content-wrapper {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
}

h1 {
    color: #fff;
    text-shadow: 0 0px 6px rgba(0, 0, 0, 2);
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-align: center;
}

.container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 35px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.container p {
    color: #555;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.upload-area {
    border: 2px dashed #2F80ED;
    background: rgba(47, 128, 237, 0.05);
    padding: 30px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: rgba(47, 128, 237, 0.1);
    border-color: #56CCF2;
    transform: translateY(-2px);
}

.upload-area p {
    color: #2F80ED;
    font-weight: 600;
    margin: 0;
}

img#preview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

button {
    background: linear-gradient(135deg, #FFB75E 0%, #ED8F03 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(237, 143, 3, 0.3);
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 143, 3, 0.5);
}

button:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

#result-box {
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    display: none;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- OPTIMASI RESPONSIVE (MOBILE) --- */
@media (max-width: 480px) {
    .container {
        padding: 25px 20px;
    }
    h1 {
        font-size: 1.5rem;
    }
    .sun {
        width: 80px;
        height: 80px;
        top: 5%;
        right: 5%;
    }
}