/* =========================================
   RESET & GLOBAL STYLES
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f4f8; /* Latar belakang biru muda lembut */
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 15px;
}

.container {
    width: 100%;
    max-width: 480px; /* Lebar optimal untuk tampilan upload */
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 25px;
    overflow: hidden;
}

/* =========================================
   HEADER & COUNTER
   ========================================= */
.header {
    text-align: center;
    margin-bottom: 25px;
}

.visitor-counter {
    display: inline-block;
    background: #eef6fc;
    color: #0077b6;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 15px;
    border: 1px solid #d0e8f5;
}

.counter-number {
    color: #023e8a;
    font-weight: 700;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #023e8a;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo span {
    color: #0096c7;
}

.subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
}

/* =========================================
   AD SLIDER (DINAMIS)
   ========================================= */
.ad-slider-container {
    position: relative;
    width: 100%;
    height: 200px; /* Tinggi slider tetap */
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ad-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

.ad-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.ad-slide {
    min-width: 100%;
    height: 100%;
}

.ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Gambar akan mengisi area tanpa gepeng */
    display: block;
}

/* Dots Indicator Dinamis */
.ad-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* Tombol Iklan Telegram */
h4 {
    text-align: center;
    margin: 0 0 20px 0;
}

h4 a {
    display: inline-block;
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: white;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(42, 171, 238, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

h4 a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 171, 238, 0.5);
}

/* =========================================
   DROP ZONE UPLOAD
   ========================================= */
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafbfd;
    cursor: pointer;
}

.drop-zone.dragover {
    border-color: #0096c7;
    background: #e0f7fa;
    transform: scale(1.02);
}

.drop-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.8;
}

.drop-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
}

.drop-subtext {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 20px;
}

.btn-select {
    background: #0077b6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 10px rgba(0, 119, 182, 0.2);
}

.btn-select:hover {
    background: #023e8a;
}

#file-input {
    display: none;
}

/* =========================================
   PROGRESS BAR
   ========================================= */
.progress-wrap {
    display: none; /* Hidden by default */
    margin-top: 25px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0096c7, #0077b6);
    border-radius: 10px;
    transition: width 0.2s ease;
}

/* =========================================
   RESULT AREA
   ========================================= */
.result-area {
    display: none; /* Hidden by default */
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-title {
    text-align: center;
    color: #059669;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.preview-box {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.preview-box img, 
.preview-box video {
    width: 100%;
    display: block;
    max-height: 300px;
    object-fit: contain;
}

.link-group {
    display: flex;
    gap: 10px;
}

.link-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #334155;
    background: #f8fafc;
    outline: none;
}

.link-input:focus {
    border-color: #0096c7;
}

.btn-copy {
    background: #0077b6;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #023e8a;
}

.btn-copy.copied {
    background: #059669;
}

/* Responsif untuk layar sangat kecil */
@media (max-width: 360px) {
    .container { padding: 15px; }
    .logo { font-size: 1.5rem; }
    .ad-slider-container { height: 160px; }
    .link-group { flex-direction: column; }
    .btn-copy { padding: 12px; }
}
