body {
  background-color: #212121;
  font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Modern browsers */
::selection {
  background-color: #FECCCB;
  color: #000000;
}

/* Older Firefox versions */
::-moz-selection {
  background-color: #FECCCB;
  color: #000000;
}

.block {
  border: 0.5px solid #212121;
  border-radius: 15px;
  background-color: #fff;
  overflow-x: hidden;
}

.item-d {
  grid-area: clipboard;
  background-color: #666;
}

.item-e {
  grid-area: menu;
  background-color: #333333;
}


.container {
  height: calc(100vh - 20px);
  width: calc(100vw - 20px);
  padding: 10px;
  display: grid;
  grid-template-columns: 30px minmax(215px, 25%) 75%;
  grid-template-rows: 160px 200px 1fr;
  grid-template-areas:
    "handle header main"
    "handle clipboard main"
    "handle menu main";
}

/*--- handle ---*/

.item-a {
  grid-area: handle;
  background-color: #212121;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-right: 8px;
}

.corner-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  margin-top: 8px;
  background-image: url(img/corner_mini_smile.svg);
}

.text-crawl {
  display: inline-flex;
  overflow: clip;
  flex-grow: 1;
  margin-top: 8px;
}

.text-crawl-track {
  display: inline-flex;
  white-space: nowrap;
  color: #fff;
  font-size: 11px;
  writing-mode: vertical-rl;
  text-orientation: sideways-right;
}

/*--- header ---*/

.item-b {
  grid-area: header;
  background-color: #fff;
  padding: 24px;
}

.header-logo {
  display: inline-flex;
    width: 100%;
  padding-bottom: 40px;
  background-image: url(img/EMOTON.svg);
  background-repeat: no-repeat;
  background-size: contain;
}

/*--- main ---*/
.item-c {
  grid-area: main;
  background-color: #fff;
}

.mega-typing {
  display: inline-flex;
  overflow: clip;
  width: 100%;
  padding: 4px 12px;
}

.mega-typing-text {
  width: 100%;
  display: inline-flex;
  white-space: nowrap;
  overflow: clip;
  color: #212121;
  font-size: 110px;
  /* font-family: 'Tiny5', sans-serif; */
  font-weight: bold;
  border-right: .05em solid #FECCCB;
  animation: 
    typing 4s steps(20, end) infinite,
    blink-caret .75s step-end infinite;
}

@keyframes typing {
  0% { width: 0 }
  20% { width: 0 }
  60% { width: 100% }
  100% { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #FECCCB; }
}

.main-content-container {
  display: flex;
  position: relative;
  width: 100%;
  flex-direction: row;
}

.main-content-left {
  display: flex;
  flex-grow: 1;
  padding: 1em;
  align-items: center;
  flex-direction: column;
  padding: 0 25px;
}

.emoticon-type-nav {
  display: flex;
  width: 100%;
  max-width: 1000px;
  margin-top: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.emoticon-type {
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: inline-block;
  border: 1px solid #333333;
  padding: 10px 16px;
  border-radius: 20px;
  margin: 0 8px 16px 0;
  font-size: 14px;
}

.emoticon-type:hover {
  color: #9f5554;
  border-color: #FECCCB;
  background-color: #fecccba1;
}

#emoticon-lists-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.emoticon-list-wrapper {
  display: flex;
  width: 100%;
  max-width: 1000px;
  margin-bottom: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.type-title {
  font-size: 18px;
  font-weight: bold;
  display: block;
  width: 100%;
  flex-grow: 1;
  text-align: center;
  margin-bottom: 15px;
  padding-top: 30px;
}

.copy {
  display: inline-block;
  padding: 10px 15px;
  margin: 6px 4px;
  border-radius: 8px;
  border: 1px solid #eaeaea;
  font-size: 13px;
  font-weight: 400;
  white-space-collapse: preserve;
  vertical-align: middle;
  /* background-color: #fafafa; */
  background-color: #fcfcfc;
  box-shadow: 0 2px 15px #eaeaea;
  cursor: pointer;
  transition-duration: 0.1s;
}

.copy:nth-child(odd) {
  background-color: #fff;
}

.copy:hover {
  background-color: #fecccb54;
  border-color: #FECCCB;
  box-shadow: 0 2px 15px #FECCCB;
}

.copied-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.85); /* Semi-transparent black */
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    z-index: 9999; /* Ensure it stays on top of everything */
    pointer-events: none; /* Prevents the popup from blocking user clicks underneath it */
    
    /* Apply the fade-out animation */
    animation: fadeOutToast 1.5s forwards ease-in-out;
}

/* Define the auto-fade-out animation timeline */
@keyframes fadeOutToast {
    0%   { opacity: 0; transform: translate(-50%, -40%); } /* Starts slightly lower and invisible */
    15%  { opacity: 1; transform: translate(-50%, -50%); } /* Fades in and slides up to center */
    80%  { opacity: 1; transform: translate(-50%, -50%); } /* Stays visible for most of the duration */
    100% { opacity: 0; transform: translate(-50%, -50%); } /* Fades out completely */
}

.main-content-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 350px;
  padding: 1em 1em;
  /* background-color: #aaa; */
}

.ad {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 300px;
  height: 250px;
  margin-bottom: 25px;
  background-color: #eee;
  color: #aaa;
}

/*--- mobile ---*/
@media only screen and (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: 64px 1fr;
    grid-template-areas: "header" "main";
  }

  .item-a {
    display: none;
  }

  .item-b {
    display: flex;
    padding: 8px;
    justify-content: space-around;
    align-items: center;
  }

  .header-logo {
    width: 178px;;
    padding-bottom: 32px;
  }

  .item-d, .item-e {
    position: fixed;
  }

  .mega-typing-text {
    font-size: 60px;
  }

  .main-content-right {
    display: none;
  }
}