@charset "UTF-8";
* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  background-color: #0f172a;
  color: #d1dbe4;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

pre,
code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.c-alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  border: 1px solid transparent;
}
.c-alert--error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
.c-alert--success {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.c-button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}
.c-button:hover {
  color: #38bdf8;
}
.c-button--primary {
  background-color: #38bdf8;
  color: #0f172a;
}
.c-button--primary:hover {
  background-color: #0ea5e9;
  color: #0f172a;
  transform: translateY(-0.0625rem);
}
.c-button--secondary {
  background-color: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}
.c-button--secondary:hover {
  background-color: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}
.c-button--tertiary {
  background-color: rgba(255, 255, 255, 0.05);
  color: #d1dbe4;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.c-button--tertiary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}
.c-button--full {
  width: 100%;
}
.c-button--nowrap {
  white-space: nowrap;
}

.c-code-wrapper {
  position: relative;
  margin: 0.5rem 0;
}
.c-code-wrapper pre {
  margin: 0 !important;
}
.c-code-wrapper pre code {
  padding-right: 3rem;
}
.c-code-wrapper:hover .c-copy-button {
  opacity: 1;
}

.c-copy-button {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  padding: 0.2rem 0.3rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
  z-index: 10;
}
.c-copy-button:hover {
  color: #38bdf8;
  border-color: #38bdf8;
  background: #0f172a;
}
.c-copy-button--success {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.5);
}

.c-category {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}
@media (max-width: 576px) {
  .c-category {
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  }
}
.c-category__section {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.c-category__title {
  font-size: 1.25rem;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 1.25rem;
  margin-top: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.c-category__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 1rem;
}
.c-category__link {
  color: #d1dbe4;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s, padding-left 0.3s;
  display: flex;
  align-items: center;
}
.c-category__link::before {
  content: "→";
  margin-right: 0.5rem;
  color: #94a3b8;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.c-category__link:hover {
  color: #38bdf8;
  padding-left: 0.25rem;
}
.c-category__link:hover::before {
  opacity: 1;
}

.c-field {
  margin-bottom: 1.5rem;
}
.c-field__label {
  display: block;
  color: #d1dbe4;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}
.c-field__input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: white;
  font-size: 1rem;
}
.c-field__input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 0.125rem rgba(56, 189, 248, 0.2);
}

.c-flash {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}
.c-flash__item {
  pointer-events: auto;
  min-width: 20rem;
  max-width: 90vw;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  animation: flash-slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.c-flash__item--success {
  border-left: 4px solid #22c55e;
}
.c-flash__item--success .c-flash__icon {
  color: #22c55e;
}
.c-flash__item--error {
  border-left: 4px solid #ef4444;
}
.c-flash__item--error .c-flash__icon {
  color: #ef4444;
}
.c-flash__item--info {
  border-left: 4px solid #38bdf8;
}
.c-flash__item--info .c-flash__icon {
  color: #38bdf8;
}
.c-flash__icon {
  font-weight: bold;
  font-size: 1.25rem;
}
.c-flash__message {
  color: #d1dbe4;
  font-size: 0.875rem;
  flex-grow: 1;
}
.c-flash__close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}
.c-flash__close:hover {
  color: #d1dbe4;
}

@keyframes flash-slide-down {
  from {
    transform: translateY(-2rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes flash-exit-up {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-2rem);
    opacity: 0;
  }
}
.loader-element {
  align-items: center;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  font-style: italic;
  height: 100%;
  justify-content: center;
}
.loader-element__spinner {
  animation: spin 0.75s linear infinite;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: #38bdf8;
  border-radius: 50%;
  height: 30px;
  margin-bottom: 10px;
  width: 30px;
}

.preloader, .preloader-element::before {
  font-size: 0.8rem;
  font-weight: 500;
}
.preloader::before, .preloader-element::before {
  animation: spin 0.75s linear infinite;
  border: 0.25rem solid #38bdf8;
  border-left: 0.25rem solid transparent;
  border-radius: 50%;
  content: "";
  display: inline-flex;
  height: 1rem;
  margin: 0.25rem;
  width: 1rem;
}

.preloader-element {
  pointer-events: none;
  position: relative;
}
.preloader-element > * {
  filter: blur(3px);
}
.preloader-element::before {
  bottom: 0;
  filter: blur(0);
  font-size: 2rem;
  height: 2rem;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  text-align: center;
  top: 0;
  width: 2rem;
  z-index: 2;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.l-auth {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #0f172a;
}
.l-auth__card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(0.75rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 25rem;
}
.l-auth__title {
  color: #d1dbe4;
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
  text-align: center;
}
.l-auth__description {
  color: #94a3b8;
  text-align: center;
  margin-bottom: 2rem;
}

.l-container {
  margin: 0 auto;
  padding: 0 1.5rem;
}

.l-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}
.l-header__title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}
@media (max-width: 768px) {
  .l-header__title {
    font-size: 2rem;
  }
}
@media (max-width: 576px) {
  .l-header__title {
    font-size: 1.5rem;
  }
}
.l-header__flex {
  align-items: center;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}
@media (max-width: 768px) {
  .l-header__flex {
    flex-direction: column;
  }
}
.l-header__actions {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
}
@media (max-width: 400px) {
  .l-header__actions {
    flex-direction: column;
  }
}

