/* ══════════════════════════════════════════════
   FORGED CORE GAMING — style.css
   Temporary Homepage
   ══════════════════════════════════════════════ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:           #050508;
  --bg-mid:       #0d0d18;
  --bg-card:      #10101c;
  --neon:         #ff6b00;
  --neon-glow:    rgba(255, 107, 0, 0.45);
  --gold:         #ffc94d;
  --gold-dim:     rgba(255, 201, 77, 0.55);
  --text:         #e8e8f0;
  --text-dim:     #55556a;
  --border-dim:   rgba(255, 107, 0, 0.18);
  --border-hot:   rgba(255, 107, 0, 0.7);
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow: hidden;
}


/* ══════════════════════════════════════
   ENTRANCE SCREEN
   ══════════════════════════════════════ */

#entrance-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  background: var(--bg);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

#entrance-screen.exit {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* Radial spotlight glow behind logo */
.entrance-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 107, 0, 0.28) 0%,
    rgba(255, 107, 0, 0.08) 48%,
    transparent 72%
  );
  opacity: 0;
  transform: scale(0.3);
  animation: glowExpand 2.6s cubic-bezier(0.16, 1, 0.3, 1) 1.0s forwards;
  pointer-events: none;
}

/* ring removed */

@keyframes glowExpand {
  0%   { opacity: 0; transform: scale(0.3); }
  65%  { opacity: 1; transform: scale(1.18); }
  100% { opacity: 0.8; transform: scale(1.0); }
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.22; transform: scale(1);    }
  50%       { opacity: 0.65; transform: scale(1.06); }
}

.entrance-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* Logo */
#entrance-logo {
  width: 210px;
  height: auto;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.86);
  border-radius: 10px;
  animation: logoIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
  transition: transform 0.25s ease;
  will-change: filter, transform;
  user-select: none;
}

@keyframes logoIn {
  0%   { opacity: 0; transform: scale(0.86); filter: brightness(0.3) blur(6px); }
  100% { opacity: 1; transform: scale(1);    filter: brightness(1)   blur(0);   }
}

/* Added by JS once logoIn completes */
#entrance-logo.logo-glow {
  opacity: 1;
  transform: scale(1);
  animation: logoGlowPulse 2.8s ease-in-out infinite;
}

@keyframes logoGlowPulse {
  0%, 100% { filter: drop-shadow(0 0 10px var(--neon)) drop-shadow(0 0 24px rgba(255, 107, 0, 0.4)); }
  50%       { filter: drop-shadow(0 0 22px var(--neon)) drop-shadow(0 0 55px rgba(255, 107, 0, 0.75)); }
}

#entrance-logo:hover {
  transform: scale(1.06) !important;
}

/* "Enter the Forge" text */
#enter-text {
  font-size: 0.88rem;
  letter-spacing: 0.58em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  animation: textIn 1.1s ease 2.7s forwards;
  text-shadow: 0 0 12px var(--gold), 0 0 28px var(--gold-dim);
  user-select: none;
  padding: 8px 28px;
  transition: letter-spacing 0.28s ease, text-shadow 0.28s ease;
  position: relative;
  z-index: 1;
}

#enter-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.28s ease;
}

#enter-text:hover {
  letter-spacing: 0.7em;
  text-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold-dim);
}

#enter-text:hover::after {
  opacity: 0.6;
}

@keyframes textIn {
  from { opacity: 0; letter-spacing: 0.9em; transform: translateY(10px); }
  to   { opacity: 1; letter-spacing: 0.58em; transform: translateY(0);   }
}

/* Under-construction note */
#uc-note {
  position: absolute;
  bottom: 36px;
  font-size: 0.67rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  animation: textIn 1s ease 3.4s forwards;
  z-index: 1;
}


/* ══════════════════════════════════════
   MAIN SCREEN
   ══════════════════════════════════════ */

#main-screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease 0.25s;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 0, 0.4) transparent;
  /* subtle dot grid background */
  background-image: radial-gradient(rgba(255, 107, 0, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-color: var(--bg);
}

#main-screen::-webkit-scrollbar       { width: 5px; }
#main-screen::-webkit-scrollbar-thumb { background: rgba(255, 107, 0, 0.4); border-radius: 3px; }

#main-screen.visible {
  opacity: 1;
  pointer-events: all;
}


