/*!****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[3]!./src/app/global.css ***!
  \****************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Color Palette - OLED Pitch Black + Catppuccin Mocha */
  --bg-app: #000000;
  --bg-sidebar: #0b0b12;
  --bg-chat-area: #000000;
  --bg-card: #11111b;
  --bg-card-hover: #181825;
  
  --border-light: rgba(49, 50, 68, 0.4);
  --border-medium: #313244;
  --border-active: #cba6f7;

  --text-primary: #cdd6f4;
  --text-secondary: #bac2de;
  --text-muted: #6c7086;

  --accent-primary: #cba6f7;
  --accent-secondary: #b4befe;
  --accent-gradient: linear-gradient(135deg, #cba6f7, #89b4fa);
  --accent-gradient-hover: linear-gradient(135deg, #b4befe, #74c7ec);

  --bubble-user: linear-gradient(135deg, #cba6f7, #89b4fa);
  --bubble-ai: #181825;
  --bubble-ai-hover: #1e1e2e;

  /* Layout and Sizing */
  --sidebar-width: 320px;
  --header-height: 70px;
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 20px;

  /* Shadows and Glassmorphism */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.9);
  --glass-bg: rgba(11, 11, 18, 0.7);
  --glass-backdrop: blur(20px);
}

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

html,
body {
  max-width: 100vw;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

input,
textarea,
button,
select {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.anim-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Native Dialog Styles */
dialog {
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  max-width: 500px;
  width: 90%;
  padding: 24px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
  pointer-events: none;
}

dialog[open] {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  display: block;
}

dialog[open]::backdrop {
  background-color: rgba(5, 7, 13, 0.85);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

/* Common form styles inside dialogs */
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-family: var(--font-heading);
}

.dialog-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dialog-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--text-secondary);
}

.dialog-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* General button styles */
.btn {
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

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

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* Base style overrides */
a {
  color: var(--accent-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Lightbox Image Zoom Viewer */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 7, 13, 0.88); /* OLED-friendly dark transparent background */
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  cursor: zoom-out;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxScaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90dvh;
  object-fit: contain;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lightboxScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