.l-editor {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #0f172a;
}
.l-editor__header {
  align-items: center;
  background: rgba(30, 41, 59, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 1.5rem;
  min-height: 5rem;
  justify-content: space-between;
  overflow-x: auto;
  padding: 0.25rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}
.l-editor__header::-webkit-scrollbar {
  height: 6px;
}
.l-editor__header::-webkit-scrollbar-track {
  background: transparent;
}
.l-editor__header::-webkit-scrollbar-thumb {
  background-color: rgba(56, 189, 248, 0.3);
  border-radius: 10px;
}
.l-editor__header::-webkit-scrollbar-thumb:hover {
  background-color: rgba(56, 189, 248, 0.5);
}
.l-editor__select-wrapper {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.l-editor__select-label {
  font-size: 0.7em;
}
.l-editor__select {
  background: rgba(15, 23, 42, 0.5);
  color: #d1dbe4;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.3s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
}
.l-editor__select:focus {
  border-color: #38bdf8;
}
.l-editor__select option {
  background: rgba(30, 41, 59, 0.7);
  color: #d1dbe4;
}
.l-editor__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.l-editor__title-input {
  background: transparent;
  border: none;
  color: #d1dbe4;
  font-size: 1.25rem;
  font-weight: 600;
  outline: none;
  min-width: 18rem;
  width: 60%;
}
.l-editor__title-input::placeholder {
  color: #94a3b8;
}
.l-editor__wrapper {
  display: flex;
  flex-direction: row;
  flex-grow: 1;
  min-height: 0;
  overflow: hidden;
}
.l-editor__wrapper .l-post {
  font-size: 14px;
  height: 100%;
  margin: 0;
  overflow-y: auto;
  scroll-behavior: auto !important;
  width: 50%;
}
.l-editor__wrapper .l-post[data-hide=true] {
  display: none;
}
@media (max-width: 768px) {
  .l-editor__wrapper {
    flex-direction: column;
  }
  .l-editor__wrapper .l-editor__container,
.l-editor__wrapper .l-post {
    width: 100%;
  }
}
.l-editor__container {
  flex-grow: 1;
  width: 50%;
  position: relative;
  height: 100%;
  overflow: hidden;
}
.l-editor #monaco-root {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.l-error {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #0f172a;
  padding: 1.5rem;
}
.l-error__card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(0.75rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 3rem;
  text-align: center;
  max-width: 30rem;
  width: 100%;
}
.l-error__code {
  font-size: 5rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1;
  margin-bottom: 1rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  opacity: 0.8;
}
.l-error__title {
  font-size: 1.5rem;
  color: #d1dbe4;
  margin-bottom: 1rem;
}
.l-error__message {
  color: #94a3b8;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.l-post {
  display: flex;
  flex-direction: column;
  margin: 2em auto 5em;
  padding: 0 1.5em;
  scrollbar-width: auto;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}
.l-post::-webkit-scrollbar {
  height: 6px;
}
.l-post::-webkit-scrollbar-track {
  background: transparent;
}
.l-post::-webkit-scrollbar-thumb {
  background-color: rgba(56, 189, 248, 0.3);
  border-radius: 10px;
}
.l-post::-webkit-scrollbar-thumb:hover {
  background-color: rgba(56, 189, 248, 0.5);
}
.l-post__header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
}
.l-post__title {
  font-size: 2.5em;
  margin-bottom: 0.4em;
  color: #d1dbe4;
  line-height: 1.2;
}
.l-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  color: #94a3b8;
  font-size: 0.875em;
}
.l-post__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}
.l-post__content {
  color: #d1dbe4;
  flex: 1;
  line-height: 1.7;
}
.l-post__content h1 {
  font-size: 2em;
  margin: 0;
  margin-top: 0.375em;
}
.l-post__content h2 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.5em;
  margin: 0;
  margin-top: 0.5em;
}
.l-post__content p {
  margin: 1em 0;
}
.l-post__content ul,
.l-post__content ol {
  margin-bottom: 0.25em;
  margin-top: 0.25em;
  padding-left: 1.5em;
}
.l-post__content li {
  margin-bottom: 0;
}
.l-post__content blockquote {
  margin: 0.5em 0;
  padding: 0.25em 0.75em;
  background: rgba(56, 189, 248, 0.03);
  border-left: 4px solid #38bdf8;
  border-radius: 0 0.75rem 0.75rem 0;
  color: #b2d5e8;
  font-style: italic;
  position: relative;
}
.l-post__content blockquote p {
  line-height: 1.6;
  margin: 0;
}
.l-post__content blockquote ul, .l-post__content blockquote ol {
  margin: 0;
}
.l-post__content pre {
  background: #1e293b;
  padding: 0.5em;
  border-radius: 0.75rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.5em 0;
  line-height: 1.1em;
  tab-size: 4;
  display: block;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}
.l-post__content pre:hover .c-copy-button {
  opacity: 1;
}
.l-post__content pre::-webkit-scrollbar {
  height: 6px;
}
.l-post__content pre::-webkit-scrollbar-track {
  background: transparent;
}
.l-post__content pre::-webkit-scrollbar-thumb {
  background-color: rgba(56, 189, 248, 0.3);
  border-radius: 10px;
}
.l-post__content pre::-webkit-scrollbar-thumb:hover {
  background-color: rgba(56, 189, 248, 0.5);
}
.l-post__content pre code.hljs {
  padding: 0.1em;
}
.l-post__content code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: transparent;
  color: #38bdf8;
  padding: 0;
  border-radius: 0.25em;
  font-size: 0.9em;
  line-height: 1em;
}
.l-post__content a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  transition: all 0.3s;
  padding: 0.1em 0;
}
.l-post__content a:hover {
  color: #0ea5e9;
  border-bottom-color: #0ea5e9;
  background: rgba(56, 189, 248, 0.05);
  border-radius: 0.25em;
}
.l-post__content a[href^=http]::after {
  content: "↗";
  font-size: 0.8em;
  margin-left: 0.2em;
  display: inline-block;
  vertical-align: super;
  opacity: 0.7;
}
