/* FF7 Style Page - CSS Animation */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body
{
  margin: 0;
  padding: 0;
  background: #000000;
  font-family: 'Press Start 2P', monospace;
  overflow: hidden;
  color: #fff;
}

/* Top Navigation */
nav#navbar
{
  position: absolute;
  top: -80px;
  left: 0;
  width: 100%;
  text-align: center;
  transition: top 1s ease-out;
  z-index: 100;
}

nav#navbar ul
{
  list-style: none;
  margin: 0;
  padding: 0;
}

nav#navbar ul li
{
  display: inline-block;
  margin: 0 12px;
}

nav#navbar ul li a
{
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 10px 15px;
  display: inline-block;
  text-shadow: 0 0 8px rgba(255, 22, 9, 0.5);
}

nav#navbar ul li a:hover
{
  color: #ffff00;
  text-shadow: 0 0 12px rgba(255, 255, 0, 0.7);
}

nav#navbar ul li a.active
{
  color: #ff1609;
  text-shadow: 0 0 12px rgba(255, 22, 9, 0.9);
  background: rgba(255, 22, 9, 0.2);
  border-radius: 3px;
}

/* Main Content Window */
.text-window
{
  position: absolute;
  padding: 20px;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid #ff1609;
  color: #fff;
  opacity: 0;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(255, 22, 9, 0.4),
              inset 0 0 20px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  box-sizing: border-box;
}

#window-left
{
  width: 700px;
  max-width: 90vw;
  max-height: calc(100vh - 180px);
  min-height: 300px;
}

.text-window h2
{
  color: #fff;
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
  text-shadow: 0 0 8px rgba(255, 22, 9, 0.5);
  border-bottom: 1px solid rgba(255, 22, 9, 0.5);
  padding-bottom: 8px;
}

.text-window h3
{
  color: #ffff00;
  font-size: 12px;
  margin-top: 15px;
  margin-bottom: 8px;
}

.text-window p
{
  font-size: 11px;
  line-height: 1.6;
  margin: 8px 0;
  font-family: Arial, sans-serif;
}

.text-window ul
{
  list-style: none;
  padding-left: 0;
  font-size: 11px;
  line-height: 1.8;
}

.text-window ul li
{
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 22, 9, 0.3);
}

.text-window ul li:before
{
  content: "▸ ";
  color: #ff1609;
  font-size: 10px;
  margin-right: 8px;
}

.text-window a
{
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.text-window a:hover
{
  color: #ffff00;
}

/* Blog specific styles */
.blog-entry
{
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 22, 9, 0.3);
}

.blog-entry:last-child
{
  border-bottom: none;
}

.date
{
  color: #999;
  font-size: 9px !important;
  margin: 5px 0 !important;
  font-style: italic;
}

/* Project specific styles */
.project
{
  margin-bottom: 20px;
}

/* Comic specific styles */
.comic-entry
{
  margin-bottom: 20px;
}

/* Navigation arrows inside content window */
.nav-arrows
{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 22, 9, 0.3);
}

.nav-arrow
{
  padding: 10px 20px;
  background: rgba(255, 22, 9, 0.3);
  border: 1px solid #ff1609;
  color: #fff;
  font-size: 11px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
}

.nav-arrow:hover:not(.disabled)
{
  background: rgba(255, 22, 9, 0.6);
  color: #ffff00;
  box-shadow: 0 0 10px rgba(255, 22, 9, 0.5);
  transform: scale(1.05);
}

.nav-arrow:active
{
  transform: scale(0.95);
}

.nav-arrow.disabled
{
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.page-indicator
{
  color: #fff;
  font-size: 10px;
  font-family: Arial, sans-serif;
}

/* Bottom Content Navigation Bar */
#content-nav
{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.95);
  border-top: 2px solid #ff1609;
  padding: 12px 0;
  z-index: 100;
  text-align: center;
  box-shadow: 0 -5px 20px rgba(255, 22, 9, 0.3);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#content-nav.show
{
  opacity: 1;
  transform: translateY(0);
}

#content-nav .nav-label
{
  display: inline-block;
  color: #fff;
  font-size: 10px;
  margin-right: 15px;
  vertical-align: middle;
  text-shadow: 0 0 6px rgba(255, 22, 9, 0.5);
}

#content-nav .page-buttons
{
  display: inline-block;
  vertical-align: middle;
}

#content-nav .page-btn
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 4px;
  background: rgba(255, 22, 9, 0.2);
  border: 1px solid #ff1609;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer;
}

#content-nav .page-btn:hover
{
  background: rgba(255, 22, 9, 0.5);
  color: #ffff00;
  box-shadow: 0 0 10px rgba(255, 22, 9, 0.5);
}

#content-nav .page-btn.active
{
  background: rgba(255, 22, 9, 0.6);
  color: #ffff00;
  box-shadow: 0 0 12px rgba(255, 255, 0, 0.5);
  text-shadow: 0 0 8px rgba(255, 255, 0, 0.8);
}

/* Page flip animations */
.text-window.flipping {
  overflow: hidden;
  perspective: 1200px;
}

