@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');


/* GLOBAL RESET */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    color: #000;
    background-color: #fff;
        /* PUNKTE fuer den Hintergrund wie auf der index.html-seite */
        /* background-image: radial-gradient(#736969 1px, transparent 1px); */
        /* background-size: 25px 25px; */ 
    min-height: 100vh;
}


.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 50px;
    padding-left: 40px;
    padding-right: 20px;
}

/* === HEADER === */
header {
    background-color: #fff;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    position: static;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-name {
    font-size: 20px;
    font-weight: bold;
}

/* === NAVIGATION === */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    text-decoration: none;
    color: #000;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #d90c1a;
}

/* TILE LAYOUT */
.tile-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.tile {
    background-color: #faf7f5;
    border: 1px solid #e2dcd7;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #3e2f26;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.tile:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.tile h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

/* HEADLINE + TEXT */
h1 {
    font-size: 26px;
    margin: 0 0 20px 0;
    color: #000;
    text-align: left;
}

#description {
    font-size: 15px;
    line-height: 1.5;
    color: #000;
    text-align: left;
}

/* MAIN LAYOUT */
#main-container {
    display: flex;
    gap: 24px;
    width: 100%;
    align-items: flex-start;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* FILTERS */
#filters {
    flex: 0 0 260px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 14px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#filters label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #000;
}

#filters select,
#searchBox {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ded0c3;
    border-radius: 6px;
    background: linear-gradient(to bottom, #f7f5f2, #f0ebe6);
    color: #000;
    margin-bottom: 8px;
}

/* RESET BUTTON */
#resetButton {
    padding: 10px 16px;
    background-color: #8c715a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#resetButton:hover {
    background-color: #6d5947;
}

/* ROLE BUTTONS */
#roleFilterButtons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
}

.role-button {
    padding: 6px 12px;
    background-color: #eae2db;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #3e2f26;
    font-weight: 500;
    transition: all 0.2s ease;
}

.role-button:hover {
    background-color: #d8ccc3;
}

.role-button.active {
    background-color: #8c715a;
    color: #fff;
}

/* TOTAL COUNT */
#totalCount {
    padding-top: 10px;
    border-top: 1px solid #ded0c3;
    font-weight: 500;
    font-size: 14px;
    color: #4e3c30;
}

#totalCount .label {
    font-weight: 600;
}

#totalNumber {
    font-weight: normal;
    color: red;
}

/* GRID CONTAINER */
#grid-container {
  display: flex;
  flex-direction: row;
  gap: 24px;
  width: 100%;
  padding-bottom: 20px;
}

/* GRID */
#grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(65px, 75px));
    gap: 12px;
    padding: 12px;
    background-color: #fffaf7;
    border: 1px solid #e5d9cd;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* PAGE HEADER */
.page-number {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 11px;
    padding: 0 2px;
}

.chapter-label {
    font-weight: bold;
    color: #b4987b;
}

.page-label {
    color: #7c6b5c;
    font-weight: 500;
}

/* PAGE BOX */
.page {
    border: 1px solid #cdbdab;
    border-radius: 6px;
    width: 60px;
    height: 100px;
    background-color: #fdfbf9;
    display: flex;
    flex-wrap: wrap;
    padding: 4px;
    align-content: flex-start;
}

.page.chapter-start {
    border-left: 3px solid #8c715a;
}

/* PERSON SQUARES */
.person-square {
    width: 14px;
    height: 14px;
    margin: 2px;
    cursor: pointer;
    border-radius: 3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.person-square:hover {
    transform: scale(1.5);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

/* TOOLTIP */
.tooltip {
    position: absolute;
    padding: 10px 14px;
    background: rgba(60, 45, 35, 0.92);
    color: #fff;
    border-radius: 10px;
    font-size: 13px;
    pointer-events: none;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.25);
    max-width: 320px;
    line-height: 1.5;
    z-index: 100;
}

/* RESULTS BOX */
#resultsBox {
    flex: 0 0 250px;
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid #ded0c3;
    border-radius: 14px;
    font-size: 14px;
    position: sticky;
    top: 20px;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#resultsTitle {
    font-weight: bold;
    color: #000;
    margin-bottom: 8px;
}

#resultsList {
    line-height: 1.5;
    color: #000;
}

#resultsList span {
    font-size: 12px;
    color: #7f6b5a;
}

/* FOOTER */
footer {
    background-color: #fff;
    color: #444;
    font-size: 13px;
    text-align: center;
    padding: 50px 0 10px 0;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

footer a {
    color: #3a3aff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* INTRO IMAGE AND FLEX */
.intro-flex {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 1200px;
  margin: 40px auto;
  padding-left: 0; 
  padding-right: 0;
}

.intro-image {
  width: 160px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 0.5em;
  flex-shrink: 0;
}

.intro-text-block {
  flex: 1;
  padding-left: 20px; 
  max-width: 800px;
}


/* RESPONSIVE */
@media (max-width: 1000px) {
    #main-container {
        flex-direction: column;
        align-items: center;
    }

    #filters, #resultsBox {
        width: 90%;
        position: static;
        max-height: none;
    }

    #grid-container {
        flex-direction: column;
        align-items: center;
    }

    #grid {
        justify-content: center;
    }

    .intro-flex {
        flex-direction: column;
        align-items: center;
    }

    .intro-image {
        width: 60%;
        margin-bottom: 16px;
    }

    .intro-text-block {
        text-align: left;
        width: 100%;
    }
}
