/* [project]/app/globals.css [app-client] (css) */
*, :before, :after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0f1923;
  --bg-secondary: #1a2634;
  --bg-tertiary: #243447;
  --bg-card: #1e2d3d;
  --bg-input: #162230;
  --text-primary: #e8e6e3;
  --text-secondary: #a0aab4;
  --text-muted: #6b7b8d;
  --accent: #d4a553;
  --accent-hover: #e6b964;
  --accent-dim: #b8923f;
  --accent-glow: #d4a5534d;
  --danger: #e74c3c;
  --success: #2ecc71;
  --border: #2a3a4a;
  --border-light: #3a4a5a;
  --shadow: #0006;
  --radius: 8px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", "Fira Code", monospace;
  --max-width: 1200px;
  --content-width: 720px;
  --transition: .2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.7;
}

body.light-mode {
  --bg-primary: #faf8f5;
  --bg-secondary: #f0ece6;
  --bg-tertiary: #e6e0d8;
  --bg-card: #fff;
  --bg-input: #f5f2ed;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
  --accent: #b8923f;
  --accent-hover: #a07d30;
  --accent-dim: #d4a553;
  --accent-glow: #b8923f33;
  --border: #d6cfc5;
  --border-light: #e0d8ce;
  --shadow: #0000001a;
}

a {
  color: var(--accent);
  transition: color var(--transition);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
  outline: none;
  padding: 10px 14px;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.navbar {
  z-index: 100;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  background: #0f1923eb;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 24px;
  display: flex;
  position: sticky;
  top: 0;
}

body.light-mode .navbar {
  background: #faf8f5eb;
}

.navbar-brand {
  color: var(--accent);
  letter-spacing: -.02em;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
}

.navbar-brand svg {
  width: 28px;
  height: 28px;
}

.navbar-links {
  align-items: center;
  gap: 8px;
  display: flex;
}

.navbar-links a, .navbar-links button {
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: all var(--transition);
  padding: 8px 16px;
  font-size: .9rem;
  font-weight: 500;
}

.navbar-links a:hover, .navbar-links button:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn {
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: .9rem;
  font-weight: 600;
  display: inline-flex;
}

.btn-primary {
  background: var(--accent);
  color: #0f1923;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  color: var(--danger);
  border: 1px solid var(--danger);
  background: none;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  color: var(--text-secondary);
  background: none;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: .8rem;
}

.btn-icon {
  border-radius: var(--radius);
  color: var(--text-secondary);
  justify-content: center;
  align-items: center;
  padding: 8px;
  display: inline-flex;
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
}

.hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

.hero h1 {
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover), #f0d080);
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 16px;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
}

.hero p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  font-size: 1.2rem;
  line-height: 1.6;
}

.hero-actions {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  display: flex;
}

.filters {
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  display: flex;
}

.filters input[type="text"] {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.filters select {
  min-width: 150px;
}

.stories-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
  display: grid;
}

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  flex-direction: column;
  transition: all .3s;
  display: flex;
  overflow: hidden;
}

.story-card:hover {
  box-shadow: 0 12px 40px var(--shadow);
  border-color: var(--accent-dim);
  transform: translateY(-4px);
}

.story-card-cover {
  object-fit: cover;
  background: var(--bg-tertiary);
  width: 100%;
  height: 200px;
}

.story-card-cover-placeholder {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  opacity: .3;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 200px;
  font-size: 3rem;
  display: flex;
}

.story-card-body {
  flex-direction: column;
  flex: 1;
  padding: 20px;
  display: flex;
}

.story-card-genre {
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 8px;
  font-size: .75rem;
  font-weight: 600;
}

.story-card-title {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.story-card-meta {
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  font-size: .85rem;
  display: flex;
}

.story-card-tags {
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  display: flex;
}

.tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: .72rem;
}

.tag.tag-accent {
  background: var(--accent-glow);
  color: var(--accent);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 80px 24px;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.editor-layout {
  min-height: calc(100vh - 64px);
  display: flex;
}

.editor-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  width: 280px;
  padding: 24px;
  overflow-y: auto;
}

.editor-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.editor-sidebar h3 {
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: .8rem;
}

