html {
  scroll-behavior: smooth;
}

/* === Global Styles === */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121212;
  color: #f0f0f0;
  line-height: 1.6;
}

/* === Header === */
header {
  background-color: #1e1e1e;
  padding: 2rem;
  text-align: center;
}

header h1 {
  font-size: 3rem;
  margin: 0;
}

.subtitle {
  font-size: 1.1rem;
  color: #ccc;
}

.inline-header {
  font-weight: bold;
  font-size: 1.25rem; /* podobne do h3 */
}

/* === Section Headings === */
h2 {
  border-left: 5px solid #ff4d4d;
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
  color: #ff4d4d;
}

/* === Main Layout === */
main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

section {
  margin-bottom: 3rem;
}
/* Devlog summary */
.devlog-summary {
  background-color: #2c2c2c;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 5px solid #ff4242; /* bez zmian */
  border-radius: 6px;
  font-size: 1rem;
  color: #ddd; /* jasnoczerwony, rozjaśniony odcień zamiast #ddd */
  line-height: 1.5;
}

.devlog-summary a {
  color: #ff4242; /* jaśniejszy link */
  text-decoration: none;
  transition: color 0.3s ease;
}

.devlog-summary a:hover {
  color: #ff8a8a; /* jeszcze jaśniejszy na hover */
  text-decoration: underline;
}

.devlog-summary h3 {
  margin-top: 1.5em;
  font-size: 1.2em;
  color: #ff4d4d; /* jasnoczerwony, zamiast ciemnoczerwonego */
  border-bottom: 1px solid #ff6666; /* delikatniejszy, jasny czerwony zamiast szarego */
  padding-bottom: 0.3em;
}

.devlog-summary h3:hover {
  color: #ff6b6b; /* jaśniejszy czerwony na hover */
}

/* Colapse devlog summary */

.collapsible-header {
  cursor: pointer;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5em;
  font-size: 1.1em;
  user-select: none;
}

.arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.9em;
}

.collapsible-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.collapsible-content.collapsed {
  max-height: 0;
}

.collapsible-header.collapsed .arrow {
  transform: rotate(-90deg); /* Strzałka w prawo */
}

/* === Devlog Entry === */
.entry {
  background-color: #2c2c2c;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 5px solid #ff4242;
  border-radius: 6px;
}

.entry h2 {
  color: #ffd369;
}

ul {
  padding-left: 1.2rem;
}

.note {
  font-style: italic;
  margin-top: 1rem;
  color: #aaa;
}

/* === Devlog Image === */
.devlog-img {
  width: 100%;
  max-width: 720px;
  margin: 1rem 0;
  border-left: 4px solid #ff4242;
  border-radius: 6px;
}

.devlog-video {
  width: 100%;
  max-width: 720px;
  margin: 1rem 0;
  border-left: 4px solid #ff4242;
  border-radius: 6px;
  display: block;
}

/* Special */

.specialEntry {
  background-color: #3c2f00; 
  border-left: 5px solid #d4af37; 
  box-shadow: 0 0 15px 3px rgba(212, 175, 55, 0.6); 
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  color: #fff2b8; 
}

.specialEntry h2 {
  color: #ffd369; 
  border-left: 5px solid #d4af37;
  text-shadow: 1px 1px 3px #a67c00; 
}

.special {
  background-color: #3a2b00;        /* ciemne, złoto-brązowe tło */
  border-left: 5px solid #d4a017;  /* złoto-pomarańczowy pasek po lewej */
  color: #f9e79f;                  /* jasny, ciepły złoty tekst */
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: 0 0 12px 2px rgba(212, 160, 23, 0.5);
}

.special a {
  color: #d4a017;                 /* złoty kolor linków */
  text-decoration: none;
  transition: color 0.3s ease;
}

.special a:hover {
  color: #ffbb33;                 /* jaśniejszy złoty na hover */
  text-decoration: underline;
}

/* Special Text */

.collapsible-header.special-h3,
.collapsible-header.special-h3 .arrow {
  color: #f9e79f;
}

.collapsible-header.special-h3{
  border-color: #d4a017;
}

.collapsible-header.special-h3:hover,
.collapsible-header.special-h3:hover .arrow {
  color: #d4a017; 
  cursor: pointer; 
}


.special-text {
  color: #f9e79f; /* jasny złoty kolor tekstu */
}

.special-text a {
  color: #d4a017; /* złoty kolor linków */
  text-decoration: none;
  transition: color 0.3s ease;
}

.special-text a:hover {
  color: #ffbb33;
  text-decoration: underline;
}


