html, body {
    height: 100%;
    margin: 0;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    background-color: #f9f9f9;
    color: #333;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #F2F2F2;
    border-bottom: 1px solid #ddd;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.page-header .container {
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-logo {
    position: absolute;
    left: 20px;
    height: 40px;
}

.main-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #6e0004;
    margin: 0;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

/* Media query for screens below 1024px */
@media (max-width: 1023px) {
    .page-header .container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .header-logo {
        position: static;
        margin: 0 0 10px 0;
        height: 40px;
    }

    .main-title {
        white-space: normal;
        text-align: center;
        flex: none;
        font-size: 1.5rem;
        margin: 0;
        max-width: 90vw;
    }
}

/* For very small devices, smaller logo and font */
@media (max-width: 480px) {
    .header-logo {
        height: 30px;
    }

    .main-title {
        font-size: 1.25rem;
    }
}

.page-wrapper {
    flex: 1;
    max-width: 1140px;
    margin: 1.5rem auto 0 auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.toggle-all-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.toggle-all-header .material-icons {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
}

.card-header:hover {
    background-color: #f1f1f1;
}

.card-header .material-icons {
    transition: transform 0.3s ease;
}

.card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.2rem;
}

.card-content.open {
    padding: 1rem 1.2rem;
    max-height: none;
    overflow: visible;
}

.card-content a {
    display: flex;
    align-items: center;
    margin: 0.75rem 0;
    text-decoration: none;
    color: #636363;
}

.card-content a:hover, .card-content a.active {
  background-color: #F2F2F2;
  border-radius: 4px;
}

.rotate {
    transform: rotate(180deg);
}

.card.nested {
    margin: 0.5rem 0 0 1rem;
    box-shadow: none;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.card.nested .card-header {
    font-size: 0.95rem;
    background-color: #f9f9f9;
}

footer {
    min-height: 60px;
    background-color: #303030;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    padding: 0 20px;
    box-sizing: border-box;
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    background-color: #ED6631;
    color: white;
    border: none;
    outline: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background-color 0.3s;
}

#scrollTopBtn:hover {
    background-color: #b24d25;
}

#scrollTopBtn .material-icons {
    font-size: 24px;
}

.node-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 24px;
}

.node-children.open {
  max-height: 300px;
}

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  margin-right: 8px;
  line-height: 1.2;
}

.folder-icon {
  color: #333333;
  display: flex;
  align-items: center;
}

.file-icon {
  color: #636363;
  margin-right: 6px;
  vertical-align: middle;
}

.node-children a {
  display: flex;
  align-items: center;
  padding: 2px 0;
  color: #636363;
  text-decoration: none;
  font-size: 0.95rem;
}

.node-children a:hover, .node-children a.active {
  background-color: #F2F2F2;
  border-radius: 4px;
}

/* Divider */
hr.divider {
    border: none;
    height: 1px;
    background-color: #ccc;
    margin: 2rem 0;
}

.node-label {
    cursor: pointer;
    color: #333333;
    display: flex;
    align-items: center;
}

.toggle-node {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0.25rem 0;
}

.file-link {
    display: flex;
    align-items: center;
}

.page-header .lang-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 1rem;
  color: #333333;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.english-only {
  color: #ED6631;
  margin-left: 0.5rem;
}
