/* =============================================
   Free RPG Portraits - Main Stylesheet
   ============================================= */

/* Color variables */
:root {
  --bg: #0a0a0f;
  --card: #111118;
  --blue: #00d4ff;
  --purple: #8b00ff;
  --pink: #ff00aa;
  --text: #f0f0f0;
  --muted: #b0b0b0;
}

/* Reset and base styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.55;
  background-image: radial-gradient(circle at 50% 10%, rgba(139, 0, 255, 0.08), transparent 50%);
}

/* =============================================
   HEADER & NAVIGATION
   ============================================= */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 48px;
  background: rgba(10, 10, 15, 0.96);
  border-bottom: 1px solid rgba(0, 212, 255, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header img,
.header .logo img {
  width: 120px;
  max-width: 120px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.45));
}

.nav { display: flex; gap: 6px; }

.nav a {
  color: #d0d0d0;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
}

/* =============================================
   DROPDOWN MENU (Guides)
   ============================================= */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  color: #d0d0d0;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  display: block;
  transition: all 0.25s ease;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #16161f;
  min-width: 260px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #2a2a3a;
  border-radius: 10px;
  z-index: 200;
  overflow: hidden;
  padding-top: 8px; /* Empêche le gap */
}

.dropdown-content a {
  color: #e0e0e0;
  padding: 12px 18px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  border-bottom: 1px solid #222;
  transition: all 0.2s ease;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background: rgba(0, 212, 255, 0.12);
  color: #00d4ff;
  padding-left: 22px;
}

/* Garde le menu ouvert tant qu'on est dessus */
.dropdown:hover .dropdown-content,
.dropdown-content:hover {
  display: block;
}

.dropdown:hover .dropbtn {
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.1);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  text-align: center;
  padding: 70px 20px 50px;
  background: linear-gradient(180deg, #0a0a0f 0%, #160a30 100%);
}

.hero h1,
section h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
  line-height: 1.2;
}

.hero p,
section p {
  max-width: 760px;
  margin: 0 auto 10px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* =============================================
   GAME CARDS (Homepage)
   ============================================= */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  padding: 30px 20px 70px;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  position: relative;
  height: 360px;
  border-radius: 16px;
  overflow: hidden;
  background: #111118;
  transition: transform 0.4s ease;
}

.game-card:hover {
  transform: translateY(-10px);
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.15));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: white;
}

.game-card a {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 18px;
  background: linear-gradient(90deg, #00d4ff, #8b00ff);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
}

/* =============================================
   FILTERS
   ============================================= */
.filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 30px auto;
  flex-wrap: wrap;
  max-width: 900px;
  width: 100%;
  padding: 0 16px;
}

.filters button,
.filters select {
  background: #16161f;
  color: #f0f0f0;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filters button:hover,
.filters select:hover,
.filters select:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
  outline: none;
}

.filters button.active {
  background: linear-gradient(90deg, #00d4ff, #8b00ff);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.45);
}

/* =============================================
   GALLERY
   ============================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 10px 16px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

.portrait-card {
  background: #111118;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e1e2a;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
}

/* Hover preview overlay – zoomed on top 50% (face) */
.portrait-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--preview);
  background-size: 200% auto;          /* Zoom level */
  background-position: top;     /* Lock to the top */
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease, background-size 0.3s ease;
  pointer-events: none;
  border-radius: 14px;
}

.portrait-card:hover::after {
  opacity: 1;
  background-size: 220% auto;          /* Slightly more zoom on hover */
}

.portrait-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #0a0a0f;
  transition: opacity 0.25s ease;
}

.portrait-card:hover img {
  opacity: 0.15;
}

.portrait-info { 
  padding: 12px; 
  text-align: center; 
  position: relative;
  z-index: 2;
}

.download-btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #00d4ff;
  color: #00d4ff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.8rem;
  transition: all 0.25s ease;
}

.download-btn:hover {
  background: linear-gradient(90deg, #00d4ff, #8b00ff);
  color: white;
  border-color: transparent;
}

/* =============================================
   SECTIONS & FOOTER
   ============================================= */
section {
  padding: 50px 20px;
  max-width: 820px;
  margin: 0 auto;
}

section ol,
section ul {
  max-width: 600px;
  margin: 12px auto 20px;
  padding-left: 24px;
  line-height: 1.65;
  color: var(--muted);
}

section ol li,
section ul li { margin-bottom: 8px; }

footer {
  text-align: center;
  padding: 40px 20px;
  background: #050508;
  border-top: 1px solid #1e1e2a;
  color: var(--muted);
  font-size: 0.88rem;
}

footer a { color: var(--blue); text-decoration: none; }
footer a:hover { color: var(--pink); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .header { flex-direction: column; padding: 12px 20px; gap: 10px; }
  .nav { flex-wrap: wrap; justify-content: center; }
  .hero { padding: 50px 16px 40px; }
}

