body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    height: 100vh;
    overflow-x: hidden;
    /* スクロールを防ぐ */
}

header {
    background-color: #333;
    color: white;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
    height: 35px;
    /* ヘッダーの高さを指定 */
}

.login-button {
    margin: 0 35px 0 auto;
}

.login-button button {
    background-color: #333;
    color: #fff;
    box-shadow: none;
    border: none;
    padding: 10px 15px;
    border-radius: 30px;
    cursor: pointer;
}

.login-button button:hover {
    background-color: #555;
}

.menu-toggle {
    font-size: 24px;
    cursor: pointer;
    margin-right: 20px;
    user-select: none;
    z-index: 1002;
}

.logo img {
    width: 150px;
    margin-top: 6px;
    margin-left: -20px;
}

.sidebar {
    width: 250px;
    background-color: #333;
    color: white;
    padding: 20px;
    position: fixed;
    top: 35px;
    /* ヘッダーの高さ分だけ下に配置 */
    left: -300px;
    /* 初期状態では画面外に配置 */
    height: calc(100% - 35px);
    /* ヘッダーの高さを除いた高さを指定 */
    transition: left 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    left: 0;
    /* アクティブな時に画面内に表示 */
}

.sidebar nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar nav ul li {
    margin: 5px 0;
}

.sidebar nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 17px;
    display: block;
    padding: 10px 15px;
    border-radius: 4px;
}

.sidebar nav ul li a:hover {
    background-color: #555;
    text-decoration: none;
}

.sidebar i {
    padding: 10px;
}

.timeline-switch {
    margin: 0 5rem 0 auto;
    gap: 5px;
    color: #fff;
}

.timeline-switch button {
    background-color: #333;
    border: none;
    padding: 10px;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
}

.timeline-switch button:hover {
    background-color: #696969;
}

#timeline-dropdown {
    display: none;
    background-color: #333;
    color: #ffffff;
    border: none;
    padding: 10px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 3px;
}

main {
    margin-left: 0;
    padding: 0px 20px 20px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.content a {
    color: #0073e6;
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.post-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.post-card:hover {
    background-color: #f5f5f5;
}

textarea {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

#dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    display: none;
    z-index: 1002;
    border-radius: 5px;
}

#dropdown a {
    display: block;
    padding: 10px 15px;
    width: 100px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

#dropdown a:hover {
    background-color: #f0f0f0;
}

#logoutLink:hover {
    color: red;
}

#logoutModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#deletePostModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#PinPostModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#UnpinPostModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#ReportPostModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#NotificationModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#JSNotificationModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#MuteUserModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#BlockUserModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* モーダル本体 */
.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    margin: 10% auto;
    /* 上下の位置調整 */
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    height: 300px;
    /* モーダルの高さを指定 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* 内容を垂直方向に中央揃え */
}


/* ボタンのスタイル */
.modal-button {
    display: inline-block;
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
}

.confirm-button {
    background-color: #ff5757;
    color: white;
}

.cancel-button {
    background-color: #ccc;
    color: black;
}

.confirm-button:hover {
    background-color: #d94646;
}

.cancel-button:hover {
    background-color: #aaa;
}

.confirm-pinbutton {
    background-color: #333;
    color: white;
}

.confirm-pinbutton:hover {
    background-color: rgb(153, 150, 150);
}

.closemodal {
    background-color: #ccc;
    color: black;
}

.closemodal:hover {
    background-color: #aaa;
}

.logout-modal {
    font-size: 20px;
}

.post-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.post-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.post-modal-content textarea {
    width: 100%;
    height: 150px;
    border: none;
    border-radius: 4px;
    resize: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
}

.post-modal-content textarea:focus {
    outline: none;
    border: none;
}

.post-modal-content button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background-color: rgb(84, 212, 255);
    color: #fff;
}

.post-modal-content button:hover {
    background-color: rgb(24, 192, 248);
}

.post-modal-content button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.post-modal-content button:disabled:hover {
    background-color: #ccc;
}

.edit-post-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
    margin: 10% auto;
}

