/* Custom variables for bootstrap theming */
:root {
  --bs-body-font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --bs-body-bg: #f8f4e8;
  --bs-body-color: #1a1a1e;
  --bs-primary: #ff9e00;
  --bs-primary-rgb: 255, 158, 0;
  --bs-secondary: #5b5b62;
  --bs-secondary-rgb: 91, 91, 98;
}

body {
  min-height: 100vh;
  background-color: #f8f4e8;
  font-family: var(--bs-body-font-family);
  image-rendering: pixelated;
}

.custom-card {
  background-color: #fffdf6;
  padding: 2rem;
  border-radius: 0;
}

/* Custom shadow utility */
.shadow-custom {
  box-shadow: 4px 4px 0 #1a1a1e;
}

/* Custom border utility */
.border-dark-2 {
  border: 2px solid #1a1a1e !important;
}

.title-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.title-wrapper::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 8px;
  width: 8px;
  height: 70%;
  background-color: #ff9e00;
  border: 2px solid #1a1a1e;
  border-left: none;
  box-shadow: 2px 2px 0 #1a1a1e;
}

.site-title {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  font-size: calc(2rem + 1.5vw);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  background-color: #fffdf6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-title:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #1a1a1e !important;
}

.intro-text {
  font-size: calc(1rem + 0.25vw);
  color: #5b5b62;
  max-width: 60ch;
  margin-bottom: 2rem;
}

.section-title {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
  margin: 2rem 0 1.5rem;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: #ff9e00;
}

.games-list {
  list-style: none;
  padding: 0;
}

.game-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translate(-3px, -3px);
}

.game-card:hover .shadow-custom {
  box-shadow: 8px 8px 0 #1a1a1e;
}

.game-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #ff9e00;
  transform: translateY(100%);
  transition: transform 0.2s ease;
}

.game-card:hover::after {
  transform: translateY(0);
}

.game-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: block;
  transition: transform 0.2s ease;
  color: #ffffff;
}

.game-card:hover .game-title {
  color: #ff9e00;
}

.game-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  max-height: 60vh;
}

.game-image-container img {
  transition: transform 0.2s ease;
  object-fit: cover;
}

.game-card:hover .game-image-container img {
  transform: scale(1.05);
}

.game-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 158, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.game-card:hover .game-image-overlay {
  opacity: 1;
}

/* Game indicator arrow */
.game-arrow {
  display: inline-block;
  margin-right: 0.6rem;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.game-card:hover .game-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.game-card:active {
  transform: translate(2px, 2px);
}

.game-card:focus-visible {
  outline: 3px dashed #ff9e00;
  outline-offset: 3px;
}

/* Tech section */
.tech-section {
  position: relative;
  margin-top: 3rem;
}

.tech-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #ff9e00;
}

.logo-item {
  transition: transform 0.2s ease;
}

.logo-item:hover {
  transform: translateY(-5px);
}

.logo-image {
  filter: grayscale(30%);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.logo-item:hover .logo-image {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.logo-item a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to top, var(--accent-soft), transparent);
  transition: var(--transition);
  z-index: 0;
}

.logo-item a:hover { 
  transform: translate(-2px,-2px); 
  box-shadow: 7px 7px 0 var(--ink); 
}

.logo-item a:hover::after {
  height: 100%;
}

.logo-item a:active { 
  transform: translate(2px,2px); 
  box-shadow: 3px 3px 0 var(--ink); 
}

.logo-item a:focus-visible { 
  outline: 3px dashed var(--accent); 
  outline-offset: 3px; 
}

.logo-item img {
  display: block;
  max-width: 140px;
  max-height: 60px;
  width: auto;
  height: auto;
  image-rendering: pixelated;
  filter: grayscale(30%);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

/* Custom footer */
.footer-custom {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 2px dashed #5b5b62;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-custom:hover {
  opacity: 1;
}

/* Password form styling */
.password-form {
  position: relative;
}

.password-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #ff9e00;
}

/* Helper classes for custom box shadow */
.shadow-sm-custom {
  box-shadow: 3px 3px 0 #1a1a1e;
}

.shadow-hover:hover {
  box-shadow: 5px 5px 0 #1a1a1e !important;
  transform: translate(-2px, -2px);
}

/* Dark mode adjustments using Bootstrap's dark mode classes */
@media (prefers-color-scheme: dark) {
  :root {
    --bs-body-bg: #0d0d10;
    --bs-body-color: #f4f4f7;
  }
  
  .bg-light {
    background-color: #121215 !important;
  }
  
  .border-dark {
    border-color: #f4f4f7 !important;
  }
}
