#loginStatus {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999998;
    display: flex;
    align-items: center;
    gap: 8px;
}

#loginButton {
    color: #32CD32;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #32CD32;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#loginButton:hover {
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
    transform: translateY(-1px);
}

#userStatus.logged-in {
    background-color: #32CD32;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: default;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#logoutButton {
    color: #666;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
}

#logoutButton:hover {
    opacity: 1;
    transform: translateY(-1px);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

#logoutButton svg {
    vertical-align: middle;
    filter: drop-shadow(0 0 0.6px white) 
            drop-shadow(0 -0.6px 0 white)
            drop-shadow(0 0.6px 0 white)
            drop-shadow(-0.6px 0 0 white)
            drop-shadow(0.6px 0 0 white);
}

.logged-in {
    background-color: #32CD32;
    color: white;
}



.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}
.login-form {
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 15px;
}
input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
}
button {
    padding: 10px 15px;
    margin: 5px;
    cursor: pointer;
}
.error-message {
    color: red;
    margin-top: 10px;
    display: none;
}
.signup-link {
    margin-top: 20px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.signup-link a {
    color: #32CD32;
    text-decoration: none;
    font-size: 0.9em;
}

.signup-link a:hover {
    text-decoration: underline;
}
#emailLogin {
    display: block;  /* ブロック要素として配置 */
    width: 200px;    /* 適度な幅 */
    margin: 20px auto;  /* 上下余白をつけて中央配置 */
    background-color: #32CD32;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 10px 15px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}
#emailLogin:hover {
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
    transform: translateY(-1px);
}
#emailSignup {
    display: block;  /* ブロック要素として配置 */
    width: 200px;    /* 適度な幅 */
    margin: 20px auto;  /* 上下余白をつけて中央配置 */
    background-color: #32CD32;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 10px 15px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}
#emailSignup {
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
    transform: translateY(-1px);
}



.favorite-button-container {
    align-self: flex-start;
    padding-bottom: 5px;
}

.favorite-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);  /* タップハイライトを透明に */
    -webkit-touch-callout: none;    /* iOSでの長押しメニューを無効化 */
    -webkit-user-select: none;      /* 選択を防ぐ */
    user-select: none;
    -webkit-appearance: none;       /* デフォルトスタイルを削除 */
    appearance: none;
}

/* すべてのインタラクション状態でスタイルをリセット */
.favorite-button:hover,
.favorite-button:focus,
.favorite-button:active,
.favorite-button:focus-visible {
    outline: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    background: none;
}

.star-icon {
    fill: transparent;
    stroke: #FFD700;
    stroke-width: 2;
    transition: fill 0.3s ease;
    pointer-events: none;  /* アイコン自体のイベントを無効化 */
}

.star-icon.active {
    fill: #FFD700;
}



.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    padding: 20px 0;
}
.favorite-item {
    text-align: center;
}
.favorite-book-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.no-image {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #666;
}
.no-favorites {
    text-align: center;
    color: #666;
    padding: 20px 0;
}



/* お気に入り表示用の追加CSS */
#favorites-results {
    padding: 20px;
    margin: 0 auto;
}

#favorites-results .row {
    display: grid;
    gap: 1.5rem;
    justify-content: center;
    margin: 0 auto;
    max-width: 1400px;
}

/* レスポンシブグリッド */
#favorites-results .row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media screen and (min-width: 768px) {
    #favorites-results .row {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media screen and (min-width: 992px) {
    #favorites-results .row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (min-width: 1200px) {
    #favorites-results .row {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 下部のバーとシャドウ */
#favorites-results .row > .col:nth-last-child(n) {
    border-bottom: 7px solid #8d8d8d;
    margin-bottom: 1.5rem;
    filter: drop-shadow(5px 5px 5px #aaa);
}

/* レスポンシブ対応の区切り線 */
@media (max-width: 991px) {
    #favorites-results .row > .col:nth-last-child(n) {
        border-bottom: 7px solid #8d8d8d;
        filter: drop-shadow(5px 5px 5px #aaa);
    }
}

@media (max-width: 767px) {
    #favorites-results .row > .col:nth-last-child(n) {
        border-bottom: 7px solid #8d8d8d;
        filter: drop-shadow(5px 5px 5px #aaa);
    }
}

@media (max-width: 575px) {
    #favorites-results .row > .col:nth-last-child(n) {
        border-bottom: 7px solid #8d8d8d;
        filter: drop-shadow(5px 5px 5px #aaa);
    }
}

/* ホバーエフェクト */
#favorites-results .book-card-2:hover {
    transform: translateY(-5px);
    cursor: pointer;
}