:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --light: #f8fafc;
  --dark: #1e293b;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding: 20px;
}

.app-container {
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  min-height: 90vh;
}

/* Header */
.app-header {
  background: var(--gradient);
  color: white;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><path d="M500 50Q600 0 700 50t200 0v50H0V50q100-50 200 0t200-50 200 50 100-50z"/></svg>');
  background-size: cover;
}

.app-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
}

.app-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 300;
  position: relative;
}

/* Search Section */
.search-section {
  padding: 2rem;
  background: var(--light);
  border-bottom: 1px solid #e2e8f0;
}

.search-container {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-box {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.search-box:focus {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.search-btn {
  background: var(--primary);
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  color: white;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: auto;
  width: auto;
  justify-content: flex-start;
}

.search-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3),
    0 5px 10px rgba(37, 99, 235, 0.2);
  color: white;
}

.search-btn i {
  color: white;
}

.search-btn:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.search-btn:active i {
  color: var(--dark);
  background: transparent !important;
}

.refresh-btn {
  background: var(--secondary);
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  color: white;
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
  color: white;
}

.refresh-btn:active {
  transform: translateY(0);
}

/* Animation khi refreshing */
.refresh-btn.refreshing i {
  animation: spin 1s linear infinite;
}

/* Content Section */
.content-section {
  padding: 2rem;
}

/* Loader */
.loader-container {
  text-align: center;
  padding: 3rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error */
.error-container {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: var(--danger);
}

/* Stats */
.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--secondary);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .app-container {
    border-radius: 15px;
  }

  .app-title {
    font-size: 2rem;
  }

  .search-section {
    padding: 1.5rem;
  }

  .content-section {
    padding: 1rem;
  }

  .search-btn, .refresh-btn {
    min-width: 50px;
    width: 50px;
    padding: 0.75rem;
    justify-content: center;
  }

  .search-btn .me-2 {
    margin-right: 0 !important;
  }

  .search-btn span:not(.fa-search) {
    display: none;
  }

  .stats-bar {
    flex-direction: column;
    gap: 1rem;
  }
}
