:root {
  --bg-color: #1a0b2e;
  --bg-image: none;
  --text-color: #eee;
  --accent: #ffcc00;
  --border-color: #5a001a;
	--content-width: 1200px;
}

body.theme-home {
  --bg-color: #090314;
  --accent: #b100ff;
  --border-color: #2a0a4a;

  background-color: var(--bg-color);
  background-image: none;
}

#constellation-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.theme-home #constellation-canvas {
  opacity: 1;
}

body.theme-games {
  --bg-color: #02040a; 
  --accent: #ffd700;   
  --border-color: #967935;

  background-color: var(--bg-color);

  background-image: 
    /* Vignette */
    radial-gradient(circle at center, transparent 40%, #010103 95%),

    /* Grid */
    linear-gradient(rgba(255, 215, 0, 0.1) 4px, transparent 4px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.1) 4px, transparent 4px);
  
  background-size: 100% 100%, 8vw 8vw, 8vw 8vw;
  
  background-position: center center;
  background-attachment: fixed;
}

body.theme-books {
  --bg-color: #030d10;
  --accent: #00d4ff;
  --border-color: #0b3d45;
  
  background-color: var(--bg-color);

  background-image: radial-gradient(
    80% 75% ellipse at center, 
    rgba(12, 100, 110, 0.9) 0%,   
    rgba(8, 60, 70, 0.5) 45%,
    transparent 75%
  );

  background-attachment: fixed;
  background-size: cover;
}

body.theme-movies {
  --bg-color: #110508;
  --accent: #fa4354;
  --border-color: #400717;
	background-color: var(--bg-color);

	background-image: radial-gradient(
    80% 75% ellipse at center, 
    rgba(106, 4, 15, 0.9) 0%,   
    rgba(106, 4, 15, 0.5) 45%,
    transparent 75%
  );

	background-attachment: fixed;
	background-size: cover;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-color);
  transition: background-color 0.4s ease, background-image 0.4s ease;
}

/* Navigation */
nav {
  background-color: #000;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #333;
}

.nav-container {
	max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  gap: 1rem;
}

.tab-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
}

.tab-btn:hover, .tab-btn.active {
	color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.tab-content {
  display: none;
	max-width: var(--content-width);
  margin: 2rem auto;
  padding: 0 1rem;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-container.compact {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
}

/* Cards (Generic) */
.card {
	background-color: transparent;
	border: none;
  border-radius: 0;
	overflow: visible;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}


.card:hover .thumb {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.9);
  border-color: var(--accent);
}

.thumb {
  width: 100%;
  aspect-ratio: 16/9;
	background-size: 100% 100%;
  background-position: center;
  background-color: #333;
	border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.poster-thumb {
  aspect-ratio: 2/3;
	background-size: cover;
}

.card-info {
	text-align: center;
	padding: 0.3rem 0.2rem 0;
  display: flex;
  flex-direction: column;
	align-items: center;
}

.card-info h3 {
  margin: 0 0 2px 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: #bbb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card-info .author {
  font-size: 0.9rem;
  color: #888;
  display: block;
  margin-bottom: 0.5rem;
}

.card-info .author:empty {
  display: none; 
}

.rating {
  color: #ffd700;
  letter-spacing: 2px;
  font-size: 1.1rem;
	padding: 0.0rem 0.0rem 0;
}

/* Game Card Specifics */
.play-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover .play-overlay {
  opacity: 1;
}

.play-overlay i {
  font-size: 3rem;
  color: #fff;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.8));
}

.game-header {
  display: flex;
	justify-content: space-between;
	flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.game-header h3 {
  margin: 0;
  text-align: left;
	white-space: nowrap;
}

.game-badges {
  display: flex;
  gap: 12px;
  color: #aaa;
  justify-content: center;
  font-size: 1.1rem;
	margin-left: auto;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
	border: 3px solid var(--accent);
}