.edit-post-modal-content textarea {
    width: 100%;
    height: 150px;
    border: none;
    border-radius: 4px;
    resize: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
}

.edit-post-modal-content textarea:focus {
    outline: none;
    border: none;
}

.edit-post-modal-content button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background-color: rgb(84, 212, 255);
    color: #fff;
}

.edit-post-modal-content button:hover {
    background-color: rgb(24, 192, 248);
}

.edit-post-modal-content button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.edit-post-modal-content button:disabled:hover {
    background-color: #ccc;
}

.quote-post-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
    margin: 10% auto;
}

.quote-post-modal-content textarea {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 4px;
    resize: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
}

.quote-post-modal-content textarea:focus {
    outline: none;
    border: none;
}

.quote-post-modal-content button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background-color: rgb(84, 212, 255);
    color: #fff;
}

.quote-post-modal-content button:hover {
    background-color: rgb(24, 192, 248);
}

.quote-post-modal-content button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.quote-post-modal-content button:disabled:hover {
    background-color: #ccc;
}

.quote-post-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
    margin: 10% auto;
}

.quote-post-modal-content textarea {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 4px;
    resize: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
}

.quote-post-modal-content textarea:focus {
    outline: none;
    border: none;
}

.reply-post-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
    margin: 10% auto;
}

.reply-post-modal-content textarea {
    width: 100%;
    height: 150px;
    border: none;
    border-radius: 4px;
    resize: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
}

.reply-post-modal-content textarea:focus {
    outline: none;
    border: none;
}

.reply-post-modal-content button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background-color: rgb(32, 53, 59);
    color: #fff;
}

.reply-post-modal-content button:hover {
    background-color: rgb(24, 192, 248);
}

.reply-post-modal-content button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.reply-post-modal-content button:disabled:hover {
    background-color: #ccc;
}

#reply-post a {
    color: #0073e6;
    text-decoration: none;
}

#reply-post a:hover {
    text-decoration: underline;
}

.post-close-btn {
    background-color: rgb(200, 0, 0);
}

.post-close-btn:hover {
    background-color: rgb(255, 50, 50);
}

.ptitle {
    font-size: 20px;
    font-weight: bold;
}

.ptext {
    margin-top: -15px;
}

.post {
    padding: 10px;
    margin: 10px 0;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-size: 17px;
    display: flex;
    /* flexbox を適用 */
    flex-direction: column;
    /* 縦並び */
    justify-content: space-between;
    /* 上下のコンテンツを適切に配置 */
    margin-left: -3px;
    cursor: pointer;
}

.post:hover {
    background-color: #f5f5f5;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* 右端にメニューボタンを配置 */
    position: relative;
    gap: 10px;
}

.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-size: 14px;
    color: gray;
    margin-top: -20px;
}

.post-content {
    font-size: 15px;
    margin-top: 5px;
}

.checkmark {
    display: inline-block;
    margin-left: -2px;
    margin-top: 1px;
    vertical-align: middle;
    user-select: none;
    cursor: pointer;
}

.checkmark svg {
    margin-top: -1px;
}

.time-ago {
    margin-left: auto;
    font-size: 14px;
    color: gray;
}

.edited::after {
    content: "（編集済み）";
}

.postcontent {
    font-size: 16px;
    margin-top: 10px;
}

.postuname {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s;
    cursor: pointer;
}

.postuname:hover {
    color: #a9a9a9;
}

.post-header a {
    color: #000;
    text-decoration: none;
}

.post-header a:hover {
    color: #000;
    text-decoration: none;
}

.post-menu-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    margin-top: -40px;
    margin-left: auto;
    /* 右端に配置 */
    padding: 8px;
}

.post-menu {
    position: absolute;
    top: 30px;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10;
    width: 120px;
}

.post-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-menu li {
    padding: 10px;
    cursor: pointer;
    text-align: left;
}

.post-menu li:hover {
    background: #f0f0f0;
}

.delete-post {
    color: red;
}

.reactions {
    padding: 5px;
}

.reactions span {
    margin-right: 10px;
    cursor: pointer;
    font-size: 17px;
    transition: all 0.15s;
}

