/* ClipVault Layout & Component Styles */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.brand-logo svg {
  width: 32px;
  height: 32px;
  color: var(--accent-color);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
}

.main-container {
  max-width: 1100px;
  margin: 20px auto 60px;
  padding: 0 20px;
}

/* Mode Switcher Tabs */
.mode-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-color);
  box-shadow: var(--neo-shadow-button);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.mode-tab:hover {
  color: var(--text-primary);
}

.mode-tab.active {
  color: var(--accent-color);
  box-shadow: var(--neo-shadow-button-active);
}

/* Editor Wrapper & Line Numbers */
.editor-container {
  position: relative;
  width: 100%;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.editor-toolbar-left, .editor-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.code-editor-flex {
  display: flex;
  background: var(--surface-color);
  box-shadow: var(--neo-shadow-inset);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.line-numbers {
  padding: 14px 10px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.1);
  text-align: right;
  user-select: none;
  border-right: 1px solid var(--border-color);
  min-width: 45px;
}

/* Markdown Split Preview */
.markdown-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.markdown-preview {
  background: var(--surface-color);
  box-shadow: var(--neo-shadow-inset);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 280px;
  overflow-y: auto;
}

/* File / Folder Dropzone */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--surface-color);
  box-shadow: var(--neo-shadow-inset);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent-color);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.file-tree-preview {
  margin-top: 16px;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.file-tree-item {
  padding: 4px 8px;
  color: var(--text-secondary);
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--surface-color);
  box-shadow: var(--neo-shadow-inset);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-color);
  width: 0%;
  transition: width 0.2s ease;
}

/* Settings Form Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 90%;
  max-width: 480px;
  transform: scale(0.95);
  transition: transform var(--transition-fast);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-color);
  box-shadow: var(--neo-shadow-convex);
  border-left: 4px solid var(--accent-color);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.toast.toast-error {
  border-left-color: var(--danger-color);
}

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

/* Footer */
.app-footer {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-header {
    padding: 16px 20px;
  }
  .mode-tabs {
    flex-wrap: wrap;
  }
  .markdown-split {
    grid-template-columns: 1fr;
  }
}
