@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Outfit:wght@100..900&display=swap");

:root {
    --header-color: #1f282f;
    --main-color: #14181c;
    --footer-color: #2c3440;
    --muted-color: rgb(153, 170, 187);
    --muted-color-hover: rgba(153, 170, 187, 0.05);

    --accent-color: rgb(0, 172, 28);
    --remove-color: rgb(255, 128, 0);
    --accent-color-hover: rgba(0, 172, 28, 0.85);
    --accent-color-active: rgba(0, 172, 28, 0.65);
    --accent-color-background: rgba(0, 172, 28, 0.15);
    --remove-color-background: rgba(255, 128, 0, 0.15);
    --input-background-color: #ccddee;
    --input-color: #556677;
    --white-color: #fafafa;

    --title-font: "Noto Sans JP";
    --primary-font: "Outfit";
}

/* Basic CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul {
    list-style-type: none;
}

a {
    text-decoration: none;
}

body {
    font-family: var(--primary-font);
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}

/* Header */
.page-header {
    background-color: var(--header-color);
    padding: 0.5rem 1.5rem;
}

.header-content {
    max-width: 1500px;
    margin: 0 auto;
}

.header-title {
    font-family: var(--title-font);
    color: var(--white-color);
}

/* Main */
.page-main {
    flex: 1;
    padding: 2rem 1.5rem;
    color: var(--white-color);
    background-color: var(--main-color);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.actions {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: end;
}

.btn {
    font-weight: 600;
    border: none;
    cursor: pointer;
    padding: 0.6rem 1rem;
    border-radius: 0.2rem;
    color: var(--white-color);
    background-color: var(--accent-color);
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-color-hover);
}

.btn:active {
    background-color: var(--accent-color-active);
}

.list {
    min-width: auto;
    width: 100%;
    max-width: 1000px;
    border-radius: 0.2rem;
    border: 2px solid var(--footer-color);

    display: flex;
    flex-direction: column;
}

.book {
    width: 100%;
    border-radius: 0.2rem;
    padding: 0.8rem 1.2rem;

    display: flex;
    justify-content: space-between;
}

.book:hover {
    background-color: var(--muted-color-hover);
}

.book-content {
    display: flex;
    gap: 1.2rem;
}

.book-image {
    height: 140px;
    min-height: 140px;
    max-height: 140px;

    width: 95px;
    min-width: 95px;
    max-width: 95px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

.book-image.read {
    border: 2px solid var(--accent-color);
    background-color: var(--accent-color-background);
}

.book-image.unread {
    border: 2px solid var(--remove-color);
    background-color: var(--remove-color-background);
}

.book-information {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-title {
    font-size: 1.8rem;
    font-weight: 600;
}

.book-author {
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted-color);
}

.book-pages {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--white-color);
}

.book-option {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

@media (max-width: 480px) {
    .book-option {
        flex-direction: column;
    }
}

.book-icon {
    width: 1.4rem;
    height: 1.4rem;
}

.read-btn {
    color: var(--white-color);
    cursor: pointer;
}

.has-read {
    color: var(--accent-color) !important;
}

.read-btn:hover {
    color: var(--accent-color);
}

.remove-btn {
    cursor: pointer;
}

.remove-btn:hover {
    color: var(--remove-color);
}

.list.empty {
    height: 400px;

    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.empty-list-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.empty-list-message {
    text-align: center;
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted-color);
}

@media (max-width: 768px) {
    .list.empty {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .list.empty {
        height: 250px;
    }
}

/* Footer */
.page-footer {
    background-color: var(--footer-color);
    padding: 0.5rem 1rem;

    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
}
.page-footer,
.footer-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;

    width: 100%;
    height: 100%;
    padding: 0 2rem;
    transition: background-color 0.3s ease;

    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal.active {
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    background-color: var(--footer-color);
    padding: 1.5rem 1.5rem;
    border-radius: 0.2rem;

    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

.modal-header {
    width: 100%;

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

.modal-title {
    color: var(--muted-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    font-size: 1.8rem;
    color: var(--muted-color);
    transition: color 0.2s ease;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--white-color);
}

.modal-main {
    width: 100%;
    padding: 0 2rem;
}

.modal-form {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-form label {
    color: var(--white-color);
    font-size: 1rem;
    font-weight: 500;
}

.modal-form input {
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--input-color);
    border: none;
    border-radius: 0.2rem;
    outline: none;
    background-color: var(--input-background-color);
    transition: background-color 0.2s ease;
}

.modal-form input:focus {
    background-color: var(--white-color);
}

.boolean-field {
    display: flex;
    gap: 0.8rem;
}
