/* --- Variables --- */
:root {
  --primary: #ff5700;
  --bg-dark: #0a0a0b;
  --card-bg: #161719;
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* --- Global Reset --- */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% -20%, #222529 0%, #0a0a0b 100%);
  color: var(--text-main);
  font-family: var(--font-body);
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Orientation Guard --- */
@media screen and (min-width: 320px) and (max-width: 930px) and (orientation: landscape) {
  body::before {
    content: "Please rotate your device to portrait mode.";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    color: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    text-align: center;
    padding: 20px;
  }

  .main-wrapper {
    display: none;
  }
}

/* --- Header --- */
header {
  padding: 4rem 1rem 1rem;
  text-align: center;
}    

header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0;
  letter-spacing: 1px;
  text-transform: uppercase;
}

header h1 span.text-white {
  animation: color-swap-left 12s ease-in-out infinite;
}

header h1 span.text-primary {
  animation: color-swap-right 12s ease-in-out infinite;
}

@keyframes color-swap-left {
  0%, 100% {
    color: #ffffff;
  }
  50% {
    color: var(--primary);
  }
}

@keyframes color-swap-right {
  0%, 100% {
    color: var(--primary);
  }
  50% {
    color: #ffffff;
  }
}

header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.6rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Custom Tooltip (Universal) --- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 50;
  font-weight: normal;
  letter-spacing: normal;
  text-transform: none;
}

[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* --- Content Layout --- */
.link-container {
  flex: 1;
  max-width: 550px;
  width: 90%;
  margin: 0 auto;
  padding-bottom: 4rem;
}

/* --- Game Cards --- */
.game-card {
  position: relative;
  height: 150px;
  margin-bottom: 1.2rem;
  border-radius: 20px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out !important;
  transform-style: preserve-3d;
  will-change: transform;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 87, 0, 0.35);
  border-color: rgba(255, 87, 0, 0.5);
}

.game-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 1.2s ease;
  z-index: 1;
}

.game-card:hover .game-card-bg {
  transform: scale(1.15);
}

.game-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.game-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-btn {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 8px;
  display: flex;
  align-items: center;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Header Navigation Menu --- */
.header-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 16px;
  color: white;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.nav-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(255, 87, 0, 0.2);
  color: var(--primary);
}

.nav-item i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Mail Copied State inside nav */
.nav-item.mail-card.copied {
  background: rgba(255, 87, 0, 0.15) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  box-shadow: 0 5px 15px rgba(255, 87, 0, 0.25) !important;
}

@media (max-width: 480px) {
  .header-nav {
    gap: 8px;
  }
  .nav-item {
    padding: 8px 12px;
    font-size: 0.75rem;
    gap: 6px;
  }
  .nav-item i {
    font-size: 1rem;
  }

  header {
    padding-top: 2rem;
  }
}

/* --- Footer --- */
footer {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
  padding-bottom: 15px;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0;
}

.footer-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.5;
  font-style: italic;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* --- Utilities --- */
.badge {
  font-size: 0.65rem;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
  margin-bottom: 5px;
  font-weight: 800;
}

.text-white {
  color: #ffffff;
}

.text-primary {
  color: var(--primary);
}

/* --- Initial Staggered Animations --- */
.game-card, .mod-card, .header-nav {
  animation: fade-in-up 0.8s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.header-nav { animation-delay: 0.2s; }
.link-container .game-card:nth-child(1), .mod-grid .mod-card:nth-child(1) { animation-delay: 0.3s; }
.link-container .game-card:nth-child(2), .mod-grid .mod-card:nth-child(2) { animation-delay: 0.4s; }
.link-container .game-card:nth-child(3), .mod-grid .mod-card:nth-child(3) { animation-delay: 0.5s; }

@keyframes fade-in-up {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Toast Notification (Copy Feedback) --- */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: rgba(22, 23, 25, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 87, 0, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 87, 0, 0.15);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-notification.hide {
  opacity: 0;
  transform: translate(-50%, -10px);
}

.toast-icon {
  color: var(--primary);
  font-size: 1.1rem;
}

/* Mail Card Copied State Styling */
.mail-card.copied {
  background: rgba(255, 87, 0, 0.15) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  box-shadow: 0 10px 25px rgba(255, 87, 0, 0.3) !important;
}

/* --- Mod Grid & Card Styling for other-mods.html --- */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 1.5rem;
  padding-bottom: 2rem;
}

.mod-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mod-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(255, 87, 0, 0.25);
}

.mod-card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background: #111;
}

.mod-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mod-card:hover .mod-card-image {
  transform: scale(1.06);
}

.mod-card-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.mod-card-game {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.mod-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.mod-card-version {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.mod-card-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.mod-card-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 15px rgba(255, 87, 0, 0.3);
}

/* --- Back to Home Button --- */
.back-btn-container {
  display: flex;
  margin-bottom: 0.5rem;
  justify-content: flex-start;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.back-btn:hover {
  color: var(--primary);
  transform: translateX(-4px);
}

/* --- Nav Icon Hover Transition --- */
.icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.icon-wrapper i {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 1.1rem !important;
}

.icon-wrapper .default-icon {
  opacity: 1;
  transform: scale(1);
}

.icon-wrapper .hover-icon {
  opacity: 0;
  transform: scale(0.6);
  color: var(--primary);
}

.nav-item:hover .icon-wrapper .default-icon {
  opacity: 0;
  transform: scale(0.6);
}

.nav-item:hover .icon-wrapper .hover-icon {
  opacity: 1;
  transform: scale(1);
}


