body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5 {
    font-family: 'Poppins', sans-serif;
}

.card {
    border-radius: 12px;
}

.model-status-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 16px;
  color: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  
  /* FIX: Ukuran TETAP stabil */
  height: 120px; /* Fixed height */
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.model-status-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0px;
  background: linear-gradient(90deg, #00c9ff, #92fe9d, #fed6e3);
  border-radius: 20px 20px 0 0;
}

.models-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1; /* Mengisi sisa space */
  min-height: 72px; /* Minimal height untuk 2 cards */
}
.model-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 12px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.model-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}
.model-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.model-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}
.model-fullname {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;
  line-height: 1.1;
}

.d-flex.align-items-center.justify-content-between {
  min-height: 40px; /* Fixed header height */
  margin-bottom: 12px !important;
}

.model-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: all 0.3s ease;
}

.model-card.success::before {
  background: linear-gradient(90deg, #00c9ff, #92fe9d);
}

.model-card.error::before {
  background: linear-gradient(90deg, #ff6b6b, #ffa500);
}

.model-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.model-svm .model-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.model-nb .model-icon {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.model-status {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Geser ke kanan */
  margin: 0;
  min-height: 16px;
}
.status-badge {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px; /* Lebih kecil */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.status-success {
  background: rgba(146, 254, 157, 0.3);
  color: #92fe9d;
  border: 1px solid rgba(146, 254, 157, 0.5);
}

.status-error {
  background: rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.5);
}

.status-footer {
  display: flex;
  justify-content: center;
}

.refresh-btn {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 10px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(10px);
}

.refresh-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.loading {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center vertically */
  gap: 12px;
  grid-column: 1 / -1;
  padding: 0; /* Hapus padding extra */
  height: 100%; /* Full height container */
  flex: 1;
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;
  line-height: 1.2;
}
/* Responsive */
@media (max-width: 576px) {
  .models-grid {
    grid-template-columns: 1fr;
    min-height: 72px; /* 1 card height */
  }
  
  .model-card {
    height: 72px !important; /* Sedikit lebih besar di mobile */
  }
}

.btn-download {
  background: linear-gradient(135deg, #00c9ff 0%, #92fe9d 100%) !important;
  border: none !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 10px 25px rgba(0, 201, 255, 0.4),
    0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-download:hover {
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 
    0 20px 40px rgba(0, 201, 255, 0.5),
    0 8px 25px rgba(0,0,0,0.2) !important;
  background: linear-gradient(135deg, #92fe9d 0%, #00c9ff 100%) !important;
}

.btn-download:active {
  transform: translateY(-1px) scale(1.02) !important;
}

.btn-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(255,255,255,0.4) 50%, 
    transparent 70%);
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.6s;
}

.btn-download:hover .btn-shine {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}

.btn-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.btn-download:active .btn-glow {
  width: 300px;
  height: 300px;
}

.card-body {
  position: relative;
  z-index: 2;
}

/* Hover card effect */
.download-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 30px 60px rgba(102, 126, 234, 0.4),
    0 12px 30px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .download-card {
    margin-bottom: 1rem;
  }
}

/* Smooth height transition */
.model-status-container {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.model-status-container.loading-state {
  /* Mencegah layout shift */
  pointer-events: none;
}

/* Pastikan tidak ada layout shift */
.models-grid > * {
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}