/* =============================================================================
   Hostingowy — One-Click App Installer Styles
   ============================================================================= */

/* ── App Cards ──────────────────────────────────────────────────────────── */
.app-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.app-card:hover {
  border-color: #444;
  background: #181818;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.app-card.featured::before {
  content: '★ Featured';
  position: absolute;
  top: 12px;
  right: -28px;
  background: linear-gradient(135deg, #f57c00, #ffb300);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 32px;
  transform: rotate(45deg);
  z-index: 1;
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}

.app-card-title {
  flex: 1;
}

.app-card-title h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 2px;
}

.app-card-title .app-category {
  font-size: 0.8rem;
  color: #666;
}

.app-card-description {
  color: #888;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.app-tag {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  color: #888;
  border: 1px solid rgba(255,255,255,0.08);
}

.app-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.app-card-footer .install-time {
  font-size: 0.8rem;
  color: #666;
}

.app-card-footer .install-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, #00c853, #009624);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.app-card-footer .install-btn:hover {
  opacity: 0.9;
}

.app-card-footer .install-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Installation List Items ────────────────────────────────────────────── */
.install-item {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.install-item:hover {
  border-color: #333;
}

.install-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.install-item-app {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-item-app .install-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.05);
}

.install-item-app h4 {
  color: #fff;
  font-size: 1rem;
}

.install-item-app .install-server {
  color: #666;
  font-size: 0.8rem;
}

.install-status-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-queued {
  background: rgba(33,150,243,0.15);
  color: #2196f3;
  border: 1px solid rgba(33,150,243,0.3);
}

.status-provisioning,
.status-installing {
  background: rgba(255,152,0,0.15);
  color: #ff9800;
  border: 1px solid rgba(255,152,0,0.3);
}

.status-completed {
  background: rgba(0,200,83,0.15);
  color: #00c853;
  border: 1px solid rgba(0,200,83,0.3);
}

.status-failed {
  background: rgba(255,68,68,0.15);
  color: #ff4444;
  border: 1px solid rgba(255,68,68,0.3);
}

.status-uninstalling {
  background: rgba(255,152,0,0.15);
  color: #ff9800;
  border: 1px solid rgba(255,152,0,0.3);
}

.status-uninstalled {
  background: rgba(156,39,176,0.15);
  color: #ce93d8;
  border: 1px solid rgba(156,39,176,0.3);
}

.install-item-progress {
  margin-top: 8px;
}

.install-item-progress .progress-bar-bg {
  width: 100%;
  height: 4px;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
}

.install-item-progress .progress-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.install-item-progress .progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #666;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dashboard-header {
    padding-top: 80px !important;
  }

  #apps-grid {
    grid-template-columns: 1fr !important;
  }

  .filter-group {
    width: 100%;
  }

  .filter-btn {
    flex: 1;
    text-align: center;
    font-size: 0.8rem !important;
    padding: 8px 12px !important;
  }
}

@media (max-width: 480px) {
  #apps-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .app-card {
    padding: 16px;
  }

  .app-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.installing-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

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

.app-card {
  animation: slideIn 0.3s ease forwards;
}

.app-card:nth-child(2) { animation-delay: 0.05s; }
.app-card:nth-child(3) { animation-delay: 0.1s; }
.app-card:nth-child(4) { animation-delay: 0.15s; }
.app-card:nth-child(5) { animation-delay: 0.2s; }
.app-card:nth-child(6) { animation-delay: 0.25s; }
.app-card:nth-child(7) { animation-delay: 0.3s; }
.app-card:nth-child(8) { animation-delay: 0.35s; }

/* ── Logs Modal ────────────────────────────────────────────────────────── */
.log-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.log-entry:last-child {
  border-bottom: none;
}

.log-time {
  color: #555;
  font-size: 0.7rem;
  min-width: 60px;
  flex-shrink: 0;
}

.log-icon {
  font-size: 0.85rem;
  min-width: 20px;
  text-align: center;
}

.log-message {
  color: #aaa;
  flex: 1;
}

.log-progress {
  color: #666;
  font-size: 0.75rem;
  min-width: 35px;
  text-align: right;
}
