@import url('https://fonts.googleapis.com/css2?family=Bitcount+Prop+Single:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bitcount+Prop+Double:wght@100..900&display=swap');

:root {
  --primary-blue: #3570E5;
  --highlight-yellow: #ECE000;
  --bg-light: #ffffff;
  --bg-dark: #000000;
  --grid-light: rgba(0,0,0,0.15);
  --grid-dark: rgba(255,255,255,0.25);
  --text-light: #000000;
  --text-dark: #ECE000;
  
  --header-footer-bg: #1e1e1e;
  --header-footer-text: #bb86fc;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color 0.3s, color 0.3s;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  --scroll-x: 0px; 
  --scroll-y: 0px;
}

p {
  font-family: "Bitcount Prop Single", system-ui, sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
}

ul {
  font-family: "Bitcount Prop Single", system-ui, sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
}

li {
  font-family: "Bitcount Prop Single", system-ui, sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Bitcount Prop Double", system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 372;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 200%; height: 200%;
  background-image: 
    linear-gradient(to right, var(--grid-light) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-light) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
  background-position: var(--scroll-x) var(--scroll-y);
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

body.dark::before {
  background-image: 
    linear-gradient(to right, var(--grid-dark) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-dark) 1px, transparent 1px);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--header-footer-bg); 
  border-bottom: 1px solid var(--header-footer-text);
}

header a {
  text-decoration: none; 
  display: inline-block; 
  transition: opacity 0.2s ease-in-out;
}

h1 { 
  margin: 0; 
  font-size: 1.8rem; 
  color: var(--highlight-yellow); 
}

header a:hover {
  opacity: 0.8; 
}

body.dark h1 { 
  color: var(--highlight-yellow); 
}

h2, h3 { color: var(--primary-blue); }

.menu { position: relative; display: inline-block; }
.menu input { display: none; }
.menu-icon { width: 30px; height: 22px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.menu-icon span { display: block; height: 4px; background: var(--primary-blue); border-radius: 2px; transition: 0.3s; }
body.dark .menu-icon span { background: var(--text-dark); } 

nav { 
  position: absolute; right: 0; top: 50px; 
  background: var(--bg-light); border: 1px solid var(--primary-blue); 
  border-radius: 6px; display: none; flex-direction: column; 
  padding: 0.5rem 0; 
  min-width: 170px;
  z-index: 10;
}
body.dark nav { 
  background: var(--bg-dark); 
  border: 1px solid var(--text-dark);
}

nav a { text-decoration: none; padding: 0.5rem 1rem; color: var(--primary-blue); font-weight: bold; transition: background 0.2s; }
body.dark nav a { color: var(--text-dark); }
nav a:hover { background-color: var(--primary-blue); color: var(--highlight-yellow); }
body.dark nav a:hover { background-color: var(--text-dark); color: var(--bg-dark); }
.menu input:checked ~ nav { display: flex; }

.toggle-btn { 
  cursor: pointer; padding: 0.3rem 0.6rem; 
  border: 1px solid var(--primary-blue); border-radius: 4px; 
  background: none; color: var(--primary-blue); 
  font-weight: bold; transition: 0.3s; margin-left: 1rem; 
}
.toggle-btn:hover { background: var(--primary-blue); color: var(--highlight-yellow); }

body.dark .toggle-btn {
  border-color: var(--text-dark);
  color: var(--text-dark);
}
body.dark .toggle-btn:hover {
  background: var(--text-dark);
  color: var(--bg-dark);
}

main { 
  text-align: center; padding: 4rem 2rem; 
  max-width: 900px; margin: 0 auto; 
  flex-grow: 1;
}
.profile-pic { 
  width: 200px; height: 200px; border-radius: 50%; 
  border: 4px solid var(--primary-blue); 
  object-fit: cover; margin-bottom: 1.5rem; 
}
body.dark .profile-pic {
  border-color: var(--text-dark);
}

section { margin: 3rem 0; text-align: left; }
section p { line-height: 1.5; }

.spotify-embed { 
  margin-top: 2rem; 
  display: flex; 
  justify-content: center; 
}

iframe { 
  border-radius: 12px; 
}

footer { 
  text-align: center; padding: 1rem; 
  background-color: var(--header-footer-bg);
  border-top: 1px solid var(--header-footer-text); 
  color: var(--header-footer-text); 
}

.visitor-counter {
  background-color: #880088;
  border: 2px dashed #00FF00;
  padding: 10px 15px;
  margin: 4rem auto 2rem auto;
  max-width: 250px;
  text-align: center;
  font-family: 'Bitcount Prop Single', monospace;
  color: #FFFF00;
  box-shadow: 5px 5px 0px 0px #000000;
  animation: flicker 1.5s infinite alternate;
}

.visitor-counter p {
  margin: 0 0 8px 0;
  font-size: 1.1em;
  line-height: 1;
}

body.dark .visitor-counter {
    background-color: #550055;
    border-color: #00AA00;
    color: #DDDD00;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.95; }
}

.log-section {
    font-family: "Bitcount Prop Single", system-ui, sans-serif;
    font-weight: 400;
    font-style: normal;
    padding: 2rem;
    margin: 3rem 0;
    border: 1px solid var(--primary-blue);
    border-radius: 8px;
    text-align: left;
    position: relative;
}

body.dark .log-section {
    border-color: var(--text-dark);
}

.log-date {
    position: absolute;
    top: -0.75rem;
    left: 1rem;
    background: var(--bg-light);
    color: var(--primary-blue);
    padding: 0 0.5rem;
    font-size: 0.8rem;
    font-family: "Bitcount Prop Single", system-ui, sans-serif;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
}

body.dark .log-date {
    background: var(--bg-dark);
    color: var(--text-dark);
}

.log-section h3 {
    font-family: "Bitcount Prop Single", system-ui, sans-serif;
    font-weight: 400;
    font-style: normal;
    margin-top: 0;
    padding-top: 0;
}

.log-section ul {
    font-family: "Bitcount Prop Single", system-ui, sans-serif;
    font-weight: 400;
    font-style: normal;
    list-style: square;
    padding-left: 20px;
    margin-top: 1rem;
}

.log-section li {
    margin-bottom: 0.5rem;
}

.book-list {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    position: relative;
    min-height: 200px;
    align-items: flex-start;
}

.book-item {
    width: 60px;
    height: 150px;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-item:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6);
}

.book-color-A { background-color: #FF69B4; }
.book-color-B { background-color: #00FFFF; }

.book-info {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 250px;
    width: auto;
    max-width: 350px;
    padding: 8px 12px;
    background-color: #333333;
    color: #FFFFFF;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: normal;
    overflow: visible;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.book-item:hover .book-info {
    opacity: 1;
    transform: translateY(0);
}