.editor-sidebar h3:first-child {
  margin-top: 0;
}

.editor-sidebar label {
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: .85rem;
  display: block;
}

.editor-sidebar input, .editor-sidebar select, .editor-sidebar textarea {
  width: 100%;
  margin-bottom: 16px;
}

.editor-sidebar textarea {
  resize: vertical;
  min-height: 60px;
}

.tags-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
  margin-bottom: 16px;
  padding: 8px;
  display: flex;
}

.tags-input .tag {
  cursor: pointer;
  align-items: center;
  gap: 4px;
  display: flex;
}

.tags-input .tag:hover {
  background: var(--danger);
  color: #fff;
}

.tags-input input {
  background: none;
  border: none;
  flex: 1;
  min-width: 60px;
  margin-bottom: 0;
  padding: 2px;
}

.cover-preview {
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  width: 100%;
  margin-bottom: 12px;
  overflow: hidden;
}

.cover-preview img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.editor-title-input {
  width: 100%;
  color: var(--text-primary);
  letter-spacing: -.02em;
  background: none;
  border: none;
  outline: none;
  margin-bottom: 32px;
  padding: 0;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.editor-title-input::placeholder {
  color: var(--text-muted);
}

.block-editor {
  max-width: var(--content-width);
  margin: 0 auto;
}

.block-wrapper {
  border-radius: var(--radius);
  transition: all var(--transition);
  margin-bottom: 4px;
  position: relative;
}

.block-wrapper:hover {
  background: var(--bg-secondary);
}

.block-wrapper.active {
  background: var(--bg-secondary);
  outline: 1px solid var(--border-light);
}

.block-controls {
  opacity: 0;
  transition: opacity var(--transition);
  flex-direction: column;
  gap: 2px;
  display: flex;
  position: absolute;
  top: 50%;
  left: -48px;
  transform: translateY(-50%);
}

.block-wrapper:hover .block-controls {
  opacity: 1;
}

.block-controls button {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  transition: all var(--transition);
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  font-size: .85rem;
  display: flex;
}

.block-controls button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.block-type-bar {
  opacity: 0;
  transition: opacity var(--transition);
  position: absolute;
  top: 8px;
  right: -48px;
}

.block-wrapper:hover .block-type-bar {
  opacity: 1;
}

.block-type-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  font-size: .65rem;
}

.text-block-editor {
  min-height: 60px;
  padding: 12px 16px;
}

.text-block-editor .content-editable {
  min-height: 40px;
  font-size: 1.05rem;
  line-height: 1.8;
  font-family: var(--font-serif);
  color: var(--text-primary);
  outline: none;
}

.text-block-editor .content-editable:empty:before {
  content: "Start writing...";
  color: var(--text-muted);
}

.text-block-editor .content-editable h1 {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-sans);
  margin: .5em 0;
}

.text-block-editor .content-editable h2 {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-sans);
  margin: .5em 0;
}

.text-block-editor .content-editable h3 {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-sans);
  margin: .5em 0;
}

.text-block-editor .content-editable blockquote {
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  margin: 1em 0;
  padding-left: 16px;
  font-style: italic;
}

.format-toolbar {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 8px;
  padding: 6px;
  display: flex;
}

.format-toolbar button {
  color: var(--text-secondary);
  transition: all var(--transition);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: .85rem;
  font-weight: 600;
}

.format-toolbar button:hover, .format-toolbar button.active {
  background: var(--accent);
  color: #0f1923;
}

.format-toolbar .separator {
  background: var(--border);
  width: 1px;
  margin: 4px;
}

.media-block {
  border-radius: var(--radius);
  background: var(--bg-tertiary);
  margin: 8px 0;
  padding: 16px;
}

.media-block-header {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: .85rem;
  display: flex;
}

.media-block input, .media-block select, .media-block textarea {
  width: 100%;
  margin-bottom: 8px;
}

.media-block .media-preview {
  border-radius: var(--radius);
  margin-top: 8px;
  overflow: hidden;
}

.media-block .media-preview img {
  object-fit: cover;
  width: 100%;
  max-height: 400px;
}

