/* style.css - Premium Mobile-First UI design */
:root {
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette */
  --bg-primary: #0a0c10;
  --bg-surface: rgba(17, 22, 34, 0.65);
  --bg-surface-hover: rgba(26, 33, 50, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Accent Gradients & Glows */
  --accent-primary: #6366f1;
  --accent-secondary: #a855f7;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-glow: 0 0 20px rgba(99, 102, 241, 0.25);
  
  /* Custom Card Shadows */
  --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 12px 35px rgba(99, 102, 241, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* Background Ambient Glow Elements */
.glow-bg {
  position: fixed;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.05) 50%, rgba(10, 12, 16, 0) 100%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Design */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: var(--accent-gradient);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--accent-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Powered By Profile */
.powered-by {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.powered-text {
  display: none; /* Hide on very small screens if needed, but flex by default */
}

@media (min-width: 640px) {
  .powered-text {
    display: inline;
  }
}

.github-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  box-shadow: var(--card-shadow);
}

.github-profile:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

.github-profile svg {
  color: #fff;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.1;
}

.profile-username {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Hero Section */
.hero-section {
  margin-bottom: 2.5rem;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

/* Search Bar Design */
.search-bar-container {
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
}

.search-bar-container input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--card-shadow);
}

.search-bar-container input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), var(--card-shadow);
  background: var(--bg-surface-hover);
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: color 0.2s, background-color 0.2s;
}

.clear-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Section Title & Counter */
.section-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}



.section-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.project-count {
  font-size: 0.75rem;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
}

/* Responsive Cards Grid (Mobile-First) */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Individual Card UI */
.project-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem;
  color: inherit;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  overflow: clip; /* clips bg to border-radius but lets absolute dropdowns escape */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--card-shadow);
  cursor: default;
}

.project-card:hover, .project-card.expanded {
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
  background: var(--bg-surface-hover);
}

/* Align actions column produced by script.js */
.project-card .project-card-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
  align-self: start;
}

/* Inner wrapper clips the bg/border-radius without clipping dropdown */
.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  width: 100%;
  gap: 0.75rem;
}

.project-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

/* Smart Avatar / Icon from name first letter */
.project-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.project-card:hover .project-avatar {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--accent-glow);
}

.project-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.project-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Compatibility selectors used by script.js render output */
.project-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card-details {
  color: var(--text-secondary);
  font-size: 0.92rem;
  white-space: normal;
  margin-top: 0.25rem;
}

.project-meta-row {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 0.35rem;
}

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
}

.project-url-preview {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.schedule-chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.05rem;
  min-width: 78px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(20, 184, 166, 0.32);
  background: rgba(20, 184, 166, 0.1);
  color: #ccfbf1;
  cursor: pointer;
  padding: 0 0.55rem;
  transition: all 0.2s ease;
  text-align: left;
}

.schedule-chip:hover {
  background: rgba(20, 184, 166, 0.18);
  border-color: rgba(20, 184, 166, 0.55);
}

.schedule-chip[data-state="Paused"] {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
}

.schedule-chip[data-state="Error"] {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.26);
  color: #fca5a5;
}