/* ── HEADER ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 40px;
  background: linear-gradient(to bottom, rgba(5, 5, 8, 0.97) 60%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-header img {
  height: 44px;
  width: auto;
  border-radius: 6px;
  filter: brightness(0.88);
}

.site-header h1 {
  flex: 1;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text);
  text-shadow: 0 0 12px rgba(255, 107, 0, 0.45);
  line-height: 1;
  align-self: center;
}

.header-badge {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon);
  border: 1px solid var(--border-dim);
  padding: 4px 14px;
  border-radius: 40px;
  text-shadow: 0 0 6px var(--neon);
  animation: badgePulse 3.5s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 107, 0, 0.15); border-color: rgba(255, 107, 0, 0.2); }
  50%       { box-shadow: 0 0 16px rgba(255, 107, 0, 0.4); border-color: rgba(255, 107, 0, 0.5); }
}


/* ── UC BANNER ── */

.uc-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 24px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 107, 0, 0.10),
    rgba(255, 107, 0, 0.10),
    transparent
  );
  border-top: 1px solid rgba(255, 107, 0, 0.22);
  border-bottom: 1px solid rgba(255, 107, 0, 0.22);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 107, 0, 0.85);
}

.gear {
  display: inline-block;
  font-style: normal;
  animation: spinGear 7s linear infinite;
}

@keyframes spinGear {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* ── HERO ── */

.hero {
  padding: 72px 40px 48px;
  text-align: center;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--neon) 0%, var(--gold) 55%, var(--neon) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

.hero p {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 1rem;
  letter-spacing: 0.07em;
}


/* ── GAME SECTIONS ── */

.game-section {
  padding: 8px 0 38px;
}

.game-section h3 {
  padding: 0 40px;
  margin-bottom: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}

.cards-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 6px 40px 14px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 0, 0.3) transparent;
}

.cards-row::-webkit-scrollbar       { height: 3px; }
.cards-row::-webkit-scrollbar-thumb { background: rgba(255, 107, 0, 0.4); border-radius: 2px; }


/* ── GAME CARD ── */

.game-card {
  flex: 0 0 200px;
  height: 282px;
  cursor: pointer;
  /* initial state for deal-in animation */
  opacity: 0;
  transform: translateY(-28px) scale(0.94);
  isolation: isolate;
  contain: layout style;
  will-change: transform;
}

/* JS adds this class with a staggered delay */
.game-card.deal-in {
  transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.34, 1.5, 0.64, 1);
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 8px;
  will-change: transform;
}

.game-card:hover .card-inner {
  transform: perspective(900px) rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* Card Front */
.card-front {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover .card-front {
  border-color: var(--border-hot);
  box-shadow: 0 6px 28px rgba(255, 107, 0, 0.22);
}

.card-thumb {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  position: relative;
  overflow: hidden;
}

/* Diagonal stripe texture */
.card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -46deg,
    transparent 0px,
    transparent 12px,
    rgba(0, 0, 0, 0.14) 12px,
    rgba(0, 0, 0, 0.14) 14px
  );
  z-index: 1;
}

/* Fade-to-card-bg gradient at bottom */
.card-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(to top, var(--bg-card), transparent);
  z-index: 2;
}

.card-thumb span {
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
}

.card-info {
  padding: 10px 12px 13px;
}

.card-info h4 {
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.card-info small {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Card Back */
.card-back {
  background: linear-gradient(158deg, #1d0900 0%, #301200 55%, #1d0900 100%);
  border: 1px solid rgba(255, 107, 0, 0.55);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: box-shadow 0.3s ease;
}

.game-card:hover .card-back {
  box-shadow: 0 0 28px rgba(255, 107, 0, 0.35), inset 0 0 28px rgba(255, 107, 0, 0.08);
}

.card-back-icon {
  font-size: 2.6rem;
  filter: drop-shadow(0 0 10px var(--neon));
}

.play-btn {
  padding: 9px 28px;
  background: transparent;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  text-shadow: 0 0 6px var(--neon);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.28);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.play-btn:hover {
  background: var(--neon);
  color: var(--bg);
  box-shadow: 0 0 22px rgba(255, 107, 0, 0.65);
}

.card-status {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}


/* ── FOOTER ── */

.site-footer {
  margin-top: 40px;
  padding: 30px 40px 40px;
  border-top: 1px solid rgba(255, 107, 0, 0.1);
  text-align: center;
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.09em;
}

.site-footer span {
  color: var(--neon);
}

.footer-note {
  margin-top: 6px;
  font-size: 0.64rem !important;
  opacity: 0.55;
}
