/* 全体のスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f8fa;
    color: #1a1a1a;
    padding-top: calc(60px + 1rem); /* ナビゲーションバーの高さ + 余白 */
}

/* ナビゲーションバー */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(239, 243, 244, 0.5);
    padding: 0.75rem 1rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    min-height: 60px;
    transition: box-shadow 0.2s ease;
}

.navbar.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: #1d9bf0;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.2s ease;
}

.navbar-brand:hover {
    color: #1a8cd8;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    border: 1px solid #eff3f4;
    border-radius: 8px;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    border-color: #1d9bf0;
}

.navbar-toggler-icon {
    height: 1.5em;
    width: 1.5em;
    background-size: 100%;
}

.navbar-search {
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.navbar-search .input-group {
    background-color: #f7f9f9;
    border-radius: 9999px;
    padding: 0.25rem;
    transition: background-color 0.2s ease;
    overflow: hidden;
}

.navbar-search .input-group:focus-within {
    background-color: #ffffff;
    box-shadow: 0 0 0 1px #1d9bf0;
}

.navbar-search .input-group-text {
    background: transparent;
    border: none;
    color: #536471;
    border-radius: 9999px 0 0 9999px;
}

.navbar-search .form-control {
    border: none;
    background: transparent;
    padding: 0.5rem;
    font-size: 0.95rem;
    border-radius: 0;
}

.navbar-search .form-control:focus {
    box-shadow: none;
}

.navbar-search .btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-right: 0.25rem;
}

.navbar-search .btn:hover {
    transform: translateY(-1px);
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.navbar-menu a {
    color: #0f1419;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.navbar-menu a:hover {
    background-color: rgba(29, 155, 240, 0.1);
    color: #1d9bf0;
}

.navbar-menu a.active {
    color: #1d9bf0;
    font-weight: 600;
}

/* モバイルメニューボタン */
.menu-button {
    display: none;
    background: none;
    border: none;
    color: #0f1419;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.menu-button:hover {
    background-color: rgba(29, 155, 240, 0.1);
}

/* モバイルメニュー */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    right: 0;
    width: 300px;
    height: calc(100vh - 60px);
    background-color: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

@media screen and (max-width: 991px) {
    .mobile-menu {
        display: block;
    }
    
    .navbar-collapse {
        display: none !important;
    }
    
    .navbar-toggler {
        display: block;
    }
}

@media screen and (min-width: 992px) {
    .mobile-menu {
        display: none !important;
    }
    
    .navbar-collapse {
        display: flex !important;
    }
    
    .navbar-toggler {
        display: none !important;
    }
}

.mobile-menu.show {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: 1rem;
}

/* モバイルメニュー内の検索フォーム */
.mobile-search {
    margin-bottom: 20px;
    padding: 16px;
    background-color: #f7f9f9;
    border-radius: 16px;
}

.search-form {
    position: relative;
    margin-bottom: 12px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 44px;
    border: 1px solid #eff3f4;
    border-radius: 9999px;
    font-size: 0.95rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #1d9bf0;
    box-shadow: 0 0 0 1px #1d9bf0;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #536471;
    font-size: 1.1rem;
}

/* モバイルメニュー内のリンク */
.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    color: #0f1419;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.mobile-menu-link:hover {
    background-color: #f7f9f9;
    text-decoration: none;
    color: #0f1419;
}

.mobile-menu-link i {
    font-size: 1.2rem;
    color: #0f1419;
    width: 24px;
    text-align: center;
}

.mobile-menu-link span {
    font-weight: 500;
}

/* レスポンシブデザイン */
@media screen and (max-width: 991px) {
    .navbar-menu {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .mobile-menu {
        display: block;
    }

    /* 検索フォームをモバイルメニューに移動 */
    .search-filter-section {
        display: none;
    }

    body {
        padding-top: calc(60px + 0.5rem); /* モバイル時のパディングを調整 */
    }

    .navbar {
        padding: 0.5rem;
    }
}

/* オーバーレイ */
.menu-overlay {
    display: none;
}

.menu-overlay.active {
    display: none;
}

/* モバイルメニュー内のチェックボックス */
.mobile-search .form-check {
    margin-top: 12px;
}

.mobile-search .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0.2em;
    border-color: #536471;
    cursor: pointer;
}

