/* === Global Reset & Body === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: 'MedievalSharp', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0a0a0a;
}

body {
  position: relative;
  z-index: 1;
}

/* === Background Image === */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('/assets/kalvor_bg.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 10%;
  z-index: -1;
  opacity: 1;
}


/* === Smart fallback for taller or mobile screens === */
@media (max-aspect-ratio: 4/3) {
  .background {
    object-position: center center;
  }
}

@media (max-width: 768px) {
  .background {
    object-position: center center;
  }
}




/* === Top Bar Navigation === */
.top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75em 1em;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;

}

.main-nav a {
    display: inline-block;
    margin-left: 6px;
    padding: 5px 9px;
    border: 1px solid #e5c87c;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #e5c87c;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
    background-color: #e5c87c;
    color: #1a1a1a;
}

.language-nav {
  display: flex;
  align-items: center;
  gap: 1em;
}

/* === Social Icons === */
.social-icons a img {
  height: 24px;
  margin-left: 0.75em;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 3px #e5c87c90);
}

.social-icons a:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px #fff3c0aa);
}

/* === Main Layout === */
.main-content {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1vw;
  position: relative;
  z-index: 10;
  color: #fff;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-svg {
  width: 40vw;
  max-width: 600px;
  height: auto;
  margin-top: 1rem;
  margin-left: 1rem;
  z-index: 10;
  pointer-events: none;
}

@media screen and (min-width: 1500px) {
  .logo-svg {
    margin-top: 1rem;      
    margin-left: 1rem;   
  }
}

@media screen and (min-width: 769px) and (max-width: 1499px) {
  .logo-svg {
    width: 58vw;
    margin-top: 1.2rem;
    margin-left: 1.2rem;
  }
}

@media screen and (max-width: 768px) {
  .logo-svg {
    width: 78vw;
    margin-top: 1.5rem;
    margin-left: 1.5rem;
  }
}


/* === Platform Icons === */
.platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}


.platforms img {
  height: 24px;
}

.platforms span {
  font-size: 0.9em;
  color: #e5c87c;
}

.panel-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  margin-left: 2em;
}

/* Stylized game intro */
.description-panel {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid #E5C87C;
  border-radius: 10px;
  padding: 10px 20px;
  width: 100%;
  text-align: center;
  color: #E5C87C;
  font-size: 1rem;
}

/* Signup form container */
.signup-panel {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #E5C87C;
  border-radius: 10px;
  padding: 10px 20px;
  width: 100%;
  color: #E5C87C;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 12px rgba(229, 200, 124, 0.1);
}

.signup-panel form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.signup-panel .main-nav {
  display: flex;
  justify-content: center;
}

.signup-panel .main-nav a {
  width: 100%;
  text-align: center;
  margin: 0;
}

.signup-panel input[type="email"] {
  background-color: #1a1a1a;
  border: 1px solid #E5C87C;
  border-radius: 6px;
  padding: 10px 14px;
  color: #E5C87C;
  font-size: 1rem;
  width: 100%;

}

.signup-panel p {
  margin: 0;
  font-size: 0.95rem;
}

/* === Right Column (CTA) === */
.right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.2em;
}

.cta-text p {
  margin: 0;
  font-size: 0.95em;
  color: #fff1c1;
}

/* === Email Signup Form === */
.email-signup {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  width: 100%;
}

.email-signup input[type="email"] {
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #e5c87c;         /* gold border */
  background-color: #111;            /* dark background */
  color: #e5c87c;                    /* gold text */
  width: 100%;
}

.email-signup input[type="email"]:focus {
  outline: none;
  border-color: #fff3c0;
  box-shadow: 0 0 6px #fff3c099;
}


.email-signup input.input-error {
  border-color: red;
}



.g-recaptcha {
  transform: scale(0.9);
  transform-origin: left;
}

#signup-button {
  background: #E5C87C;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}
#signup-button:hover {
  background: #f0d98f;
}