.media-block .media-preview video {
  width: 100%;
  max-height: 400px;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
  padding: 32px;
}

.upload-zone:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.choice-block-editor .choice-option {
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  display: flex;
}

.choice-block-editor .choice-option input {
  flex: 1;
}

.add-block-area {
  justify-content: center;
  margin: 8px 0;
  padding: 16px;
  display: flex;
}

.add-block-btn {
  background: var(--bg-tertiary);
  border: 2px dashed var(--border);
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  transition: all var(--transition);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  display: flex;
}

.add-block-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.block-picker {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px var(--shadow);
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  padding: 16px;
  display: grid;
}

.block-picker-item {
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  padding: 12px;
  font-size: .85rem;
}

.block-picker-item:hover {
  background: var(--bg-tertiary);
  color: var(--accent);
}

.block-picker-item .icon {
  margin-bottom: 4px;
  font-size: 1.5rem;
  display: block;
}

.editor-toolbar {
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 0;
  display: flex;
}

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

.autosave-indicator {
  color: var(--text-muted);
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  display: flex;
}

.autosave-indicator.saving {
  color: var(--accent);
}

.autosave-indicator .dot {
  background: var(--success);
  border-radius: 50%;
  width: 6px;
  height: 6px;
}

.autosave-indicator.saving .dot {
  background: var(--accent);
  animation: 1s infinite pulse;
}

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

  50% {
    opacity: .3;
  }
}

.reader-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 60px 24px 120px;
}

.reader-header {
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  padding-bottom: 32px;
}

.reader-header h1 {
  letter-spacing: -.03em;
  margin-bottom: 16px;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
}

.reader-meta {
  color: var(--text-muted);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: .9rem;
  display: flex;
}

.reader-meta .separator {
  background: var(--text-muted);
  border-radius: 50%;
  width: 4px;
  height: 4px;
}

.reader-cover {
  object-fit: cover;
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 500px;
  margin-bottom: 48px;
}

.reading-progress {
  background: var(--bg-secondary);
  z-index: 99;
  width: 100%;
  height: 3px;
  position: fixed;
  top: 64px;
  left: 0;
}

.reading-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  height: 100%;
  transition: width .1s linear;
}

.reader-block {
  margin-bottom: 32px;
}

.reader-block.text-block {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-size: 1.15rem;
  line-height: 1.9;
}

.reader-block.text-block h1 {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-sans);
  margin: 1.5em 0 .5em;
  line-height: 1.2;
}

.reader-block.text-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-sans);
  margin: 1.5em 0 .5em;
  line-height: 1.3;
}

.reader-block.text-block h3 {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-sans);
  margin: 1.2em 0 .5em;
}

.reader-block.text-block p {
  margin-bottom: 1.2em;
}

.reader-block.text-block blockquote {
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  margin: 1.5em 0;
  padding-left: 24px;
  font-style: italic;
}

.reader-block.text-block strong {
  font-weight: 700;
}

.reader-block.text-block em {
  font-style: italic;
}

.reader-image-block {
  margin: 32px 0;
}

.reader-image-block.full-width {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.reader-image-block img {
  border-radius: var(--radius);
  width: 100%;
}

.reader-image-block.full-width img {
  border-radius: 0;
}

.reader-image-caption {
  text-align: center;
  color: var(--text-muted);
  margin-top: 8px;
  font-size: .85rem;
  font-style: italic;
}

.reader-video-block {
  margin: 32px 0;
}

.reader-video-block iframe, .reader-video-block video {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: none;
  width: 100%;
}

.reader-audio-block {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  padding: 20px;
  display: flex;
}

.reader-audio-block audio {
  flex: 1;
  width: 100%;
}

.reader-audio-block .audio-label {
  color: var(--text-secondary);
  white-space: nowrap;
  font-size: .85rem;
}

.reader-divider {
  text-align: center;
  color: var(--text-muted);
  letter-spacing: .5em;
  padding: 32px 0;
  font-size: 1.5rem;
}

.reader-divider.style-line {
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  border: none;
  height: 1px;
  margin: 48px 0;
  padding: 0;
}

.reader-divider.style-dots:after {
  content: "• • •";
}

.reader-divider.style-stars:after {
  content: "✦  ✦  ✦";
}

.reader-divider.style-wave:after {
  content: "〰〰〰";
}

.reader-divider.style-ornament:after {
  content: "❧";
  font-size: 2rem;
}

.reader-divider.style-fade {
  background: linear-gradient(180deg, transparent, var(--border), transparent);
  height: 48px;
  padding: 0;
}

.reader-choice-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 40px 0;
  padding: 32px;
}

