/* --- Import Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Cinzel:wght@600;800;900&family=Montserrat:wght@300;400;600;800&display=swap');

/* --- Custom Properties & Theme (Red, Black, White Stream Palette) --- */
:root {
  --primary-red: #e61c2a; /* Persona 5 / Stream Vibrant Red */
  --light-red: #ff3b30;
  --neon-red: #ff0016;
  --neon-cyan: #ff3b30; /* Redirect neon highlight to red */
  --twitch-color: #9146ff;
  --gold: #ffffff; /* Changed to white/silver for red/black theme */
  --gold-glow: #e61c2a; /* Changed gold glow to red glow */
  --dark-bg-deep: #0a080a; /* Deep Charcoal Black */
  --dark-bg-panel: rgba(24, 20, 22, 0.88); /* Semi-transparent panel for readability on bg image */
  --dark-bg-card: #1c181d;
  --text-light: #ffffff;
  --text-gray: #cfc2cb; /* Light silver/grey */
  --font-comic: 'Bangers', cursive;
  --font-mythic: 'Cinzel', serif;
  --font-sans: 'Montserrat', sans-serif;
  --border-comic: 3px solid #000;
  --shadow-comic: 6px 6px 0px #000;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Base Styles & Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  color: var(--text-light);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  /* Fixed background image for the entire page - warm black/red overlay */
  background-image: 
    linear-gradient(rgba(10, 8, 10, 0.9), rgba(10, 8, 10, 0.95)), 
    url('img/hero-bg.jpg');
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* --- Comic Halftone Overlay (Selective Red Dots) --- */
.halftone-bg {
  position: relative;
}
.halftone-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(230, 28, 42, 0.07) 15%, transparent 16%);
  background-size: 16px 16px;
  pointer-events: none;
  z-index: -1;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  text-transform: uppercase;
}

.comic-text {
  font-family: var(--font-comic);
  letter-spacing: 2px;
  -webkit-text-stroke: 1.5px #000;
  text-shadow: 3px 3px 0 #000;
}

.mythic-text {
  font-family: var(--font-mythic);
  letter-spacing: 1px;
}

