/* --- Global Styles --- */
* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc; /* Very light cool grey background */
  color: #334155; /* Soft dark grey text */
  display: flex;
  height: 100vh;
  flex-direction: column;
}

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  background-color: #F4F7F9;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

.header img {
  height: 140px;
  transition: transform 0.3s ease;
}

.header img:hover {
   transform: scale(1.02);
}

.header-buttons {
  display: flex;
  gap: 12px;
  margin: 0 auto;
}

.header a {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

/* Button Colors */
.prompts-btn { background-color: #3b82f6; color: white; }
.prompts-btn:hover { background-color: #2563eb; transform: translateY(-1px); }

.about-btn { background-color: #64748b; color: white; }
.about-btn:hover { background-color: #475569; transform: translateY(-1px); }

/* --- Layout --- */
.content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
  width: 240px;
  padding: 30px;
  background-color: #F4F7F9;
  border-right: 1px solid #e2e8f0;
}

.sidebar h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.category {
  margin-bottom: 12px;
  font-size: 15px;
  color: #475569;
  display: flex;
  align-items: center;
}

.category input {
  margin-right: 10px;
  accent-color: #3b82f6;
  transform: scale(1.2);
}

/* --- Main Content Area --- */
.main {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background-color: #f8fafc;
}

/* Grid Layout */
.cards-container {
  display: grid;
  /* This creates columns that are exactly 300px wide */
  grid-template-columns: repeat(auto-fill, 300px);
  gap: 24px;
  justify-content: start;
}

/* Search Box spans full grid width */
.search-box {
  grid-column: 1 / -1; 
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-bottom: 0; 
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* --- The Card Design --- */
.card {
  /* We use 100% here because the Grid Container (above) controls the actual width (300px) */
  width: 100%; 
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  border-color: #cbd5e1;
}

/* --- Tonal Spectrum Tags (The Cool Palette) --- */
.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: flex-start;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tag.business { background: linear-gradient(135deg, #0f172a, #1e293b); color: #ffffff; }
.tag.tech-support { background: linear-gradient(135deg, #6d28d9, #7c3aed); color: #ffffff; }
.tag.productivity { background: linear-gradient(135deg, #403B52, #06b6d4); color: #ffffff; }
.tag.diet-health { background: linear-gradient(135deg, #0f766e, #14b8a6); color: #ffffff; }
.tag.learning { background: linear-gradient(135deg, #9b806e, #FFC067); color: #ffffff; }
.tag.therapy { background: linear-gradient(135deg, #d8b4fe, #F1AF7B); color: #4c1d95; }
.tag.personal-assistant { background: linear-gradient(135deg, #C4D8E2, #C4D8E2); color: #0f172a; }
.tag.various { background: linear-gradient(135deg, #94a3b8, #00FFF0); color: #0f172a; }

.title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.4;
}

.desc {
  font-size: 14px;
  color: #64748b;
  flex-grow: 1;
  margin-bottom: 20px;
  line-height: 1.6;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
  padding-top: 15px;
}

.button {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.button.copy-btn:hover {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.chatgpt-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  opacity: 0.7;
}
.chatgpt-icon-button:hover {
  background-color: #f1f5f9;
  opacity: 1;
}
.chatgpt-icon {
  width: 20px;
  height: 20px;
}

.footer {
  padding: 20px 20px;
  text-align: center;
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
}

.footer-links a {
  margin: 0 10px;
  color: #64748b;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .header { flex-direction: column; gap: 15px; }
  .content { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e2e8f0; padding: 20px; }
  .card { width: 100%; }
  .header img { height: 80px; }
}