/* Reset & base */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap');

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

:root {
  --bg-dark: #000;
  --txt-color: rgba(255, 255, 255, 0.92);
  --light-color: rgba(0, 0, 0, 0.92);
  --glass-bg: linear-gradient(135deg,
      rgba(255, 255, 255, 0.10),
      rgba(255, 255, 255, 0.02));

  --glass-blur: 22px;
  --glass-border: 1px solid rgba(255, 255, 255, 0.18);
  --glass-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  --glass-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  --glass-glow: 0 0 60px rgba(255, 255, 255, 0.08);
  --glass-radius: 18px;
  --accent-color: #ddd;
}


html {
  font-size: 16px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}


body {
  line-height: 1.45;
  font-size: inherit;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-dark);
  color: var(--txt-color);
  font-family: 'Outfit', sans-serif;
  position: relative;
}

html::-webkit-scrollbar {
  display: none !important;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

img,
video {
  display: block;
}

input,
textarea {
  outline: none;
  background: transparent;
}


ul,
ol,
li {
  list-style: none;
}

::selection {
  background-color: var(--accent-color);
  color: var(--bg-dark) !important;
}

/* App Wrapper */
.app-wrapper {
  padding: 12px;
  min-height: 100svh;
  width: 100% !important;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 2%;
  position: relative;
}

/* Panels */
.panel-section {
  border: var(--glass-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.panel-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}

.panel-screen-noBG {
  background: transparent !important;
}

.code-panel {
  width: 100% !important;
  max-width: 100%;
  min-width: 350px;
  min-height: 100px;
  border-radius: 16px !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  /* overflow-x: hidden;
  overflow-y: auto; */
  overflow: hidden;
  padding: 12px 15px !important;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  color: var(--txt-color);
  transition: all 0.3s ease;
  position: relative;
  scrollbar-width: none !important;
}

.code-panel::-webkit-scrollbar {
  display: none !important;
}

.code-panel-light {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

pre.the-code,
pre.the-code code {
  background: transparent !important;
  letter-spacing: normal;
  outline: none !important;
  text-shadow: none !important;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: pre;
  font-weight: 500;
  padding: 0 !important;
  border-radius: 0;
  width: 100%;
  font-size: 18px;
  box-sizing: border-box;
  scrollbar-width: none !important;
  background: transparent;
  color: var(--txt-color);
  caret-color: transparent;
}


pre.the-code::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

pre.the-code .token,
pre.the-code code,
pre.the-code {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: transparent !important;
}

textarea.editor-textarea {
  scrollbar-width: none !important;
  color: transparent !important;
  caret-color: #fff !important;
  font-size: 18px !important;
  -webkit-text-fill-color: transparent !important;
  overflow-x: hidden !important;
  outline: none;
}

.editor-textarea::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* just some use of force */
.code-panel.code-panel-light pre.the-code,
.code-panel.code-panel-light pre.the-code code,
.code-panel-light pre.the-code,
.code-panel-light pre.the-code code {
  color: #000 !important;
}

.code-panel.code-panel-light pre.the-code code[contenteditable="true"] {
  caret-color: #fff !important;
}

.code-panel.code-panel-light .editor-textarea {
  caret-color: #fff;
}

/* Code Panel Header */
.code-panel-header {
  width: 100%;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lights {
  display: flex;
  gap: 5px;
  position: absolute;
  left: 0px;
}

.lights span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.green {
  background-color: green;
}

.red {
  background-color: red;
}

.yellow {
  background-color: yellow;
}

.template-name {
  border: none !important;
  background: none !important;
  outline: none;
  font-size: 14px;
  color: var(--accent-color);
  position: relative;
  left: 50px;
  font-weight: 400;
  letter-spacing: .5px;
  font-family: "Outfit", sans-serif !important;
}

.template-name:focus {
  border: none !important;
  outline: none !important;
}

.template-name-active {
  color: #000000;
}

/* Settings Section */
.doc-section {
  width: 100%;
  max-width: 80%;
  margin: 0 auto;
  border-radius: 16px;
  border: var(--glass-border);
  background: var(--glass-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px 20px;
  z-index: 99;
}


.doc-section-content {
  width: 100%;
  max-width: 99%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0px;
  flex-wrap: wrap;
  position: relative;
  bottom: 4px;
}

.doc-sec-selectors,
.doc-sec-ranges,
.doc-sec-toggles {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.theme-wrapper,
.languages-wrapper,
.fonts-wrapper,
.fontSize-wrapper,
.padding-range-wrapper,
.background-toggle-wrapper,
.radius-range-wrapper,
.mode-toggle-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.the-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-color);
  text-transform: capitalize;
}

.padding-Bradius {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
}

/*selectors */
.select-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.custom-select {
  width: 160px;
  position: relative;
  border-radius: 8px;
  border: var(--glass-border);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  color: var(--txt-color);
  outline: none;
}

.custom-select:focus-within {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border: var(--glass-border);
}


.select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  font-size: 15px;
  color: var(--txt-color);
  background: transparent;
  border: none;
  cursor: default !important;
  text-align: left;
  text-transform: capitalize;
}

.trigger-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
  display: inline-block;
}

.trigger-arrow {
  margin-left: 8px;
  opacity: 0.9;
}

.select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 105%;
  max-height: 440px;
  overflow-y: auto;
  border-radius: 10px;
  background: rgba(10, 10, 10, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 5px;
  display: none;
  z-index: 999;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  scrollbar-width: none;
}

.select-options::-webkit-scrollbar {
  display: none !important;
}

.select-options-blur {
  height: 30px;
  width: 100%;
  backdrop-filter: var(--glass-blur);
  position: absolute;
  bottom: 0;
  left: 0;
}

/* options */
.select-options li {
  padding: 8px 10px;
  margin: 4px 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--txt-color);
  text-transform: capitalize !important;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: "Outfit", sans-serif;
}

.select-options li .option-label {
  display: flex;
  align-items: center;
  gap: 0 !important;
}

.option-tick {
  opacity: 0;
  pointer-events: none;
}

.select-options li[aria-selected="true"] .option-tick {
  opacity: 1;
}

.select-options li[aria-selected='true'] {
  background: rgba(255, 255, 255, 0.06);
}

.select-options li:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* images to show */
.custom-select .select-trigger img,
.custom-select .select-trigger .theme-icon {
  display: inline-block !important;
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.select-options .theme-icon {
  height: 17px;
  width: 18px;
  /* object-fit: cover; */
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
}

.select-options li {
  display: flex;
  align-items: center;
  gap: 8px;
}


.select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.select-trigger .trigger-thumb {
  width: 28px;
  height: 18px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 8px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.03);
}


.trigger-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  max-width: 110px;
}