.reader-choice-block .choice-prompt {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 600;
}

.reader-choice-block .choice-options {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  display: flex;
}

.reader-choice-block .choice-option-btn {
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  min-width: 160px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  transition: all .3s;
}

.reader-choice-block .choice-option-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
  transform: translateY(-2px);
}

.reader-choice-block .choice-option-btn.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #0f1923;
}

.reader-reveal-block {
  margin: 24px 0;
}

.reader-reveal-btn {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  width: 100%;
  padding: 14px 24px;
  font-size: .95rem;
  transition: all .3s;
}

.reader-reveal-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reader-reveal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-family: var(--font-serif);
  margin-top: 8px;
  padding: 20px;
  line-height: 1.8;
  animation: .4s reveal-slide;
}

@keyframes reveal-slide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reader-poll-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 32px 0;
  padding: 24px;
}

.reader-poll-block .poll-question {
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.poll-option {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 8px;
  padding: 12px 16px;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}

.poll-option:hover, .poll-option.voted {
  border-color: var(--accent);
}

.poll-option-fill {
  background: var(--accent-glow);
  z-index: 0;
  height: 100%;
  transition: width .5s;
  position: absolute;
  top: 0;
  left: 0;
}

.poll-option-text {
  z-index: 1;
  justify-content: space-between;
  display: flex;
  position: relative;
}

.reader-cinematic-block {
  justify-content: center;
  align-items: center;
  max-width: 100vw;
  min-height: 60vh;
  margin: 48px calc(50% - 50vw);
  display: flex;
  position: relative;
  overflow: hidden;
}

.reader-cinematic-bg {
  z-index: 0;
  background-position: center;
  background-size: cover;
  position: absolute;
  inset: 0;
}

.reader-cinematic-overlay {
  z-index: 1;
  position: absolute;
  inset: 0;
}

.reader-cinematic-content {
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 8px #00000080;
  max-width: 600px;
  font-family: var(--font-serif);
  padding: 48px 24px;
  font-size: 1.3rem;
  line-height: 1.8;
  position: relative;
}

.reader-cinematic-content.align-center {
  text-align: center;
}

.reader-cinematic-content.align-left {
  text-align: left;
}

.reader-cinematic-content.align-right {
  text-align: right;
}

.anim-fade-in {
  animation: 1.5s both fadeInAnim;
}

.anim-typewriter {
  border-right: 2px solid var(--accent);
  white-space: nowrap;
  max-width: fit-content;
  animation: 3s steps(40, end) forwards typewriter, .75s step-end infinite blink;
  overflow: hidden;
}

.anim-shake {
  animation: .5s ease-in-out infinite shake;
}

.anim-glow {
  animation: 2s ease-in-out infinite glow;
}

.anim-slide-up {
  animation: .8s both slideUp;
}

.anim-blur-in {
  animation: 1s both blurIn;
}

@keyframes fadeInAnim {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typewriter {
  from {
    max-width: 0;
  }

  to {
    max-width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: #0000;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow);
  }

  50% {
    text-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent), 0 0 60px var(--accent-glow);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blurIn {
  from {
    opacity: 0;
    filter: blur(10px);
  }

  to {
    opacity: 1;
    filter: blur();
  }
}

.my-stories-list {
  flex-direction: column;
  gap: 12px;
  display: flex;
}

.my-story-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  display: flex;
}

.my-story-item:hover {
  border-color: var(--accent-dim);
}

.my-story-thumb {
  object-fit: cover;
  background: var(--bg-tertiary);
  border-radius: 6px;
  flex-shrink: 0;
  width: 80px;
  height: 60px;
}

.my-story-info {
  flex: 1;
}

.my-story-title {
  margin-bottom: 4px;
  font-weight: 600;
}

.my-story-meta {
  color: var(--text-muted);
  font-size: .8rem;
}

.my-story-actions {
  gap: 8px;
  display: flex;
}

.status-badge {
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 600;
}

.status-badge.published {
  color: var(--success);
  background: #2ecc7126;
}

.status-badge.draft {
  color: var(--accent);
  background: #d4a55326;
}

.theme-toggle {
  cursor: pointer;
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  transition: all var(--transition);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  display: flex;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--accent);
}

.modal-overlay {
  z-index: 1000;
  background: #0009;
  justify-content: center;
  align-items: center;
  animation: .2s fadeIn;
  display: flex;
  position: fixed;
  inset: 0;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  padding: 32px;
  animation: .3s slideUp;
  overflow-y: auto;
}

.modal h2 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.preview-banner {
  background: var(--accent);
  color: #0f1923;
  box-shadow: 0 4px 20px var(--accent-glow);
  z-index: 200;
  border-radius: 999px;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  font-size: .9rem;
  font-weight: 600;
  display: flex;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.toast-container {
  z-index: 1000;
  flex-direction: column;
  gap: 8px;
  display: flex;
  position: fixed;
  bottom: 24px;
  right: 24px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  box-shadow: 0 4px 20px var(--shadow);
  padding: 12px 20px;
  font-size: .9rem;
  animation-name: slideUp, fadeOut;
  animation-duration: .3s, .3s;
  animation-timing-function: ease, ease;
  animation-iteration-count: 1, 1;
  animation-direction: normal, normal;
  animation-play-state: running, running;
  animation-delay: 0s, 2.7s;
  animation-fill-mode: forwards;
  animation-timeline: auto, auto;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .stories-grid {
    grid-template-columns: 1fr;
  }

  .editor-layout {
    flex-direction: column;
  }

  .editor-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    width: 100%;
    max-height: 50vh;
    overflow-y: auto;
  }

  .editor-main {
    padding: 16px;
  }

  .editor-title-input {
    font-size: 1.8rem;
  }

  .block-controls {
    opacity: 1;
    flex-direction: row;
    margin-bottom: 4px;
    padding: 4px;
    position: static;
    transform: none;
  }

  .block-type-bar {
    display: none;
  }

  .reader-header h1 {
    font-size: 2rem;
  }

  .reader-cinematic-block {
    min-height: 50vh;
  }

  .navbar-links a span.hide-mobile, .navbar-links button span.hide-mobile {
    display: none;
  }

  .filters {
    flex-direction: column;
  }

  .filters input[type="text"], .filters select {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0 12px;
  }

  .navbar-links {
    gap: 4px;
  }

  .navbar-links a, .navbar-links button {
    padding: 8px 10px;
    font-size: .8rem;
  }
}

.side-by-side {
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  margin: 32px 0;
  display: grid;
}

.side-by-side img {
  border-radius: var(--radius);
  width: 100%;
}

@media (max-width: 768px) {
  .side-by-side {
    grid-template-columns: 1fr;
  }
}

.section-dark {
  color: #e8e6e3;
  background: #0a1218;
  border-radius: 0;
  margin: 24px -24px;
  padding: 32px;
}

.section-light {
  color: #1a1a1a;
  background: #faf8f5;
  border-radius: 0;
  margin: 24px -24px;
  padding: 32px;
}

.loading-spinner {
  justify-content: center;
  align-items: center;
  padding: 60px;
  display: flex;
}

.spinner {
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: .8s linear infinite spin;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dropdown {
  display: inline-block;
  position: relative;
}

.dropdown-menu {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: 0 8px 32px var(--shadow);
  z-index: 50;
  padding: 8px;
  animation: .15s fadeIn;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.dropdown-item {
  text-align: left;
  width: 100%;
  color: var(--text-secondary);
  transition: all var(--transition);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: .85rem;
  display: block;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.effect-selector {
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  display: flex;
}

.effect-btn {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: .75rem;
}

.effect-btn:hover, .effect-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.page-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  display: flex;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

/*# sourceMappingURL=app_globals_71f961d1.css.map*/