*{
    box-sizing:border-box;
}

/* BODY CENTER FIX */
body {
    margin:0;
    font-family:'Segoe UI', sans-serif;
    background:linear-gradient(135deg, #0b2c5f, #1c4fa3);
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
}
.top-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: transparent;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid #ddd;
}

.btn-nav {
    text-decoration: none;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-nav:hover {
    background: #0056b3;
}
/* WRAPPER */
.main-wrapper{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:20px;
    max-width:1200px;
    width:100%;
    padding:10px;
}

/* DOWNLOAD AREA */
.download-area{
    width:100%;
    text-align:center;
    margin-top:10px;
}

/* EDITOR */
.editor {
    flex:1;
    max-width:400px;
    background:#ffffff;
    padding:20px;
    border-radius:15px;
    box-shadow:0 10px 25px rgba(0,0,0,0.15);
}

.editor h3 {
    margin-top:0;
    text-align:center;
}

/* INPUT */
input, textarea {
    width:100%;
    margin-top:10px;
    padding:12px;
    border-radius:10px;
    border:1px solid #ddd;
    font-size:14px;
    transition:0.3s;
}

input:focus, textarea:focus {
    border-color:#007bff;
    outline:none;
    box-shadow:0 0 5px rgba(0,123,255,0.3);
}

/* FILE INPUT */
input[type="file"]{
    padding:8px;
    background:#f9f9f9;
    cursor:pointer;
}

/* TEXTAREA */
#desc{
    min-height:200px;
    resize:vertical;
}

/* BUTTON */
button {
    margin-top:12px;
    padding:12px;
    border:none;
    background:linear-gradient(135deg, #007bff, #4da3ff);
    color:white;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
    transition:0.3s;
}

button:hover {
    transform:translateY(-2px);
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
}

.download-area button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* PREVIEW CONTAINER */
.container {
    flex:1;
    max-width:600px;
    background:#ffffff;
    border-radius:5px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,0.2);
}

.header {
  background: linear-gradient(135deg, #4e73df, #224abe);
  padding: 12px;
  border-radius: 10px;
  width: 94%;
  max-width: 900px;
  margin: 15px auto;

  box-shadow: 
    0 8px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -2px 5px rgba(0,0,0,0.2);

  backdrop-filter: blur(8px);
}

.header img {
  width: 100%;
  height: 55px;
  margin-bottom: -5px;
  border-radius: 14px;
  object-fit: contain;
}

.top-image {
    width:100%;
    padding:0 20px;
    height:auto; /* ✅ penting */
}

#previewContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom */
    gap: 5px;
}

#previewContainer img {
    width: 100%;
    aspect-ratio: 4 / 3; 
    object-fit: cover;
}

.top-image img {
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:5px;
}

/* TITLE */
.title-box {
    margin:20px;
    padding:18px;
    border-radius:20px;
    text-align:center;
    font-weight:bold;
    font-size:22px;
    background:linear-gradient(135deg, #7da2e3, #a5c1ff);
    color:#0b2c5f;
    text-transform:uppercase;
    letter-spacing:1px;
}

/* CONTENT */
.content {
    padding:0 25px 0;
    text-align:justify;
    line-height:1.7;
    font-size:15px;
}

.note {
    margin-top:10px;
    font-size:11px;
    color:#555;
    background:#fff3cd;
    padding:8px 10px;
    border-radius:8px;
    border-left:4px solid #ffc107;
}

/* FOOTER */
.footer {
    margin:20px;
    padding:15px;
    border-radius:20px;
    background:#0b2c5f;
    color:#fff;

    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;

    font-size:11px;
    flex-wrap:nowrap;
    overflow:hidden;
}

.footer div {
    display:flex;
    align-items:center;
    gap:3px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* ICON */
.footer i {
    font-size:14px;
    transition:0.3s;
}

.footer i:hover {
    transform:scale(1.2);
}

.footer .fa-globe { color:#00d4ff; }
.footer .fa-youtube { color:#ff0000; }

.footer .fa-instagram {
    background:linear-gradient(45deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.footer .fa-facebook { color:#1877f2; }

/* RESPONSIVE */
@media(max-width:768px){
    body{
        align-items:flex-start;
        padding-top:20px;
    }

    .main-wrapper{
        flex-direction:column;
    }

    .editor, .container{
        max-width:100%;
        border-radius:5px;
    }

    .title-box {
        font-size: 14px;
    }

    .top-image {
        height:auto;
    }

    .top-image img {
        height:auto;
        object-fit:contain;
    }

    .footer {
        flex-direction:column;
        text-align:center;
    }
}