/* select positioning */
.select-options {
  position: absolute;
  top: -160px;
  left: 0;
  transition: transform 160ms ease;
  transform-origin: top center;
}

.select-options.up {
  top: auto;
  bottom: calc(100% + 6px);
  transform-origin: bottom center;
}

.select-options.show {
  transform: scaleY(1.1);
  display: block;
}


.select-options {
  transform: scaleY(0.98);
}

/* Input & Slider */
#the-font-size {
  width: 70px;
  height: 36px;
  border-radius: 6px;
  border: var(--glass-border);
  color: var(--txt-color);
  padding-inline: 5px;
}

.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 180px;
  height: 6px;
  border-radius: 5px;
  background: linear-gradient(to right, white 50%, #333 50%);
  outline: none;
}

.p-label {
  position: relative;
  bottom: 5px;
}


.custom-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 5px;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #000000;
  border: 3px solid var(--accent-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  position: relative;
  bottom: 6px;
}

.custom-range::-moz-range-track {
  height: 8px;
  border-radius: 5px;
}

.custom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 3px solid #333;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  position: relative;
  bottom: 6px;
}

.custom-range:hover::-webkit-slider-thumb,
.custom-range:active::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: var(--glass-border);
}

.custom-range:hover::-moz-range-thumb,
.custom-range:active::-moz-range-thumb {
  transform: scale(1.15);
}

.custom-range:focus::-webkit-slider-thumb,
.custom-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

/* Export */
.export-wrapper {
  position: relative;
  width: 95px;
  height: 35px;
}


.export-btn {
  position: relative;
  height: 36px;
  width: 97.7px;
  border-radius: 8px;
  border: none;
  font-weight: 00;
  cursor: pointer;
  background-color: var(--accent-color);
  transition: all 0.2s ease;

  display: flex;
  justify-content: space-around;
  align-items: center;
}

.export-btn span {
  font-size: 14px;
  color: #000;
  font-weight: 400;
  position: relative;
  right: 2px;
}

.export-btn:hover {
  background-color: #4f46e5;
  transition: all 0.2s ease;
}

.export-btn:hover span {
  color: #fff;
}

.export-btn:hover svg {
  fill: #fff;
}

.export-btn:active {
  transform: scale(0.96);
}

