body {
    margin: 0;
    background: #6d2d8d;
    color: white;
    font-family: "Jua", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.jua-regular {
    font-family: "Jua", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* YEAR BAR */

#year-bar {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 40px;
    user-select: none;
}

.year {
    font-size: 28px;
}

.faded {
    opacity: 0.4;
    font-size: 20px;
}

/* CALENDAR */

#calendar {
    margin-top: 30px;
    width: 97vw;
}

/* MONTH HEADER */

#month-header {
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
}

.arrow {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border-top: 3px solid white;
    border-right: 3px solid white;
    cursor: pointer;
}

.left {
    transform: rotate(-135deg);
}

.right {
    transform: rotate(45deg);
}

#month-name {
    font-weight: bold;
    font-family: "Jua", sans-serif;
}

/* GRID */

#weekdays,
#days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-family: "Jua", sans-serif;
}

/* WEEK ROW */

.weekday {
    padding: 8px 0;
    text-align: center;
}

.sun {
    background: #ffb53b;
}
.mon {
    background: #f3900d;
}
.tue {
    background: #ffb53b;
}
.wed {
    background: #f3900d;
}
.thu {
    background: #ffb53b;
}
.fri {
    background: #f3900d;
}
.sat {
    background: #ffb53b;
}

/* DAY CELLS */

.day {
    height: 50px;
    position: relative;
}

.day.sun {
    background: #ffb53b;
}
.day.mon {
    background: #f3900d;
}
.day.tue {
    background: #ffb53b;
}
.day.wed {
    background: #f3900d;
}
.day.thu {
    background: #ffb53b;
}
.day.fri {
    background: #f3900d;
}
.day.sat {
    background: #ffb53b;
}

/* DAY NUMBER BADGE */

.badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(24, 0, 173, 0.5);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
}

.day-number {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 12px;
}

.value-badge {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(24, 0, 173, 0.5);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
}

#result-box {
    width: 95vw;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    font-family: "Jua", sans-serif;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.result-card {
    flex: 1 1 200px;
    background: #663672;
    color: white;
    border-radius: 12px;
    padding: 12px;
}

.card-content {
    margin-top: 6px;
    font-size: 14px;
}
#lo-shu-box {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(4, 60px);
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
}

/* Lo Shu grid cells */
#lo-shu-box div {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: white;
    border: 1px solid white;
    text-align: center; /* center text inside the cell */
}

/* Separate results box for day-specific cards (Lo Shu, etc.) */
#day-results-box {
    width: 97vw;
    background: rgba(0, 0, 0, 0.5); /* same as result-box */
    padding: 5px;
    font-family: "Jua", sans-serif;
    display: flex;
    flex-direction: column;
    gap: 20px;

    /* center text/content inside the box */
    align-items: center; /* centers children horizontally */
    justify-content: center; /* centers children vertically if needed */
    text-align: center; /* centers text inside child elements */
}