.special-video {
  width: 100%;
  max-width: 720px;
  margin: 1rem 0;
  border-left: 5px solid #d4af37; /* złote obramowanie po lewej */
  border-radius: 6px;
  display: block;
  box-shadow: 0 0 15px 3px rgba(212, 175, 55, 0.6); /* złota poświata */
}


/* === Sticky Header + Back Button === */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: transparent;
  padding-bottom: 5rem;
}

.red-line {
  height: 2px;
  background-color: #ff4242;
  margin: 0;
}

.action-button {
  text-align: center;
  margin: auto;
  width: 800px;
}

.action-button a {
  float: right;
  padding: 0.5rem 1rem;
  background-color: #2c2c2c;
  color: #e04343;
  border-left: 4px solid #ff4242;
  box-shadow: 0 3px 0px #1e1e1e;
  border-top: none;
  border-radius: 0;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

.action-button a:hover {
  background-color: #ff4242;
  transform-origin: top;  
  transform: scaleY(1.05);
  box-shadow: 0 0px 0px #1e1e1e;
  color: #2c2c2c;
}

.action-button a:active {
  transform: scaleY(0.95);
  box-shadow: 0 3px 0px #1e1e1e;
}

.back-button#leftie {
  background: none; /* usuń oryginalne tło */
  position: relative;
  overflow: hidden;
  color: white;
}

#GoToSummary a {
  float: left;
}


/* === Footer === */
footer {
  text-align: center;
  padding: 1rem;
  background-color: #1e1e1e;
  border-top: 1px solid #333;
  font-size: 0.9rem;
  color: #aaa;
}

/* === Contact Table === */
.contact-table {
  margin-left: 0.5rem;
  padding-left: 0.5rem;
  border-collapse: collapse;
  margin-top: 1rem;
}

.contact-table .label {
  white-space: nowrap;
  padding-right: 0.5rem;
  text-align: right;
  vertical-align: top;
  color: #f0f0f0;
}

.contact-table .divider {
  width: 2px;
  border-left: 2px solid #ff4242;
  padding: 0;
}

.contact-table td a {
  color: #ff4d4d;
  word-break: break-word;
}


/*Tech Details*/

.tech-details {
  background: rgba(20, 20, 30, 0.7);
  border-left: 3px solid #ff3355;
  padding: 15px;
  margin: 20px 0;
}

.tech-details h3 {
  margin-top: 0;
  color: #ffcc00;
}

.tech-details ul {
  padding-left: 20px;
}

.tech-details li {
  margin-bottom: 8px;
  list-style-type: '⚙️ ';
}

/**/

.highlight-text {
  color: #ff5555;
  font-weight: bold;
  font-style: italic;
}

.fun-fact {
  background: rgba(255,200,100,0.15);
  border-left: 3px solid #ffaa33;
  padding: 12px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
}

.fun-fact p {
  margin: 0;
  font-size: 0.95em;
  line-height: 1.5;
}

/* ===== KAFELKI ===== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.8rem;
}

.devlog-tile {
  background: var(--emoji-color, rgba(255, 66, 66, 0.1));
  border-left: 3px solid #ff4242;
  padding: 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none !important; /* Dodana reguła usuwająca podkreślenie */
  color: inherit;
}

.devlog-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.testing-tiles .devlog-tile {
  border-left-color: #ff4242;
}

.core-tiles .devlog-tile {
  border-left-color: #6495ed;
}

.milestone-tiles .devlog-tile {
  border-left-color: #d4af37;
}

.enemies-tiles .devlog-tile{
  border-left-color: #4caf50;
}