.export-btn:before,
.export-btn:after {
  position: absolute;
  content: "";
  width: 150%;
  left: 50%;
  height: 100%;
  transform: translateX(-50%);
  z-index: -1000;
  background-repeat: no-repeat;
}

.export-btn:hover:before {
  top: -70%;
  background-image: radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, transparent 20%, #7d2ae8 20%, transparent 30%),
    radial-gradient(circle, #535EFC 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, transparent 10%, #7d2ae8 15%, transparent 20%),
    radial-gradient(circle, #0EC8EE 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #0EC8EE 20%, transparent 20%),
    radial-gradient(circle, #0EC8EE 20%, transparent 20%);
  background-size: 10% 10%, 20% 20%, 15% 15%, 20% 20%, 18% 18%, 10% 10%, 15% 15%,
    10% 10%, 18% 18%;
  background-position: 50% 120%;
  animation: greentopBubbles 0.6s ease;
}

@keyframes greentopBubbles {
  0% {
    background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%,
      40% 90%, 55% 90%, 70% 90%;
  }

  50% {
    background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%,
      50% 50%, 65% 20%, 90% 30%;
  }

  100% {
    background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%,
      50% 40%, 65% 10%, 90% 20%;
    background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
}

.export-btn:hover::after {
  bottom: -70%;
  background-image: radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #535EFC 20%, transparent 20%),
    radial-gradient(circle, transparent 10%, #7d2ae8 15%, transparent 20%),
    radial-gradient(circle, #535EFC 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #535EFC 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%);
  background-size: 15% 15%, 20% 20%, 18% 18%, 20% 20%, 15% 15%, 20% 20%, 18% 18%;
  background-position: 50% 0%;
  animation: greenbottomBubbles 0.6s ease;
}

@keyframes greenbottomBubbles {
  0% {
    background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%,
      70% -10%, 70% 0%;
  }

  50% {
    background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%,
      105% 0%;
  }

  100% {
    background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%,
      110% 10%;
    background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
}

.export-btn svg {
  height: 18px;
  position: relative;
  left: 4px;
}


/* Export Options */
.export-options {
  position: absolute;
  bottom: calc(100% + 8px);
  width: 130px;
  height: 155px;
  border-radius: 12px;
  background-color: #fff;
  color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.export-options-active {
  opacity: 1;
  visibility: visible;
}

.export-options li {
  border-radius: 6px;
}

.export-options li:hover button {
  background-color: #000000;
  color: var(--txt-color);
}

.export-options li:hover button svg {
  fill: #ffffff !important;
}

.export-options li button {
  width: 120px;
  padding: 7px;
  gap: 2px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 14px;
  border-radius: 6px;
}

.export-options li button svg {
  height: 18px;
}


/* Dividers */
.divider,
.divider2 {
  background-color: var(--accent-color);
  opacity: 0.65;
}

.divider {
  height: 1px;
  width: 100%;
}

.divider2 {
  height: 50px;
  width: 2px;
}

/* Switches */
.switch-background {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
}

.switch-background input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-background {
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: #fff;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.slider-background:before {
  content: '';
  position: absolute;
  top: 4px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #000000;
  box-shadow: 0 0px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.switch-background input:checked+.slider-background:before {
  transform: translateX(100%);
  background-color: #fff;
}

.switch-background input:checked+.slider-background {
  background: blue;
}


/* alert for export */
.toast {
  position: absolute;
  left: 50%;
  top: 25px;
  transform: translateX(-50%) translateY(16px) scale(0.98);

  background-color: #ffffff;

  color: #111111;

  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 12px;
  border-radius: 12px;

  display: flex;
  gap: 12px;
  align-items: center;

  min-width: 190px;
  max-width: 90%;

  opacity: 0;
  pointer-events: none;

  transition:
    transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1),
    opacity 200ms ease;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.08);

  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.toast .icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;

  display: grid;
  place-items: center;

  border-radius: 8px;

  background: linear-gradient(180deg,
      #f5f7fa,
      #e9ecf1);

  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--accent, #4f46e5);
}

.toast .msg {
  font-size: 14px;
  font-weight: 600;
  color: #444444;
}

/*  Area I hate most.... */
@media screen and (max-width : 1245px) {
  .doc-section {
    max-width: 90%;
  }

  .doc-section-content {
    gap: 30px;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .export-btn {
    position: relative;
    top: 5px;
  }

  .app-wrapper {
    overflow-x: hidden;
  }

  .code-panel {
    min-width: 150px;
  }
}

@media screen and (max-width : 468px) {
  .doc-section {
    max-width: 96%;
  }

  .select-options {
    top: -20px;
  }
}