/* === Status Messages === */
.form-status {
  font-size: 0.9em;
  padding: 0.25em;
  color: #ccc;
}
.form-status.success { color: #a3fba3; }
.form-status.error { color: #ff9c9c; }
.form-status.loading { color: #fff3c0; }

/* === Footer === */
.footer {
  text-align: center;
  padding: 2em 1em;
  font-size: 0.8em;
  color: #e5c87c;
  background: rgba(0, 0, 0, 0.6);
  border-top: 1px solid #333;
  margin-top: 3em;
}

.footer a {
  color: #e5c87c;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* === Scroll Fade === */
.scroll-fade {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.scroll-fade.visible {
  opacity: 1;
}

/* === Responsive === */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 6em 2em 3em;
  }

  .right-col {
    align-items: stretch;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }

  .main-nav a {
    margin-right: 0.5em;
  }

  .platforms {
    flex-direction: column;
    align-items: flex-start;
	  color: #e5c87c;
  }

  .g-recaptcha {
    transform: scale(1);
  }
}

/* === Animation === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.language-menu {
  display: flex;
  align-items: center;
  gap: 0.75em;
}

.flag-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 0 2px #e5c87c88);
}

.flag-button img {
  width: 28px;
  height: auto;
  display: block;
  border-radius: 3px;
}

.flag-button:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 4px #fff3c0aa);
}

/* === Language Flag Dropdown === */
.flag-dropdown {
  position: relative;
  display: inline-block;
}

.flag-selector {
  position: relative;
}

.active-flag {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.active-flag img {
  height: 24px;
  width: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 0 4px #e5c87c88;
}

/* Hidden by default */
.flag-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #000;
  border: 1px solid #e5c87c33;
  padding: 0.25em;
  border-radius: 4px;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.7);
}

.flag-option {
  background: none;
  border: none;
  padding: 0;
  margin: 0.2em 0;
  cursor: pointer;
}

.flag-option img {
  height: 24px;
  width: auto;
  display: block;
  border-radius: 4px;
}

/* Show on hover */
.flag-dropdown:hover .flag-options {
  display: block;
}

.left-col, .right-col {
  min-width: 300px;
	min-height: 1px;
}

.left-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-left: -55em;
	max-width: 520px;
}

.right-col {
  align-items: flex-start; 
}


.carousel-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #E5C87C;
  padding: 1rem;
  border-radius: 8px;
  max-width: 100%;
}

.feed-item {
  margin-bottom: 0.5rem;
}

.play-now-svg {
  width: 180px;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
  animation: pulse 2s infinite ease-in-out;
  filter: drop-shadow(0 0 8px #E5C87C);
}

@keyframes pulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.05); opacity: 0.95; }
  100% { transform: scale(1);   opacity: 1; }
}

.play-now-svg:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 16px #F0D98F);
}

.playnow-container {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
}

@media screen and (min-width: 1500px) {
  .playnow-container {
    right: -46rem; /* Push further away from Kalvor's hand on large displays */
    bottom: -3rem;
  }
}

@media screen and (min-width: 769px) and (max-width: 1499px) {
  .playnow-container {
    right: -25rem;  /* Adjust as needed for mid-size devices */
    bottom: -1rem;
  }
}

@media screen and (max-width: 768px) {
  .playnow-container {
    right: 1rem; /* Slightly tighter on mobile */
    bottom: 1rem;
  }
}

.playnow-link {
  display: inline-block;
  transition: transform 0.3s ease;
}

.playnow-link:hover {
  transform: scale(1.05);
}

.playnow-svg {
  width: 250px;
  height: auto;
  animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% {
    filter: drop-shadow(0 0 4px #e5c87c88);
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 14px #f0d98fcc);
    transform: scale(1.025);
  }
  100% {
    filter: drop-shadow(0 0 4px #e5c87c88);
    transform: scale(1);
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  position: absolute;
  right: 1rem;
  z-index: 20;
	color: #e5c87c;
}

.header-right .platforms img {
  height: 28px;
  width: auto;
  opacity: 0.95;
  transition: transform 0.2s ease;
}

.header-right .social-icons img {
  height: 24px;
  width: auto;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.header-right .social-icons img:hover {
  transform: scale(1.1);
  opacity: 1;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 60px;
  position: relative;
  z-index: 10;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-icons .social-icons img {
  height: 28px;
  width: auto;
  margin-left: 0.5rem;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.header-icons .social-icons img:hover {
  transform: scale(1.1);
  opacity: 1;
}

.scroll-panel {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  max-width: 1000px;
  width: 90%;
  max-height: 80vh;
  background: #0a0a0a;
  border: 4px double #e5c87c;
  border-radius: 16px;
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 0 25px #e5c87c88;
  display: none;
}

.scroll-panel.visible {
  display: block;
  animation: fadeInScroll 0.5s ease-in-out;
}

@keyframes fadeInScroll {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.scroll-content {
  position: relative;
}

.close-scroll {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: none;
  border: none;
  color: #e5c87c;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 100;
}

.scroll-inner {
  color: #ffeec6;
  font-size: 1rem;
  line-height: 1.6;
  padding-top: 2.5rem;
  white-space: pre-wrap;
  font-family: 'Georgia', serif;
}
