/* css/prompt-craft.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-app: #0f172a;          /* Slate 900 */
  --bg-panel: #1e293b;        /* Slate 800 */
  --bg-editor: #1a1b26;       /* Deep Blue/Black */
  --text-main: #94a3b8;       
  --text-editor: #c0caf5;     
  --accent-primary: #6366f1;  /* Indigo 500 */
  --accent-hover: #818cf8;    
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-app);
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Scrollbar Styling --- */
.custom-scroll::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: rgba(30, 41, 59, 0.5); }
.custom-scroll::-webkit-scrollbar-thumb { background: #6366f1; border-radius: 3px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: #818cf8; }

/* Main Frame */
.main-frame {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  max-width: 1800px;
  margin: 0 auto;
  height: 85vh; 
  display: flex;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* --- LEFT PANEL --- */
.left-panel {
  width: 320px;
  background: var(--bg-panel);
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.lp-section-top {
  flex: 0 0 45%; 
  overflow-y: auto;
  padding: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.lp-section-bottom {
  flex: 1; 
  overflow-y: auto;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.3);
}

/* Section Headers */
.panel-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Category Buttons */
.cat-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  margin-bottom: 2px;
  font-size: 0.9rem;
  color: #94a3b8;
  border-radius: 6px;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
}
.cat-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  padding-left: 1rem; 
}
.cat-btn.active {
  background: var(--accent-primary);
  color: white;
  font-weight: 600;
}

/* Style Pills */
.pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.style-btn {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.style-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: white;
  transform: translateY(-1px);
}
.style-btn:active {
  transform: translateY(0px);
}

/* --- RIGHT PANEL --- */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #0f172a;
  position: relative;
}

/* Toolbar */
.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

/* Text Area */
#prompt-textarea {
  flex: 1;
  width: 100%;
  background-color: var(--bg-editor);
  color: var(--text-editor);
  border: 1px solid #2e3c54; 
  border-radius: 8px;
  padding: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem; 
  line-height: 1.7; 
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
#prompt-textarea:focus {
  border-color: rgba(99, 102, 241, 0.5);
}
#prompt-textarea::placeholder {
  color: #475569;
  font-style: italic;
}

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

/* Buttons */
.btn-icon {
  background: transparent;
  color: #94a3b8;
  padding: 0.5rem;
  border-radius: 6px;
  transition: color 0.2s;
}
.btn-icon:hover { color: white; background: rgba(255,255,255,0.1); }

.btn-primary {
  background: var(--accent-primary);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-ghost {
  color: #94a3b8;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}
.btn-ghost:hover { color: #f1f5f9; }

/* --- ZEN MODE --- */
body.zen-active .main-frame {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  z-index: 50; /* High but below notifications */
  background: var(--bg-app);
}
body.zen-active .left-panel { display: none; }
body.zen-active #header, body.zen-active #footer { display: none; }
body.zen-active .right-panel { padding: 4rem 15%; }
body.zen-active #prompt-textarea {
  border: none;
  background: transparent;
  box-shadow: none;
  font-size: 1.2rem;
}

/* Saved Prompts Section */
.saved-prompts-section { margin-top: 3rem; margin-bottom: 3rem; }
.saved-prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.saved-prompt-item {
  background: var(--bg-panel);
  border: 1px solid rgba(148, 163, 184, 0.1);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #cbd5e1;
  transition: border-color 0.2s;
}
.saved-prompt-item:hover { border-color: var(--accent-primary); }

/* Utility */
.copy-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #10b981;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 100; /* Above Zen Mode */
}
.copy-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }