/* Style Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Verdana, Geneva, sans-serif; /* Font gaya lama */
}

body {
  /* Background pola grid halus mirip kertas/catbox */
  background-color: #f0f8ff;
  background-image: 
    linear-gradient(#e1efff 1px, transparent 1px),
    linear-gradient(90deg, #e1efff 1px, transparent 1px);
  background-size: 20px 20px;
  color: #333;
  padding: 20px;
  min-height: 100vh;
}

.main-wrapper {
  max-width: 700px; /* Lebar dibatasi agar rapi */
  margin: 0 auto;
  text-align: center;
}

/* Header */
/* Update bagian header ini di style.css */

.header {
  margin-bottom: 20px; /* Beri jarak sedikit ke bawah */
}

/* Update style.css bagian .header h1 */

.header h1 {
  font-family: 'Fredoka', sans-serif; 
  font-size: 3.5rem; 
  font-weight: 600;
  
  display: inline-block;
  vertical-align: middle;
  color: #2c3e50; 
  
  /* BAGIAN YANG DIUBAH: Jarak ke logo */
  margin-left: -5px; /* Ubah jadi 0px agar nempel, atau 5px untuk jarak tipis */
  
  /* Efek miring & bayangan (tetap dipertahankan) */
  transform: rotate(-3deg); 
  text-shadow: 3px 3px 0px #a4d4e4; 
  transition: transform 0.3s ease;
}

/* Tambahan: Efek goyang dikit pas kursor diarahkan ke teks */
.header h1:hover {
  transform: rotate(0deg) scale(1.05);
}

/* Pastikan logo awan/gambar ukurannya pas */
.cat-logo, .header i {
  font-size: 3.5rem; /* Samakan besarnya dengan teks */
  vertical-align: middle;
  color: #5ab9ea; /* Warna biru awan */
  filter: drop-shadow(3px 3px 0px #a9dce5); /* Bayangan pada logo */
}


.cat-logo {
  height: 60px;
  vertical-align: middle;
}

.intro-text {
  margin: 20px 0;
  font-size: 1.1rem;
  color: #000;
}

/* Kotak Upload (Kotak Biru Besar) */
.upload-container {
  margin-bottom: 30px;
}

.drop-zone {
  background-color: #caebf2; /* Biru muda catbox */
  border: 2px solid #a9dce5;
  border-radius: 10px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.drop-zone:hover, .drop-zone.dragover {
  background-color: #bee2ea;
  transform: translateY(-2px);
  border-color: #5ab9ea;
}

.drop-zone h2 {
  color: #2c7da0;
  font-weight: normal;
  font-size: 1.8rem;
}

/* --- FILE LIST (PERBAIKAN UTAMA) --- */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.file-item {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  
  /* Layout Grid untuk kestabilan konten */
  display: grid;
  grid-template-columns: 1fr; /* 1 Kolom penuh */
  gap: 10px;
}

/* BARIS ATAS: Nama File & Status */
.file-header {
  display: flex;
  justify-content: space-between; /* Nama kiri, Status kanan */
  align-items: flex-start;
  gap: 15px;
  width: 100%;
}

.file-name {
  font-size: 0.95rem;
  font-weight: bold;
  color: #000;
  
  /* TEKNIK PEMOTONGAN TEKS (PASTI JALAN) */
  word-break: break-all;     /* Paksa potong kata panjang */
  overflow-wrap: break-word; /* Support modern */
  white-space: normal;       /* Izinkan multi-line */
  line-height: 1.4;
}

/* Badge Status */
.file-status {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap; /* Teks status jangan turun baris */
}
.status-uploading { background: #eee; color: #555; }
.status-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Progress Bar */
.progress {
  height: 15px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ddd;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: #5ab9ea; /* Biru */
  transition: width 0.3s;
}

/* Bagian Input Link & Tombol */
.actions {
  display: flex;
  flex-wrap: wrap; /* Tombol turun ke bawah di HP */
  gap: 8px;
}

.actions input {
  flex: 1; /* Input ambil sisa ruang */
  min-width: 200px; /* Minimal lebar input */
  padding: 8px;
  border: 1px solid #ccc;
  background: #f9f9f9;
  font-size: 0.9rem;
  color: #555;
}

.actions button {
  padding: 8px 15px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #eee;
  font-weight: bold;
  color: #333;
}
.actions button:hover { background: #ddd; }

/* Meta Info (Size/Speed) */
.file-meta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 5px;
}

/* Footer Links */
.footer-links {
  margin-top: 40px;
  margin-bottom: 20px;
  color: #666;
}
.footer-links a {
  color: #2c7da0;
  text-decoration: none;
  font-weight: bold;
}
.footer-links a:hover { text-decoration: underline; }

/* Responsive Mobile */
@media (max-width: 480px) {
  .header h1 { font-size: 2rem; }
  .drop-zone { height: 150px; }
  .drop-zone h2 { font-size: 1.4rem; }
  
  .actions {
    flex-direction: column; /* Tombol tumpuk vertikal di HP */
  }
  .actions input, .actions button {
    width: 100%;
  }
}