.mobile-search .form-check-input:checked {
    background-color: #1d9bf0;
    border-color: #1d9bf0;
}

.mobile-search .form-check-label {
    color: #536471;
    font-size: 0.9rem;
    cursor: pointer;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-search .form-check-label i {
    color: #536471;
    font-size: 1rem;
}

/* 投稿一覧のスタイル */
.posts-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.post-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.post-header {
    margin-bottom: 1rem;
    cursor: pointer;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #1d9bf0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #536471;
}

.post-meta .author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta .date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-content {
    margin: 1rem 0;
    font-size: 1rem;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.post-content .twitter-tweet {
    margin: 1rem auto !important;
}

.post-content a {
    word-break: break-word;
    overflow-wrap: break-word;
}

.post-files {
    display: grid;
    gap: 2px;
    margin: 10px 0;
    border-radius: 16px;
    overflow: hidden;
}

/* 1枚の画像の場合 */
.post-files:has(.post-image:only-child) {
    grid-template-columns: 1fr;
}

/* 2枚の画像の場合 */
.post-files:has(.post-image:first-child:nth-last-child(2)) {
    grid-template-columns: repeat(2, 1fr);
}

/* 3枚の画像の場合 */
.post-files:has(.post-image:first-child:nth-last-child(3)) {
    grid-template-columns: repeat(2, 1fr);
}
.post-files:has(.post-image:first-child:nth-last-child(3)) .post-image:first-child {
    grid-row: span 2;
}

/* 4枚の画像の場合 */
.post-files:has(.post-image:first-child:nth-last-child(4)) {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.post-image {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.post-image:hover {
    filter: brightness(0.9);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.like-button,
.comment-count-button {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #536471;
    display: flex;
    align-items: center;
    gap: 4px;
}

.like-button i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.like-button:hover {
    background-color: rgba(249, 24, 128, 0.1);
    color: #f91880;
}

.like-button:hover i {
    transform: scale(1.1);
}

.like-button.active {
    color: #f91880;
}

.like-button.active i {
    color: #f91880;
    animation: likeAnimation 0.3s ease;
}

.like-button i.fas {
    color: #f91880;
}

.like-button.active:hover {
    background-color: rgba(249, 24, 128, 0.1);
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.post-action {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    color: #536471;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-action:hover {
    background-color: rgba(29, 155, 240, 0.1);
    color: #1d9bf0;
}

.post-action.text-danger:hover {
    background-color: rgba(244, 33, 46, 0.1);
    color: #f4212e;
}

.file-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.file-link:hover {
    background-color: #e9ecef;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #657786;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 5px;
    font-size: 14px;
}

.post-action:hover {
    color: #1da1f2;
}

.post-action.text-danger:hover {
    color: #dc3545;
}

.comment-count-button:hover {
    color: #1da1f2;
}

.likes-count, .comments-count {
    font-size: 14px;
    margin-left: 2px;
    color: inherit;
}

/* コメントセクション */
.comments-section {
    background: #fff;
    border-radius: 12px;
}

.comments-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.file-drop-area {
    border: 2px dashed #e4e6eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.file-drop-area:hover {
    border-color: #1da1f2;
    background-color: #f0f2f5;
}

.file-drop-area.dragover {
    border-color: #1da1f2;
    background-color: rgba(29, 161, 242, 0.1);
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: #65676b;
}

.upload-message {
    color: #1a1a1a;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.upload-hint {
    color: #65676b;
    font-size: 0.85rem;
}

.comment {
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.comment-header .author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
}

.comment-header .date {
    color: #65676b;
    font-size: 0.85rem;
}

/* コメントのスタイル */
.comment-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #14171a;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin: 0;
    padding: 0;
    display: block;
    min-height: 1em;
}

.comment-content > * {
    margin: 0;
    padding: 0;
}

/* コメントの画像表示 */
.comment-files {
    display: grid;
    gap: 2px;
    margin: 10px 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f8f9fa;
}

/* 1枚の画像の場合 */
.comment-files.single {
    grid-template-columns: 1fr;
}

/* 2枚の画像の場合 */
.comment-files.double {
    grid-template-columns: repeat(2, 1fr);
}

/* 3枚の画像の場合 */
.comment-files.triple {
    grid-template-columns: repeat(2, 1fr);
}

.comment-files.triple .comment-file:first-child {
    grid-row: span 2;
}

/* 4枚の画像の場合 */
.comment-files.quad {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.comment-file {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    aspect-ratio: 16 / 9;
}

.comment-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: filter 0.2s ease;
    padding: 4px;
    display: block;
    margin: 0;
}

.comment-image:hover {
    filter: brightness(0.9);
}

.other-files {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e4e6eb;
}

.comment-form textarea {
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

.comment-form textarea:focus {
    border-color: #1da1f2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, 0.1);
    outline: none;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.comment-action-button {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.comment-action-button.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background-color: transparent;
}

.comment-action-button.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
}

.comment-action-button i {
    font-size: 0.9rem;
}

/* コメントボタンのスタイル */
.comment-count-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    background: none;
    color: #536471;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 9999px;
}

.comment-count-button:hover {
    color: #1da1f2;
    background-color: rgba(29, 161, 242, 0.1);
}

.comment-count-button i {
    font-size: 1.1rem;
}

.comments-count {
    font-weight: 500;
}

/* ファイルアップロード関連の共通スタイル */
.file-upload-container {
    margin-top: 10px;
}

.file-drop-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.upload-message {
    color: #666;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 0.8rem;
    color: #999;
}

.file-preview {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

.file-preview img {
    max-width: 50px;
    max-height: 50px;
    margin-right: 10px;
}

.file-icon {
    font-size: 24px;
    margin-right: 10px;
    color: #666;
}

.file-info {
    flex-grow: 1;
    overflow: hidden;
}

.file-info span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

.btn-remove:hover {
    color: #c82333;
}

.comment-preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.preview-video {
    width: 100%;
    height: 150px;
    border-radius: 4px;
}

.pdf-preview {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 4px;
}

#file-preview-container {
    margin-top: 15px;
}

.comment-input-container {
    position: relative;
    margin-bottom: 15px;
}

.comment-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

#filePreview {
    margin-top: 15px;
}

.file-preview-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.file-preview-card:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.preview-area {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.preview-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-size {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.btn-danger.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.clear-files-button {
    margin-top: 10px;
    width: 100%;
}

/* ファイルモーダルのスタイル */
#fileModal .modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
}

#fileModal .file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background-color: #f7f9f9;
    border-radius: 8px;
}

#fileModal .file-info i {
    font-size: 24px;
    color: #536471;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #333;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 1);
}

.modal-nav.prev {
    left: 20px;
    border-radius: 0 8px 8px 0;
}

.modal-nav.next {
    right: 20px;
    border-radius: 8px 0 0 8px;
}

.modal-nav.hidden {
    display: none;
}

/* ナビゲーションバー内の検索フォーム */
.navbar-search {
    max-width: 400px;
    width: 100%;
    margin: 0 1rem;
}

.navbar-search .input-group {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    transition: all 0.2s ease;
}

.navbar-search .input-group:focus-within {
    border-color: #1d9bf0;
    box-shadow: 0 0 0 1px rgba(29, 155, 240, 0.3);
}

.navbar-search .input-group-text {
    border: none;
    padding-right: 0;
}

.navbar-search .form-control {
    border: none;
    padding: 0.625rem;
    font-size: 0.95rem;
    background-color: transparent;
}

.navbar-search .form-control:focus {
    box-shadow: none;
}

.navbar-search .btn {
    border: none;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    background-color: #1d9bf0;
    color: #fff;
    transition: background-color 0.2s ease;
}

.navbar-search .btn:hover {
    background-color: #1a8cd8;
}

.navbar-search .form-check {
    margin-left: 1rem;
}

.navbar-search .form-check-input {
    cursor: pointer;
}

.navbar-search .form-check-label {
    color: #536471;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-search .form-check-label i {
    color: #536471;
}

.navbar-search .form-check-input:checked {
    background-color: #1d9bf0;
    border-color: #1d9bf0;
}

@media screen and (max-width: 991px) {
    .navbar-search {
        margin: 0.5rem 0;
        max-width: 100%;
    }

    .navbar-search .form-check {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media screen and (max-width: 991px) {
    .posts-container {
        padding: 0 0.5rem;
    }

    .post-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .post-title {
        font-size: 1.25rem;
    }

    .post-files {
        gap: 0.5rem;
    }

    .navbar {
        padding: 0.5rem;
    }

    .navbar-search {
        display: none;
    }

    .mobile-menu {
        display: block;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
    }

    .mobile-menu-content {
        padding: 1.5rem;
    }

    .mobile-search {
        background-color: #f7f9f9;
        border-radius: 16px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .search-form {
        position: relative;
        margin-bottom: 1rem;
    }

    .search-input {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        border: 1px solid #eff3f4;
        border-radius: 9999px;
        font-size: 0.95rem;
        background-color: #ffffff;
        transition: all 0.2s ease;
    }

    .search-input:focus {
        border-color: #1d9bf0;
        box-shadow: 0 0 0 1px #1d9bf0;
    }

    .search-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #536471;
    }

    .mobile-menu-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem;
        color: #0f1419;
        text-decoration: none;
        font-weight: 500;
        border-radius: 9999px;
        transition: background-color 0.2s ease;
    }

    .mobile-menu-link:hover {
        background-color: #f7f9f9;
    }

    .mobile-menu-link i {
        font-size: 1.25rem;
        width: 1.5rem;
        text-align: center;
        color: #0f1419;
    }

    .menu-overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 998;
    }
}

/* Twitter埋め込みのフォールバックリンク */
.twitter-fallback-link {
    display: inline-block;
    padding: 10px 15px;
    margin: 10px 0;
    border: 1px solid #1da1f2;
    border-radius: 4px;
    color: #1da1f2;
    text-decoration: none;
    transition: all 0.3s ease;
}

.twitter-fallback-link:hover {
    background-color: #1da1f2;
    color: white;
    text-decoration: none;
}

.twitter-fallback-link i {
    margin-right: 5px;
}

/* モーダル関連のスタイル */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1050;
    overflow: hidden;
}

.image-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.modal-image {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.modal-download {
    background-color: #1d9bf0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.modal-download:hover {
    background-color: #1a8cd8;
}

/* レスポンシブ対応 */
@media screen and (max-width: 576px) {
    .post-files {
        gap: 1px;
        border-radius: 8px;
    }
    
}

/* レスポンシブ対応 */
@media screen and (max-width: 576px) {
    .comment-files {
        gap: 1px;
        border-radius: 8px;
    }
    
    .comment-file {
        aspect-ratio: 1/1;
    }
    
    .comment-image {
        padding: 2px;
    }
}

/* トースト通知のスタイル */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: rgba(40, 167, 69, 0.9);
}

.toast-error {
    background: rgba(220, 53, 69, 0.9);
}

/* 削除確認モーダルのスタイル */
#deleteConfirmModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

#deleteConfirmModal.show {
    display: block;
}

#deleteConfirmModal .modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
}

#deleteConfirmModal .modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#deleteConfirmModal .modal-header {
    padding: 1.5rem;
}

#deleteConfirmModal .modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

#deleteConfirmModal .modal-body {
    padding: 1.5rem;
}

#deleteConfirmModal .modal-footer {
    padding: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

body.modal-open {
    overflow: hidden;
}

.profile-image-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0;
    display: inline-block;
    vertical-align: middle;
}

.default-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1d9bf0;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    margin-right: 0;
    vertical-align: middle;
    text-transform: uppercase;
}

.author, .comment-author {
    display: flex;
    align-items: center;
    color: #1a1a1a;
    font-weight: 500;
    gap: 8px;
}

.author span, .comment-author span {
    font-size: 14px;
    line-height: 1.4;
} 