/* Reset default button styles to prevent browser overrides */
button {
  appearance: none;
  font-style: normal;
  font-variant-ligatures: none;
  font-variant-caps: normal;
  font-variant-numeric: normal;
  font-variant-east-asian: normal;
  font-variant-alternates: normal;
  font-variant-position: normal;
  font-variant-emoji: normal;
  font-weight: normal;
  font-stretch: normal;
  font-size: inherit;
  font-family: inherit;
  font-optical-sizing: auto;
  font-size-adjust: none;
  font-kerning: auto;
  font-feature-settings: normal;
  font-variation-settings: normal;
  text-rendering: auto;
  color: inherit;
  letter-spacing: normal;
  word-spacing: normal;
  line-height: normal;
  text-transform: none;
  text-indent: 0;
  text-shadow: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  background-color: transparent;
  margin: 0;
  padding: 0;
  border-width: 0;
  border-style: none;
  border-color: transparent;
  border-image: none;
}

body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: #000;
}

#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#intro {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

#chat-container {
  margin-top: -10%;
  width: 80%;
  max-width: 700px; /* Increased to fit all controls */
  background: rgba(0, 0, 0, 0.8);
  padding: 30px;
  border: 0.5px solid #fff;
  border-radius: 1px;
  margin-bottom: 20px;
  z-index: 2;
  position: relative;
}

#chat-output {
  height: 300px;
  overflow-y: auto;
  border: 0.5px solid #fff;
  padding: 15px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 1px;
}

#chat-input {
  width: 95%;
  margin-left: auto;
  margin-right: auto;
  padding: 12px;
  font-size: 16px;
  border: 0.5px solid #fff;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  margin-bottom: 15px;
}

#chat-input::placeholder {
  color: #555;
}

#clear-button {
  padding: 10px 20px;
  font-size: 14px;
  background: #333;
  color: #fff;
  border: 0.5px solid #fff;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
}

#clear-button:hover {
  opacity: 0.8;
  background: #444;
}

#send-button {
  padding: 12px 24px;
  margin-right: 2%;
  font-size: 16px;
  background: #000099;
  color: #fff;
  border: 0.5px solid #fff;
  border-radius: 4px;
  cursor: pointer;
}

#send-button:hover {
  background: #0000cc;
}

#exit-button {
  margin-top: 10px;
  padding: 12px 24px;
  font-size: 16px;
  background: transparent;
  color: #fff;
  border: 0.5px solid #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 2;
}

#exit-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.typing-indicator {
  display: inline-block;
  font-size: 16px;
  color: #fff;
}

.typing-indicator span {
  animation: blink 1s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.quotation-form {
  border: 1px solid #ccc;
  padding: 15px;
  margin: 10px 0;
  border-radius: 5px;
  max-width: 500px;
}

.quotation-form form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quotation-form input,
.quotation-form textarea {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

.quotation-form textarea {
  min-height: 100px;
  resize: vertical;
}

.quotation-form button {
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.quotation-form button:hover {
  background-color: #0056b3;
}

.portfolio-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  z-index: 15;
}

.base-template {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 560px;
  background: rgba(0, 0, 0, 0.9);
  padding: 20px;
  border: 0.5px solid #fff;
  border-radius: 4px;
  z-index: 20;
  color: #fff;
  max-height: 80vh;
  overflow-y: auto;
}

.base-template .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #333;
  color: #fff;
  border: 0.5px solid #fff;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
}

.base-template .close-button:hover {
  background: #555;
}

.base-template__wrapper {
  max-width: 560px;
  margin: 0 auto;
}

.base-template__title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: #fff;
}

.base-template__text {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 30px;
  text-align: center;
  opacity: 0.8;
  color: #fff;
}