/* --- Header / Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 8, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary-red);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-light);
}

.logo-img-nav {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--primary-red);
}

.logo-text-nav {
  font-family: var(--font-comic);
  font-size: 1.8rem;
  color: var(--primary-red);
  -webkit-text-stroke: 1px #000;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 1px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  position: relative;
  padding: 0.5rem 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary-red);
  transition: var(--transition-smooth);
}

nav a:hover {
  color: var(--primary-red);
}

nav a:hover::after {
  width: 100%;
}

.btn-live {
  background: red;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
  animation: pulse 1.5s infinite;
  text-transform: uppercase;
}

.btn-live .dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  background: transparent;
  border-bottom: none;
}

.hero-container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
  z-index: 2;
}

.hero-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.status-badge {
  background: var(--primary-red);
  border: var(--border-comic);
  color: #fff;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-comic);
  font-size: 1.2rem;
  box-shadow: var(--shadow-comic);
  transform: rotate(-2deg);
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 5rem;
  color: #fff;
  line-height: 0.95;
  margin-bottom: 1.5rem;
  transform: rotate(-1deg);
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 400;
  max-width: 600px;
}

.hero-subtitle span {
  color: var(--primary-red);
  font-weight: 800;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  font-family: var(--font-comic);
  font-size: 1.5rem;
  padding: 0.8rem 2.2rem;
  text-decoration: none;
  text-align: center;
  border: var(--border-comic);
  box-shadow: var(--shadow-comic);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: var(--primary-red);
  color: #fff;
}

.btn-secondary {
  background: #000;
  color: #fff;
  border: 3px solid #fff;
}

.btn-primary:hover, .btn-secondary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0px #000;
}

.btn-primary:active, .btn-secondary:active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0px #000;
}

.hero-graphic {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mascot-container {
  width: 100%;
  max-width: 420px;
  border: 4px solid var(--primary-red);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 35px rgba(230, 28, 42, 0.65);
  animation: float 6s ease-in-out infinite;
  background-color: rgba(24, 20, 22, 0.5);
}

.mascot-container img {
  width: 100%;
  display: block;
}

/* --- Comic Panels Grid (About Section) --- */
.about {
  padding: 8rem 2rem;
  position: relative;
  background: transparent;
  border-bottom: none;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-title {
  font-size: 4rem;
  color: var(--primary-red);
  display: inline-block;
  transform: rotate(-1deg);
}

.comic-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.comic-panel {
  background: var(--dark-bg-panel);
  border: var(--border-comic);
  box-shadow: var(--shadow-comic);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  backdrop-filter: blur(5px);
}

.comic-panel:hover {
  transform: scale(1.02);
}

.panel-tag {
  position: absolute;
  top: 0;
  left: 0;
  background: #000;
  color: var(--primary-red);
  font-family: var(--font-comic);
  padding: 0.4rem 1.2rem;
  font-size: 1.2rem;
  border-bottom-right-radius: 8px;
  border-right: 2px solid var(--primary-red);
  border-bottom: 2px solid var(--primary-red);
}

.panel-title {
  font-size: 2.2rem;
  color: #fff;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 0px #000;
}

.panel-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

.panel-desc strong {
  color: #fff;
}

/* Comic Speech Bubble style details */
.speech-bubble {
  background: #fff;
  color: #000;
  border: 3px solid #000;
  padding: 1.2rem;
  border-radius: 20px;
  position: relative;
  margin-top: 1.5rem;
  font-weight: 600;
  box-shadow: 4px 4px 0 #000;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 30px;
  border-width: 15px 15px 0;
  border-style: solid;
  border-color: #fff transparent;
  display: block;
  width: 0;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 28px;
  border-width: 17px 17px 0;
  border-style: solid;
  border-color: #000 transparent;
  display: block;
  width: 0;
}

/* --- Yu-Gi-Oh! Card Deck Section --- */
.deck-section {
  padding: 8rem 2rem;
  background-color: transparent;
  position: relative;
  border-bottom: none;
  overflow: hidden;
}

.deck-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.deck-intro {
  text-align: center;
  max-width: 700px;
  margin-bottom: 5rem;
}

.deck-intro p {
  color: var(--text-gray);
  font-size: 1.2rem;
  line-height: 1.6;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5rem;
  width: 100%;
}

.card-wrapper {
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Interactive 3D Yu-Gi-Oh Card styling (Preserved oriented to YuGiOh) */
.ygo-card {
  width: 320px;
  height: 466px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  backface-visibility: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.card-front {
  background: linear-gradient(135deg, #a75d27 0%, #703310 100%);
  border: 4px solid #d4c29d;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8), 0 0 5px rgba(0,0,0,0.5);
  color: #000;
  font-family: var(--font-sans);
}

.ygo-card.spell-card .card-front {
  background: linear-gradient(135deg, #1d826a 0%, #0c3e32 100%);
}
.ygo-card.monster-card-xyz .card-front {
  background: linear-gradient(135deg, #242424 0%, #0d0d0d 100%);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #5a4b36;
  padding-bottom: 3px;
  margin-bottom: 5px;
}

.ygo-card.spell-card .card-header {
  border-bottom: 2px solid #07261f;
}

.card-name {
  font-family: var(--font-comic);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  text-transform: uppercase;
}

.card-attribute {
  width: 24px;
  height: 24px;
  background: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-red);
  font-family: var(--font-comic);
  font-size: 0.75rem;
  font-weight: bold;
  border: 1px solid var(--primary-red);
}

.card-stars {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  margin-bottom: 6px;
}

.star {
  width: 14px;
  height: 14px;
  background: #ffd700; /* Real Gold stars for card accuracy */
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  box-shadow: 0 0 2px rgba(0,0,0,0.8);
}

.card-art {
  width: 100%;
  height: 220px;
  border: 3px solid #7c6850;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  background-color: #000;
  position: relative;
  overflow: hidden;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  background: linear-gradient(
    105deg,
    rgba(255,255,255,0) 30%,
    rgba(255, 255, 255, 0.13) 40%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.13) 60%,
    rgba(255,255,255,0) 70%
  );
  background-size: 200% 200%;
  background-position: 100% 100%;
  mix-blend-mode: color-dodge;
  transition: background-position 0.1s ease;
}

.card-info-box {
  flex-grow: 1;
  background: #f7e9c8;
  border: 3px solid #8e7a5d;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.3;
}

.ygo-card.spell-card .card-info-box {
  background: #e2f4ed;
  border: 3px solid #14614e;
}

.card-type {
  font-weight: 800;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding-bottom: 2px;
  margin-bottom: 3px;
  font-family: var(--font-sans);
}

.card-description {
  font-style: italic;
  color: #222;
  font-weight: 500;
  overflow-y: auto;
  max-height: 85px;
}

.card-stats {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  padding-top: 2px;
  margin-top: 3px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Back of Card */
.card-back {
  background: #0d0c10;
  border: 4px solid var(--primary-red);
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back-design {
  width: 85%;
  height: 85%;
  border: 2px solid var(--primary-red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle, var(--dark-bg-panel) 20%, transparent 60%);
}

.card-back-design::before {
  content: '';
  width: 80px;
  height: 80px;
  border: 3px dashed var(--primary-red);
  border-radius: 50%;
  animation: rotate 12s linear infinite;
}

/* Card details styling */
.card-details-title {
  margin-top: 1.5rem;
  font-size: 1.6rem;
  color: var(--primary-red);
  text-align: center;
}

.card-details-sub {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

/* --- Twitch Live Stream Player / Restrim --- */
.restrim {
  padding: 8rem 2rem;
  background: transparent;
  border-bottom: none;
}

.stream-container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--dark-bg-panel);
  border: var(--border-comic);
  box-shadow: var(--shadow-comic);
  padding: 2rem;
  backdrop-filter: blur(5px);
}

.stream-status-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed rgba(255,255,255,0.1);
}

.stream-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stream-title-text {
  font-family: var(--font-comic);
  font-size: 1.8rem;
  color: #fff;
}

.stream-offline-tag {
  background: #333;
  color: #ccc;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-weight: bold;
}

.stream-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  background: #000;
}

.stream-video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.stream-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.stream-actions {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  justify-content: center;
}

/* --- Social Comic Panels (Community) --- */
.community {
  padding: 8rem 2rem;
  position: relative;
  background-color: transparent;
}

.social-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.social-panel {
  position: relative;
  height: 220px;
  border: var(--border-comic);
  box-shadow: var(--shadow-comic);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.social-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(0, 0, 0, 0.15) 15%, transparent 16%);
  background-size: 10px 10px;
  z-index: 1;
}

.social-panel:hover {
  transform: scale(1.05) rotate(2deg);
}

.social-panel.twitch {
  background-color: var(--twitch-color);
}
.social-panel.discord {
  background-color: #5865f2;
}
.social-panel.youtube {
  background-color: #ff0000;
}
.social-panel.twitter {
  background-color: #1a1a1a;
}
.social-panel.telegram {
  background-color: #229ed9;
}

.social-boom {
  font-family: var(--font-comic);
  font-size: 3rem;
  -webkit-text-stroke: 2px #000;
  text-shadow: 4px 4px 0 #000;
  margin-bottom: 1rem;
  transform: skewX(-5deg);
  z-index: 2;
  transition: var(--transition-smooth);
}

.social-panel:hover .social-boom {
  transform: scale(1.2) skewX(-10deg) rotate(-5deg);
  text-shadow: 6px 6px 0 #000;
}

.social-name {
  font-size: 1.3rem;
  font-weight: 800;
  background: #000;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
  letter-spacing: 1px;
  z-index: 2;
}

/* --- Footer --- */
footer {
  background: rgba(10, 8, 10, 0.96);
  border-top: none;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  backdrop-filter: blur(5px);
}

.footer-logo {
  font-family: var(--font-comic);
  font-size: 2.5rem;
  color: var(--primary-red);
  margin-bottom: 1.5rem;
  -webkit-text-stroke: 1.5px #000;
  text-shadow: 3px 3px 0 #000;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 2rem;
}

.footer-links a {
  color: var(--text-gray);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--primary-red);
}

.footer-credits {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}

.footer-credits a {
  color: var(--primary-red);
  text-decoration: none;
}

/* --- Keyframe Animations --- */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

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

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Responsive Design Media Queries --- */
@media (max-width: 1100px) {
  .social-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .hero-title { font-size: 4rem; }
  .deck-grid { gap: 2rem; }
  .ygo-card { width: 280px; height: 406px; }
  .card-art { height: 180px; }
  .card-description { max-height: 65px; }
}

@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-info { align-items: center; }
  .hero-cta { justify-content: center; }
  .comic-grid { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  nav ul { display: none; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 3rem; }
  .section-title { font-size: 2.8rem; }
  .deck-grid { grid-template-columns: 1fr; justify-items: center; }
  .social-grid { grid-template-columns: 1fr; }
  .nav-container { padding: 1rem; }
}