.schedule-chip-state {
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.schedule-chip-last {
  color: currentColor;
  font-size: 0.62rem;
  line-height: 1.1;
  opacity: 0.78;
  white-space: nowrap;
}

.project-link-btn, .project-expand-btn {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.project-card:hover .project-link-btn,
.project-card:hover .project-expand-btn {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.project-link-btn:hover {
  background: rgba(99, 102, 241, 0.4) !important;
  border-color: rgba(99, 102, 241, 0.8) !important;
  color: #fff !important;
}

.url-dropdown-menu {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: rgba(15, 17, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  z-index: 9999;
  box-shadow: 0 24px 50px rgba(0,0,0,0.8), 0 0 0 100vw rgba(0,0,0,0.4);
  flex-direction: column;
  gap: 8px;
  width: calc(100vw - 32px);
  max-width: 600px;
}

.url-dropdown-menu.show {
  display: flex !important;
  animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.dropdown-item-advanced {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  transition: background 0.2s;
  border: 1px solid transparent;
}

.dropdown-item-advanced:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.dropdown-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.url-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.url-input-group input {
  flex-grow: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 6px 8px;
  border-radius: 6px;
  min-width: 0;
  font-family: monospace;
}

.url-input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.chevron {
  transition: transform 0.3s ease;
}

.project-card.expanded .chevron {
  transform: rotate(180deg);
}

.project-description-dropdown {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-card.expanded .project-description-dropdown {
  max-height: 1100px;
  opacity: 1;
  padding: 0 1.25rem 1.5rem 1.25rem;
  margin-top: 0.5rem;
}

.project-description-body {
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.project-credentials {
  margin-top: 0.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.cred-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a855f7;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cred-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.cred-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 0.75rem;
}

.cred-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  background: rgba(10, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  min-width: 0;
  transition: all 0.2s ease;
}

.cred-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(10, 12, 16, 0.7);
}

.cred-key {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.cred-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.copy-cred-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.copy-cred-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #fff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}



.active-project-grid {
  margin-bottom: 2rem;
}

.active-project-card {
  padding: 1rem;
  background: rgba(15, 17, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.active-project-meta {
  display: grid;
  gap: 0.45rem;
}

.active-project-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

.active-project-url {
  color: var(--text-secondary);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.active-project-badge {
  border-radius: 9999px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #a7f3d0;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
}

.active-project-stats {
  display: grid;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-window {
  width: min(100%, 540px);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  background: rgba(10, 12, 16, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-body {
  display: grid;
  gap: 1rem;
}

.modal-row {
  display: grid;
  gap: 0.35rem;
}

.modal-row label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.modal-row input,
.modal-row textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

.modal-row textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.button-primary,
.button-secondary {
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.button-primary {
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  color: #fff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
  .active-project-card {
    grid-template-columns: 1fr;
  }

  .modal-window {
    padding: 1rem;
  }
}



/* Empty State / Error UI */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.empty-state svg {
  color: var(--text-muted);
}

/* Loading Shimmer Animation */
.shimmer-card {
  height: 84px;
  background: linear-gradient(90deg, var(--bg-surface) 25%, rgba(255,255,255,0.03) 37%, var(--bg-surface) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* Footer style */
.app-footer {
  margin-top: auto;
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.app-footer code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}

/* Mobile: keep layout clean on small screens */
@media (max-width: 550px) {
  .project-header {
    padding: 0.9rem 1rem;
    gap: 0.5rem;
  }
  .project-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .project-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

}
  .project-name {
    font-size: 0.95rem;
  }
  .project-url-preview {
    font-size: 0.72rem;
  }
  .project-actions {
    gap: 0.3rem;
  }
  .schedule-chip {
    min-width: 60px;
    width: 60px;
    padding: 0 0.4rem;
  }
  .schedule-chip-last {
    display: none;
  }
  .project-link-btn {
    width: 30px;
    height: 30px;
  }
  .project-expand-btn {
    width: 30px;
    height: 30px;
  }
  .dropdown-toggle-btn {
    padding: 0 8px !important;
    height: 30px;
    font-size: 0.78rem;
  }
  .url-dropdown-menu {
    min-width: 290px;
    right: -30px;
  }
  .cred-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 100%;
    width: 100%;
  }
  .cred-key {
    grid-column: 1 / -1;
  }
  .cred-value {
    width: 100%;
    text-align: left;
    word-break: break-all;
    white-space: normal;
  }
  .copy-cred-btn {
    grid-column: 2;
    grid-row: 2;
    align-self: flex-end;
  }

}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .app-container {
    padding: 2.5rem 2rem;
  }
}

@media (min-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .project-name {
    font-size: 1.05rem;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 999999;
  pointer-events: none;
}

.toast {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Enhanced App Links & Badges */
.app-details-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}

.link-card-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

.link-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.link-platform-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.platform-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.link-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.link-badge.netlify {
  background: rgba(0, 173, 159, 0.15);
  color: #00d1c1;
  border: 1px solid rgba(0, 173, 159, 0.3);
}

.link-badge.vercel {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.link-badge.health {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.link-url-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

.link-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-icon-copy {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-icon-copy:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.btn-icon-open {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-icon-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Health Ping Result & JSON Payload Block */
.health-ping-result {
  margin-top: 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.health-ping-result.hidden {
  display: none;
}

.ping-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: #818cf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.json-code-block {
  margin: 0;
  padding: 0.75rem;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #38bdf8;
  font-family: 'Fira Code', 'Courier New', Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 220px;
  overflow-y: auto;
}

.json-code-block .json-key {
  color: #c084fc;
}
.json-code-block .json-string {
  color: #4ade80;
}
.json-code-block .json-number {
  color: #facc15;
}
.json-code-block .json-boolean {
  color: #f472b6;
}
.json-code-block .json-null {
  color: #94a3b8;
}

/* Password & Credentials Provision Box */
.cred-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cred-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.cred-field-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.cred-field-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.cred-field-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cred-field-val-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cred-field-val {
  font-family: monospace;
  font-size: 0.9rem;
  color: #f1f5f9;
  font-weight: 600;
}

.eye-toggle-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.eye-toggle-btn:hover {
  color: var(--text-primary);
}

/* Minimal Project Card Layout */
.minimal-project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.minimal-project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.04) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.minimal-project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.2);
}

.minimal-project-card:hover::before {
  opacity: 1;
}

.minimal-card-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
}

.project-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.project-title-area {
  flex: 1;
  min-width: 0;
}

.minimal-project-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-arrow-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.minimal-project-card:hover .card-arrow-icon {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.5);
  transform: translate(2px, -2px);
}

/* Mobile Screen Responsive Compatibility */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0.75rem 0.5rem;
    align-items: flex-end; /* Mobile bottom sheet style or centered */
  }

  .modal-window {
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 1.25rem 1rem;
    border-radius: 20px 20px 16px 16px;
  }

  .app-details-section {
    gap: 0.85rem;
  }

  .link-card-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .link-platform-header {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .link-url-text {
    white-space: normal;
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .link-card-actions {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    justify-content: stretch;
  }

  .link-card-actions .btn-icon-copy,
  .link-card-actions .btn-icon-open {
    flex: 1;
    justify-content: center;
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
  }

  .cred-box {
    padding: 1rem 0.85rem;
    gap: 0.85rem;
  }

  .cred-field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .cred-field-val-container {
    width: 100%;
    justify-content: space-between;
  }

  .cred-field-val {
    word-break: break-all;
    font-size: 0.88rem;
  }

  .cred-field-row .btn-icon-copy {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
  }

  .cred-box .btn-icon-copy {
    width: 100%;
    justify-content: center;
  }

  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    bottom: auto;
  }

  .toast {
    width: 100%;
    justify-content: center;
  }
}