.swiper {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.emotions-slider {
  --color-gray: #818181;
  --color-gray-dark: #1e1e1e;
  padding-inline: 20px;
  position: relative;
}

.emotions-slider__slide {
  display: flex;
  align-items: center;
  min-height: 400px;
}

.slider-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: absolute;
  top: 50%;
  left: 0;
  translate: 0 -50%;
  z-index: 1;
  pointer-events: none;
}

.slider-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  width: 48px;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.3s ease-out;
}

.slider-nav__item.disabled {
  cursor: default;
  opacity: 0.5;
}

.slider-nav__item path {
  stroke: currentColor;
}

.slider-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
}

.swiper-pagination-lock {
  display: none !important;
}

.slider-pagination__item {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #fff;
  transition: all 0.3s ease-out;
  opacity: 0.2;
}

.slider-pagination__item.active {
  width: 30px;
  opacity: 1;
}

.swiper-slide {
  width: auto;
  height: auto;
}

@keyframes btn-arrow-move {
  0% { translate: 0; }
  100% { translate: 100% -100%; }
}

.emotions-slider-item {
  --border-radius: 10px;
  width: calc(100% - 40px);
  max-width: 400px;
  background: var(--color-gray-dark);
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.emotions-slider-item__badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 5px;
  background: #00000066;
  border-bottom-right-radius: var(--border-radius);
  font-size: 14px;
  line-height: calc(24 / 14);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  color: #fff;
}

.emotions-slider-item__badge::before {
  content: "";
  flex-shrink: 0;
  display: block;
  aspect-ratio: 1;
  width: 18px;
  background: url("https://bato-web-agency.github.io/bato-shared/img/slider-1/icon-star.svg") center center no-repeat;
  background-size: 100%;
}

.emotions-slider-item__image {
  aspect-ratio: 400 / 270;
  overflow: hidden;
}

.emotions-slider-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.emotions-slider-item__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

.emotions-slider-item__info {
  display: flex;
  flex-direction: column;
}

.emotions-slider-item__title {
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 8px;
  color: #fff;
}

.emotions-slider-item__text {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.7;
  color: #fff;
}

.emotions-slider-item__footer {
  max-height: 50px;
  overflow: hidden;
  transition: max-height 0.6s ease-in;
}

.emotions-slider-item__btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
}

.emotions-slider-item__btn-icon {
  flex-shrink: 0;
  display: block;
  aspect-ratio: 1;
  width: 24px;
  position: relative;
  overflow: hidden;
}

.emotions-slider-item__btn-icon::before,
.emotions-slider-item__btn-icon::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: url("https://bato-web-agency.github.io/bato-shared/img/slider-1/icon-btn-arrow.svg") center center no-repeat;
  background-size: 100%;
}

.emotions-slider-item__btn-icon::after {
  position: absolute;
  top: 100%;
  right: 100%;
}

.emotions-slider__slide:not(.swiper-slide-active) .emotions-slider-item__footer {
  max-height: 0;
}

@media only screen and (max-width: 768px) {
  #chat-container {
    margin-top: 10%;
    position: fixed;
    top: 10%;
    width: 80%;
  }
  #chat-input {
    width: 94%;
  }
  body {
    height: auto;
    min-height: 100vh;
  }
  #exit-button {
    border: none;
  }
  .base-template {
    top: 45%;
  }
  .emotions-slider {
    padding: 0;
    margin-inline: -10px;
  }
  .slider-nav {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .slider-nav__item:not(.disabled):hover {
    color: #007bff;
  }
  .emotions-slider-item__btn:hover .emotions-slider-item__btn-icon::before,
  .emotions-slider-item__btn:hover .emotions-slider-item__btn-icon::after {
    animation: btn-arrow-move 0.4s ease forwards;
  }
}

@media (hover: none) {
  .slider-nav__item:not(.disabled):active {
    color: #007bff;
  }
  .emotions-slider-item__btn:active .emotions-slider-item__btn-icon::before,
  .emotions-slider-item__btn:active .emotions-slider-item__btn-icon::after {
    animation: btn-arrow-move 0.4s ease forwards;
  }
}