.reaction-r:hover {
    color: #3bb0f9;
}

.reaction-q:hover {
    color: #06d842;
}

.reaction-l:hover {
    color: rgb(249, 24, 128);
}

.reaction-b:hover {
    color: #f9c74f;
}

.reaction-s:hover {
    color: #3bb0f9;
}

.reaction-count {
    font-size: 14px !important;
    font-family: "Segoe UI", Meiryo, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.post-quote-container {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.post-quote-container:hover {
    background-color: #f0f0f0;
}

.quote-container {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.quote-container:hover {
    background-color: #f0f0f0;
}

.quote-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.quote-header div {
    display: flex;
    flex-direction: column;
    gap: 0px;
    /* 隙間を完全になくす */
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 6px;
    /* 画像と名前の間を詰める */
}

.quote-name {
    font-weight: bold;
    margin-bottom: 0;
    width: 100%;
}

.quote-username {
    color: gray;
    font-size: 14px;
    margin-top: -3px;
    /* さらに詰める */
    margin-left: -5px;
    width: 100%;
}

.quote-content {
    flex-grow: 1;
    text-align: left;
}

.quote-text {
    margin-top: 5px;
    margin-left: 5px;
}

.empty-state {
    padding: 24px;
    text-align: center;
    opacity: .9;
}

.empty-title {
    font-weight: 700;
    margin: 0 0 6px;
}

.empty-desc {
    margin: 0;
    font-size: 14px;
    opacity: .8;
}

.title {
    margin: 1.2rem auto 20px auto;
    position: relative;
    font-size: 25px;
    font-weight: bold;
}

.title i {
    padding: 8px;
}

.main-area {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-top: 4rem;
}
.notification-item {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px;
    border-bottom: 1px solid #eee;
    border-radius: 7px;
    cursor: pointer;
    background: #f7f7f7;
    transition: all 0.2s;
}

.notification-item:hover {
    background-color: #dcdcdc;
}

.notification-item.unread {
    background: #eaf3ff;
}

.notification-item.unread:hover {
    background: #dfecfd;
}

.notif-left-icon {
    font-size: 22px;
    width: 40px;
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

.notif-main {
    flex: 1;
}

.notif-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
}

.notif-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

.notif-name {
    font-weight: 600;
}

.notif-post {
    background: #eaeaea;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}

.notif-time {
    font-size: 12px;
    color: #888;
}


@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .modal-content {
        margin: 20% auto;
        width: 80%;
    }

    .timeline-switch {
        display: none;
    }

    #timeline-dropdown {
        display: block;
        padding: 8px;
    }
}

@media (max-width: 450px) {
    .logo img {
        width: 115px;
    }

    .ptitle {
        font-size: 25px;
        margin: 50px 0 20px 0;
    }

    .post-modal {
        z-index: 1002;
    }

    .post-modal-content {
        width: 100%;
        height: 100%;
    }

    .post-modal-content textarea {
        height: 250px;
        margin: 60px 0 20px -10px;
    }

    .edit-post-modal-content {
        height: 100%;
        margin: -3% auto;
    }

    .edit-post-modal-content textarea {
        height: 250px;
        margin: 60px 0 20px -10px;
        width: 90%;
    }

    .quote-post-modal-content {
        height: 100%;
        margin: -3% auto;
    }

    .quote-post-modal-content textarea {
        height: 150px;
        margin: 20px 0 20px -10px;
        width: 90%;
    }

    .post-quote-container {
        margin-left: -5px;
        width: 340px;
    }

    .reply-post-modal-content {
        height: 100%;
        margin: -3% auto;
    }

    .reply-post-modal-content textarea {
        height: 150px;
        margin: 20px 0 20px -10px;
        width: 90%;
    }

    .modal-content {
        margin: 40% auto;
    }

    .material-symbols-outlined {
        font-size: 17px;
    }

    .checkmark {
        margin-top: 1px;
    }

    .content {
        margin-top: 5px;
    }

    .post-content {
        word-break: break-all;
    }

    .postcontent {
        word-break: break-all;
    }
}