/* Custom CSS for Kiko AI Website */

/* Font and Typography */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: "blockhead-unplugged", sans-serif;
}

/* Ensure font applies to all text elements */
body, body *, h1, h2, h3, h4, h5, h6, p, span, div, button, a {
  font-family: "blockhead-unplugged", sans-serif !important;
  font-size: 1.05em;
}

.crayon-border h4 {
  font-size: 1.05em !important;
}

.crayon-border p {
  font-size: 1.05em !important;
}

button {
  font-size: 1.05em !important;
}

#dialogueText {
  font-size: 1.05em !important;
}

footer p {
  font-size: 1.05em !important;
}

/* Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-image, url("../background-kiko.avif")) no-repeat center center;
  background-size: cover;
  background-color: snow;
  z-index: -1;
}

/* Hamburger Menu Styles */
.hamburger-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1050;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hamburger-menu.hidden {
  opacity: 0;
  visibility: hidden;
}

.hamburger-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hamburger-btn:hover {
  transform: scale(1.05);
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: left 0.3s ease;
  z-index: 1040;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #dc3545;
}

.sidebar-menu {
  padding: 20px 0;
}

.sidebar-menu a {
  display: block;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.sidebar-menu a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #007bff;
  padding-left: 25px;
}

.sidebar-menu a.instagram-link {
  text-align: center;
  font-size: 1.5rem;
}

.sidebar-menu a.instagram-link:hover {
  padding-left: 20px;
}

.sidebar-menu hr {
  margin: 15px 20px;
  border-color: rgba(0, 0, 0, 0.1);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1030;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Content Layout */
.content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Crayon Border Styles */
.crayon-border {
  position: relative;
  border: none;
  background-color: #f6eee3;
  border-radius: 150px;
  line-height: 1.5em;
  font-family: sans-serif;
  font-weight: bold;
  padding: 20px;
  height: 70vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.crayon-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 8px solid orange;
  border-radius: 150px;
  filter: url(#crayon-rough);
  box-shadow: 2px 2px 0 orange, -2px -1px 0 #ff9933, 1px -2px 0 #ff6600;
  z-index: -1;
}

/* Simple Border Styles */
.simple-border {
  position: relative;
  border: 1px solid black;
  background-color: #f6eee3;
  border-radius: 34px;
  line-height: 1.5em;
  font-family: sans-serif;
  font-weight: bold;
  padding: 20px;
}

.crayon-border.hidden {
  background-color: transparent;
}

.crayon-border.hidden::before {
  display: none;
}

/* Position mainContent from bottom when not hidden */
#mainContent:not(.hidden) {
  position: fixed;
  bottom: 10vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: visibility 0.3s ease, opacity 0.3s ease;
}

/* Hide mainContent visually but keep it taking space when invisible */
#mainContent.invisible-but-present {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  bottom: 10vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

/* Removed old crayon border styling - now using simple solid border */

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
  padding: 10px 0;
  position: sticky;
  bottom: 0;
  width: 100%;
}

/* Image/Video Container */
.image-video-container {
  position: relative;
  display: inline-block;
}

.image-video-container img,
.image-video-container video {
  max-height: 50vh;
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: top;
}

.kiko-logo {
  max-height: 50vh;
}

/* Make only the video bigger and move it up */
#mainVideo {
  max-height: 72vh;
  margin-top: -10vh;
}

/* Custom Button Styles */
.btn-primary {
  background-color: #bed7d4 !important;
  border-color: #bed7d4 !important;
  color: #333 !important;
}

.btn-primary:hover {
  background-color: #8cb2ae !important;
  border-color: #8cb2ae !important;
  color: #333 !important;
}

/* Visual Novel Content Styles */
#visualNovelContent {
  min-height: 200px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

#visualNovelContent .text-center {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#dialogueText {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.6;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  width: 100%;
}

/* Text Content Width Constraints */
#mainContent h4,
#mainContent p,
#mainContent button {
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#dialogueText {
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Prevent Image Selection */
#mainImage {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

/* Kiko Hovering Animation */
@keyframes kikoHover {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.kiko-hovering {
  animation: kikoHover 2s ease-in-out infinite;
}

/* Cloud Animation Styles */
.cloud {
  position: fixed;
  z-index: -2;
  opacity: 0.7;
  pointer-events: none;
  max-width: 200px;
  max-height: 100px;
  object-fit: contain;
}

@keyframes cloudMove {
  0% {
    left: -200px;
  }
  100% {
    left: calc(100vw + 200px);
  }
}

.cloud-animating {
  animation: cloudMove 20s linear infinite;
}

/* Visual Novel Active State */
body.visual-novel-active {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Right Side Button Styles */
.right-side-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.right-side-button.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Responsive Design */
@media (min-width: 769px) {
  .crayon-border {
    bottom: -10%;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    left: -100%;
  }
  
  .hamburger-menu {
    top: 15px;
    left: 15px;
  }
  
  .hamburger-btn {
    padding: 8px 10px;
  }
}