.tile-emoji {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.tile-link {
  color: #ff6b6b;
  font-weight: 500;
  margin-bottom: 0.3rem;
  flex-grow: 1;
  text-decoration: none !important; /* Dodana reguła usuwająca podkreślenie */
}

.core-tiles .tile-link {
  color: #7baaf7;
}

.milestone-tiles .tile-link {
  color: #78909c;
}

.tile-date {
  color: #aaa;
  font-size: 0.85rem;
}

/* === Emoji-colored Headers === */
.collapsible-header.emoji-h3 {
  border-left: 5px solid currentColor;
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.collapsible-header.emoji-h3 .arrow {
  color: inherit;
  transition: color 0.3s ease;
}

/* Specific emoji color styles */
.collapsible-header.emoji-h3[data-emoji="⚙️"] {
  color: #9e9e9e; /* Grey for gear emoji */
  border-left-color: #9e9e9e;
}

.collapsible-header.emoji-h3[data-emoji="🗺️"] {
  color: #4caf50; /* Green for map emoji */
  border-left-color: #4caf50;
}

/* Dodaj to do sekcji Emoji-colored Headers */
.collapsible-header.emoji-h3[data-emoji="🔬"] {
  color: #5d8bf4; /* Jasnoniebieski dla mikroskopu */
  border-left-color: #5d8bf4;
}

.collapsible-header.emoji-h3[data-emoji="🔬"]:hover {
  color: #7ba6f7; /* Jaśniejszy niebieski na hover */
  border-left-color: #7ba6f7;
}

.collapsible-header.emoji-h3[data-emoji="🔫"] {
  color: #546e7a; /* Steel grey-blue */
  border-left-color: #2e7d32;
}

.collapsible-header.emoji-h3[data-emoji="🔫"]:hover {
  color: #78909c; /* jaśniejszy stalowy na hover */
  border-left-color: #66bb6a;
}

/* Testing tiles (🔬 - mikroskop) */
.testing-tiles .devlog-tile {
  border-left-color: #5d8bf4; /* Jasnoniebieski */
}
.testing-tiles .tile-link {
  color: #5d8bf4 !important; /* Jasnoniebieski */
}
.testing-tiles .devlog-tile {
  --emoji-color: rgba(93, 139, 244, 0.1); /* Półprzezroczysty niebieski */
}

/* Core tiles (⚙️ - trybik) */
.core-tiles .devlog-tile {
  border-left-color: #9e9e9e; /* Szary */
}
.core-tiles .tile-link {
  color: #9e9e9e !important; /* Szary */
}
.core-tiles .devlog-tile {
  --emoji-color: rgba(158, 158, 158, 0.1); /* Półprzezroczysty szary */
}

/* Enemies & Combat tiles (🧟) */
.enemies-tiles .devlog-tile {
   /* jaśniejszy stalowy na hover */
  border-left-color: #4caf50; /* np. zielonkawy dla zombie */
}
.enemies-tiles .tile-link {
  color: #4caf50 !important;
}
.enemies-tiles .devlog-tile {
  --emoji-color: rgba(76, 175, 80, 0.15); /* półprzezroczyste zielone tło */
}


/* Milestone tiles (⭐ - gwiazdka) */
.milestone-tiles .devlog-tile {
  border-left-color: #d4af37; /* Złoty */
}
.milestone-tiles .tile-link {
  color: #d4af37 !important; /* Złoty */
}
.milestone-tiles .devlog-tile {
  --emoji-color: rgba(212, 175, 55, 0.2); /* Półprzezroczysty złoty */
}

/* Roadmap tiles (🗺️ - mapa) */
.roadmap-tiles .devlog-tile {
  border-left-color: #4caf50; /* Zielony */
}
.roadmap-tiles .tile-link {
  color: #4caf50 !important; /* Zielony */
}
.roadmap-tiles .devlog-tile {
  --emoji-color: rgba(76, 175, 80, 0.1); /* Półprzezroczysty zielony */
}


/* Hover effects */
.collapsible-header.emoji-h3:hover {
  opacity: 0.8;
}

.collapsible-header.emoji-h3:hover .arrow {
  opacity: 0.8;
}

/* Special Tile */
.special-tile {
  background: rgba(212, 175, 55, 0.2) !important;
  border-left-color: #d4af37 !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }
  
  .devlog-tile {
    padding: 0.8rem;
  }
}

/* === Base Mobile Styles === */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  /* Header */
  header {
    padding: 1.5rem 1rem;
  }
  
  header h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  /* Main Layout */
  main {
    padding: 0 0.5rem;
    margin: 1rem auto;
  }

  /* Devlog Entries */
  .entry, .specialEntry {
    padding: 1rem;
    margin-top: 60px;
    margin-bottom: 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Navigation */
  .sticky-header {
    padding-bottom: 3rem;
  }

  .action-button {
    width: 100%;
    padding: 0 0.5rem;
  }

  .action-button a {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  /* Collapsible Sections */
  .collapsible-header {
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  /* Images and Videos */
  .devlog-img, 
  .devlog-video,
  .special-video {
    max-width: 100%;
    margin: 0.5rem 0;
  }

  /* Tables */
  .contact-table {
    width: 100%;
  }

  .contact-table .label {
    padding-right: 0.3rem;
    font-size: 0.9rem;
  }

  /* Footer */
  footer {
    padding: 1rem 0.5rem;
    font-size: 0.8rem;
  }
}



/* === Small Mobile Devices === */
@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .entry, .specialEntry {
    padding: 0.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .action-button a {
    padding: 0.4rem;
  }

  /* Tech Details */
  .tech-details {
    padding: 10px;
  }

  .tech-details li {
    font-size: 0.9rem;
  }
}

/* === Global Improvements === */
img, video {
  max-width: 100%;
  height: auto;
}

/* Prevent horizontal scrolling */
body {
  overflow-x: hidden;
}

/* Better touch targets */
a, button {
  min-width: 44px;
  min-height: 44px;
}