.page-content {
  width: 100%;
  min-height: 200px;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.flip-out-left {
  animation: flipOutLeft 350ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.flip-out-right {
  animation: flipOutRight 350ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.flip-in-left {
  animation: flipInLeft 450ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.flip-in-right {
  animation: flipInRight 450ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes flipOutLeft {
  0% { transform: perspective(1200px) rotateY(0deg) scale(1); opacity: 1; }
  100% { transform: perspective(1200px) rotateY(-100deg) scale(0.9); opacity: 0; }
}

@keyframes flipOutRight {
  0% { transform: perspective(1200px) rotateY(0deg) scale(1); opacity: 1; }
  100% { transform: perspective(1200px) rotateY(100deg) scale(0.9); opacity: 0; }
}

@keyframes flipInLeft {
  0% { transform: perspective(1200px) rotateY(100deg) scale(0.9); opacity: 0; }
  100% { transform: perspective(1200px) rotateY(0deg) scale(1); opacity: 1; }
}

@keyframes flipInRight {
  0% { transform: perspective(1200px) rotateY(-100deg) scale(0.9); opacity: 0; }
  100% { transform: perspective(1200px) rotateY(0deg) scale(1); opacity: 1; }
}

/* Scrollbar styling */
.text-window::-webkit-scrollbar
{
  width: 8px;
}

.text-window::-webkit-scrollbar-track
{
  background: rgba(0, 0, 0, 0.3);
}

.text-window::-webkit-scrollbar-thumb
{
  background: #ff1609;
  border-radius: 4px;
}

.text-window::-webkit-scrollbar-thumb:hover
{
  background: #ffff00;
}

/* ============ RESPONSIVE BREAKPOINTS ============ */

/* Large desktop (1400px+) */
@media screen and (min-width: 1400px)
{
  #window-left
  {
    width: 800px;
    max-height: calc(100vh - 200px);
    min-height: 400px;
  }

  nav#navbar ul li a
  {
    font-size: 18px;
    padding: 12px 18px;
  }

  .text-window h2
  {
    font-size: 18px;
  }

  .text-window p
  {
    font-size: 13px;
  }

  #content-nav .page-btn
  {
    width: 42px;
    height: 42px;
    font-size: 14px;
    margin: 0 6px;
  }
}

/* Tablet landscape (1024px - 1399px) */
@media screen and (min-width: 1024px) and (max-width: 1399px)
{
  #window-left
  {
    width: 650px;
    max-height: calc(100vh - 180px);
  }

  nav#navbar ul li a
  {
    font-size: 14px;
    padding: 10px 12px;
  }
}

/* Tablet portrait (768px - 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px)
{
  #window-left
  {
    width: 580px;
    max-height: calc(100vh - 170px);
  }

  nav#navbar ul li a
  {
    font-size: 12px;
    padding: 10px 10px;
  }

  .text-window h2
  {
    font-size: 14px;
  }

  .text-window p
  {
    font-size: 10px;
  }

  #content-nav .page-btn
  {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }
}

/* Small tablet / large phone (601px - 767px) */
@media screen and (min-width: 601px) and (max-width: 767px)
{
  #window-left
  {
    width: 480px;
    max-height: calc(100vh - 160px);
  }

  nav#navbar ul li a
  {
    font-size: 10px;
    padding: 8px 8px;
  }

  .text-window h2
  {
    font-size: 12px;
  }

  .text-window p
  {
    font-size: 9px;
  }

  #content-nav .nav-label
  {
    font-size: 8px;
    margin-right: 10px;
  }

  #content-nav .page-btn
  {
    width: 32px;
    height: 32px;
    font-size: 10px;
    margin: 0 3px;
  }
}

/* Mobile (600px and below) */
@media screen and (max-width: 600px)
{
  nav#navbar ul li
  {
    margin: 0 2px;
  }

  nav#navbar ul li a
  {
    font-size: 8px;
    padding: 8px 5px;
  }

  #window-left
  {
    width: 92vw !important;
    max-width: 360px !important;
    max-height: calc(100vh - 150px) !important;
    min-height: 150px !important;
    padding: 12px !important;
  }

  .text-window h2
  {
    font-size: 10px;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .text-window h3
  {
    font-size: 9px;
    margin-top: 10px;
  }

  .text-window p
  {
    font-size: 8px;
    line-height: 1.4;
    margin: 5px 0;
  }

  .text-window ul
  {
    font-size: 8px;
    line-height: 1.4;
  }

  .text-window ul li
  {
    padding: 3px 0;
  }

  .nav-arrow
  {
    padding: 6px 10px;
    font-size: 7px;
  }

  .page-indicator
  {
    font-size: 7px;
  }

  .nav-arrows
  {
    margin-top: 10px;
    padding-top: 8px;
  }

  #content-nav
  {
    padding: 10px 0;
  }

  #content-nav .nav-label
  {
    display: block;
    margin: 0 0 8px 0;
    font-size: 8px;
  }

  #content-nav .page-btn
  {
    width: 36px;
    height: 36px;
    font-size: 11px;
    margin: 0 3px;
  }
}

/* Very small screens (400px and below) */
@media screen and (max-width: 400px)
{
  nav#navbar ul li
  {
    display: block;
    margin: 3px 0;
  }

  nav#navbar ul li a
  {
    display: block;
    font-size: 9px;
    padding: 8px 6px;
  }

  #window-left
  {
    max-height: calc(100vh - 140px) !important;
  }

  #content-nav .page-btn
  {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }
}
