.back-button {
    position: absolute;
    left: 20px;
    top: 36px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.archive-loader {
    width: 70px;
    height: 70px;
    /* margin: 0 auto; */
}

.loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    width: 100%;
}

.archive-page {
    width: 100%;
    max-width: 732px;
    margin: 0 auto;
    padding: 20px 0px;
    box-sizing: border-box;
    overflow-y: auto;
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

.loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    width: 100%;
}

.archive-loading {
    color: #2D2D2D;
    font-family: Outfit;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

/* html, body {
    height: 100%;
} */

/* body {
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
} */

.archive-title {
    color: var(--txt-primary);
    text-align: center;
    font-family: Outfit;
    font-size: 28px;
    font-weight: 600;
    ;
    letter-spacing: 2.24px;
    text-transform: uppercase;
}

.archive-description {
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
    padding: 0px 10px;
    color: var(--txt-primary);
    /* color: #2D2D2D; */
    text-align: center;
    font-family: Poppins;
    font-size: 20px;
    font-weight: 500;
}

.archive-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.tab {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
}

.tab.active {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

.archive-stats {
    width: 378px;
    margin: 0 auto 30px;
    font-family: 'Outfit', sans-serif;
    color: #2D2D2D;
    width: 100%;
}

.archive-stats-val {
    width: 50%;
    text-align: center;
    color: var(--txt-primary);
    text-align: center;
    font-family: Outfit;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3.2px;
}

.archive-stat-key {
    width: 50%;
    text-align: right;
    /* color: #2D2D2D; */
    color: var(--txt-primary);
    text-align: right;
    font-family: Outfit;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 3.2px;
}

.archive-stat-key .five-star {
    width: 162px;
    height: 28px;
}

.stats-row {
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 23px 20px;
    /* border-top: 0.75px solid #636363; */
    border-bottom: 0.75px solid #63636387;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    /* opacity: 0.7; */
}

.stats-row .five-stars {
    gap: 2px;
    text-align: right;
    width: 50%;
}

.stats-row .star-filled {
    color: #FFD233;
    font-size: 20px;
    width: 50%;
    text-align: right;
}

.archive-sort-buttons {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 34px;
    padding: 0px 10px;
    gap: 15px;
}

.sort-button {
    width: 230px;
    height: 66px;
    border-radius: 13.204px;
    border: 1.524px solid #B0B0B0;
    background: var(--bg-secondary);
    box-shadow: 0px 4.063px 0px 0px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    font-weight: 500;
    /* color: #2D2D2D; */
    letter-spacing: 0.5px;
    color: var(--txt-primary);
    text-align: center;
    font-family: Poppins;
    font-size: 20px;
}

.sort-button img {
    width: 15px;
    height: 15px;
}

.archive-list {
    flex: 1 1 auto;
    min-height: 0;
    /* overflow-y: auto; */
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    /* gap: 22px; */
}

.archive-item {
    /* background-color: #FFFFFF; */
    border-radius: 20px;
    margin: 0 20px 12px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

/* .archive-item:hover {
    transform: translateY(-2px);
} */

.archive-error {
    text-align: center;
    color: #ff0000;
    margin: 20px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.retry-button {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #4a4a4a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

/* .retry-button:hover {
    background-color: #3a3a3a;
} */



.archive-item-content {
    /* background: #FFFFFF; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: 8px;
    /* box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.08); */
    /* border-radius: 20px; */
    background: var(--bg-secondary);
    width: 100%
}

.item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-number {
    color: var(--txt-primary);
    font-family: Outfit;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
}

.item-number::before {
    content: "#";
}

.item-date {
    opacity: 0.6;
    color: var(--txt-secondary);
    font-family: Outfit;
    font-size: 16px;
    font-weight: 400;
}

.item-status {
    display: flex;
    align-items: center;
}

.status-text {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.unattempted {
    color: var(--txt-secondary);
    /* color: #CCC; */
    text-align: center;
    font-family: Outfit;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 3.84px;
}

.broken-heart {
    width: 35px;
    /* height: 24px; */
}

.archive-item-stars {
    display: flex;
    gap: 4px;
}

/* .archive-list::-webkit-scrollbar {
    scrollbar-width: none;
} */

.archive-item-stars .star-filled {
    color: #FFD233;
    font-size: 20px;
}

.archive-item-stars .star-empty {
    color: #D9D9D9;
    font-size: 20px;
    border-radius: 10px;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05);
}

.item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.archive-item-id {
    color: #000;
    font-family: Outfit;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 3.2px;
    text-transform: uppercase;
}

.archive-item-date {
    color: #000;
    font-family: Outfit;
    font-size: 9px;
    font-weight: 400;
}

.archive-item-stars {
    display: flex;
    gap: 4px;
    align-items: center;
}

.archive-star {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.statkey {
    width: 50%;
    text-align: right;
}

.statvalue {
    width: 50%;

}

.stats-row:first-child {
    border-top: 0.75px solid var(--bg-secondary);
}

/* Desktop styles */
@media (min-width: 768px) {
    .archive-item {
        /* width: 100%; */
        max-width: 694px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        height: 75px;
    }

    /* .archive-item:hover {
        transform: translateY(-2px);
    } */

    .archive-item-content {
        padding: 15px 30px;
        /* width: 90vw; */
        width: 100%;
    }

    .archive-item-id {
        font-size: 24px;
    }

    .archive-item-date {
        font-size: 12px;
    }

    .archive-item-stars {
        font-size: 24px;
    }

    .archive-title {
        /* font-size: 32px; */
        margin-bottom: 16px;
    }

    .archive-description {
        font-size: 16px;
        max-width: 80%;
        margin: 0 auto 32px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .archive-title {
        /* color: #2D2D2D; */
        text-align: center;
        font-family: Outfit;
        font-size: 20px;
        font-weight: 600;
        letter-spacing: 1.6px;
    }

    .archive-description {
        /* color: #2D2D2D; */
        text-align: center;
        font-size: 14px;
        font-weight: 500;
    }

    .archive-stats {
        width: 100%;
        /* max-width: 378px; */
        margin: 0 auto 20px;
    }

    .stats-row {
        height: 36px;
        font-size: 14px;
    }

    .archive-item {
        /* width: 328px; */
    }

    .archive-item-content {
        padding: 10px 15px;
        width: 100%;
    }

    .archive-item-id {
        font-size: 20px;
    }

    .archive-item-date {
        font-size: 9px;
    }

    .archive-item-stars {
        font-size: 20px;
    }


}

@media (max-width: 480px) {
    .archive-description {
        font-size: 14px;
        font-weight: 500;
    }

    .archive-item-content {
        padding: 15px 30px;
        width: 90vw;
    }

    .archive-stat-key {
        font-size: 14px;
        font-weight: 500;
    }

    .archive-stats-val {
        font-size: 16px;
        font-weight: 500;
    }

    .sort-button {
        width: 150px;
        height: 42px;
        font-size: 11px;
        font-weight: 400;
    }

    .sort-button img {
        width: 9px;
        height: 8px;
    }

    .archive-sort-buttons {
        gap: 20px;
    }


    .item-number {
        font-size: 20px;
        font-weight: 500;
        letter-spacing: 3.2px;
    }

    .item-date {
        font-size: 9px;
        font-weight: 400;
    }

    .unattempted {
        font-size: 16px;
        letter-spacing: 2.56px;
        font-weight: 400;
    }

    .archive-stat-key .five-star {
        width: 100px;
        height: 17px
    }

    .archive-star {
        width: 24px;
        height: 24px;
    }

    .broken-heart {
        width: 25px;
        /* height: 24px; */
    }
}