/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bbs-single-container {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
    background: linear-gradient(135deg, #f5fffe 0%, #e8faf8 100%);
    min-height: 100vh;
}

/* ヒーローセクション */
.hero-section {
    background: #fff;
    box-shadow: 0 2px 20px rgba(142, 238, 231, 0.08);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8eeee7 0%, #5fd4cd 100%);
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    animation: fadeInUp 0.6s ease-out;
}

.breadcrumb a {
    color: #5fd4cd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #3db5ad;
}

.breadcrumb .separator {
    color: #cbd5e0;
}

.breadcrumb .current {
    color: #718096;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entry-title {
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #2d3748;
    line-height: 1.3;
    margin-bottom: 30px;
    position: relative;
    animation: fadeInDown 0.8s ease-out;
}

.entry-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #8eeee7 0%, #5fd4cd 100%);
    margin: 25px 0 0;
    border-radius: 2px;
    animation: expandWidth 0.8s ease-out 0.3s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    opacity: 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-size: 0.95rem;
}

.meta-icon {
    width: 18px;
    height: 18px;
    color: #8eeee7;
}

.post-number-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(142, 238, 231, 0.2), rgba(95, 212, 205, 0.2));
    color: #5fd4cd;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* メイン投稿 */
.main-post {
    padding: 60px 0;
}

.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.featured-image {
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    opacity: 0;
}

.post-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(95, 212, 205, 0.08);
    transition: transform 0.3s ease;
}

.post-image:hover {
    transform: scale(1.02);
}

.post-content {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.15rem;
    line-height: 2;
    color: #4a5568;
    animation: fadeInUp 0.8s ease-out 0.5s both;
    opacity: 0;
}

.post-content p {
    margin-bottom: 1.8em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* 返信セクション */
.replies-section {
    background: #fff;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(142, 238, 231, 0.06);
}

.replies-container,
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #8eeee7, #5fd4cd);
    border-radius: 2px;
}

.title-icon {
    width: 24px;
    height: 24px;
    color: #8eeee7;
}

.replies-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.reply-item {
    background: linear-gradient(135deg, rgba(248, 255, 254, 0.9) 0%, rgba(229, 249, 247, 0.85) 100%);
    border: 1px solid rgba(142, 238, 231, 0.2);
    border-radius: 16px;
    padding: 25px;
    animation: cardFadeIn 0.6s ease-out both;
    animation-delay: calc(var(--reply-index, 0) * 0.1s);
    transition: all 0.3s ease;
}

.reply-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(142, 238, 231, 0.15);
    border-color: rgba(142, 238, 231, 0.3);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.reply-number {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(142, 238, 231, 0.3), rgba(95, 212, 205, 0.3));
    color: #5fd4cd;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.reply-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #718096;
    font-size: 0.9rem;
}

.reply-author {
    font-weight: 600;
    color: #5fd4cd;
}

.reply-date {
    color: #90a4ae;
}

.reply-content {
    color: #4a5568;
    line-height: 1.8;
}

/* 返信フォーム */
.reply-form-section {
    background: #fff;
    box-shadow: 0 4px 20px rgba(142, 238, 231, 0.06);
    margin-bottom: 40px;
}

.message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-weight: 500;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message svg {
    width: 20px;
    height: 20px;
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid rgba(142, 238, 231, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #8eeee7;
    box-shadow: 0 0 0 3px rgba(142, 238, 231, 0.1);
}

.textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #8eeee7 0%, #5fd4cd 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(95, 212, 205, 0.3);
    align-self: flex-start;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(95, 212, 205, 0.4);
    gap: 16px;
}

.btn-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(4px);
}

/* ナビゲーション */
.post-navigation {
    background: #fff;
    padding: 40px 0;
    box-shadow: 0 -2px 20px rgba(142, 238, 231, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(142, 238, 231, 0.05) 0%, rgba(95, 212, 205, 0.05) 100%);
    border: 1px solid rgba(142, 238, 231, 0.2);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(142, 238, 231, 0.1) 0%, rgba(95, 212, 205, 0.1) 100%);
    border-color: #5fd4cd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(95, 212, 205, 0.2);
}

.nav-previous .nav-link {
    justify-content: flex-start;
}

.nav-next .nav-link {
    justify-content: flex-end;
    text-align: right;
}

.nav-direction {
    display: block;
    color: #8eeee7;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.nav-title {
    color: #2d3748;
    font-size: 1.05rem;
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-arrow {
    color: #5fd4cd;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.nav-previous .nav-link:hover .nav-arrow {
    transform: translateX(-4px);
}

.nav-next .nav-link:hover .nav-arrow {
    transform: translateX(4px);
}

.nav-center {
    display: flex;
    justify-content: center;
}

.nav-archive {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #8eeee7 0%, #5fd4cd 100%);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-archive:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(95, 212, 205, 0.4);
}

.nav-archive svg {
    width: 24px;
    height: 24px;
}

.nav-archive span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }

    .entry-title {
        font-size: 2rem;
    }

    .entry-title::after {
        width: 80px;
    }

    @keyframes expandWidth {
        from { width: 0; }
        to { width: 80px; }
    }

    .entry-meta {
        gap: 20px;
    }

    .post-content {
        font-size: 1.05rem;
        line-height: 1.8;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nav-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nav-center {
        order: -1;
    }

    .nav-title {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 30px 0;
    }

    .entry-title {
        font-size: 1.6rem;
    }

    .entry-title::after {
        width: 60px;
        height: 2px;
    }

    @keyframes expandWidth {
        from { width: 0; }
        to { width: 60px; }
    }

    .breadcrumb {
        font-size: 0.85rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .replies-container,
    .form-container {
        padding: 30px 15px;
    }

    .reply-item {
        padding: 20px;
    }

    .reply-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-submit {
        width: 100%;
        justify-content: center;
    }

    .nav-link {
        padding: 15px;
    }
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* フォーカススタイル */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #5fd4cd;
    outline-offset: 2px;
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .bbs-single-container {
        background: linear-gradient(135deg, #0a0e27 0%, #151b3d 100%);
    }

    .hero-section {
        background: rgba(20, 30, 50, 0.95) !important;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
    }

    .hero-section::before {
        background: linear-gradient(90deg, #2a6b75 0%, #1a4a52 100%) !important;
    }

    .entry-title {
        color: #B0E0E6 !important;
    }

    .entry-title::after {
        background: linear-gradient(90deg, #2a6b75 0%, #1a4a52 100%) !important;
    }

    .entry-meta .meta-item {
        color: #8dd4e0 !important;
    }

    .post-number-badge {
        background: linear-gradient(135deg, rgba(72, 202, 228, 0.2), rgba(95, 212, 205, 0.2)) !important;
        color: #48CAE4 !important;
    }

    .section-title {
        color: #B0E0E6 !important;
    }

    .section-title::after {
        background: linear-gradient(90deg, #2a6b75, #1a4a52) !important;
    }

    .replies-section {
        background: rgba(20, 30, 50, 0.95) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }

    .reply-item {
        background: linear-gradient(135deg, rgba(30, 40, 60, 0.9) 0%, rgba(20, 30, 50, 0.85) 100%) !important;
        border-color: rgba(176, 224, 230, 0.2) !important;
    }

    .reply-item:hover {
        box-shadow: 0 8px 25px rgba(72, 202, 228, 0.15) !important;
        border-color: rgba(72, 202, 228, 0.3) !important;
    }

    .reply-number {
        background: linear-gradient(135deg, rgba(72, 202, 228, 0.3), rgba(95, 212, 205, 0.3)) !important;
        color: #48CAE4 !important;
    }

    .reply-author {
        color: #48CAE4 !important;
    }

    .reply-date {
        color: #8dd4e0 !important;
    }

    .reply-content {
        color: #c0c0c0 !important;
    }

    .reply-form-section {
        background: rgba(20, 30, 50, 0.95) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }

    .form-group label {
        color: #B0E0E6 !important;
    }

    .form-control {
        background: rgba(0, 0, 0, 0.4) !important;
        border-color: rgba(176, 224, 230, 0.3) !important;
        color: #e0e0e0 !important;
    }

    .form-control:focus {
        border-color: #48CAE4 !important;
        box-shadow: 0 0 0 3px rgba(72, 202, 228, 0.2) !important;
    }

    .form-control::placeholder {
        color: #8dd4e0 !important;
    }

    .btn-submit {
        background: linear-gradient(135deg, #2a6b75 0%, #1a4a52 100%) !important;
        border: 1px solid rgba(176, 224, 230, 0.3) !important;
        color: #E0FFFF !important;
    }

    .btn-submit:hover {
        background: linear-gradient(135deg, #3a7b85 0%, #2a5a62 100%) !important;
        box-shadow: 0 6px 30px rgba(72, 202, 228, 0.3) !important;
    }

    .post-navigation {
        background: rgba(20, 30, 50, 0.95) !important;
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3) !important;
    }

    .nav-link {
        background: linear-gradient(135deg, rgba(30, 40, 60, 0.9) 0%, rgba(20, 30, 50, 0.9) 100%) !important;
        border-color: rgba(176, 224, 230, 0.2) !important;
    }

    .nav-link:hover {
        background: linear-gradient(135deg, rgba(72, 202, 228, 0.1) 0%, rgba(95, 212, 205, 0.1) 100%) !important;
        border-color: #48CAE4 !important;
        box-shadow: 0 4px 12px rgba(72, 202, 228, 0.2) !important;
    }

    .nav-direction {
        color: #48CAE4 !important;
    }

    .nav-title {
        color: #B0E0E6 !important;
    }

    .nav-arrow {
        color: #48CAE4 !important;
    }

    .nav-archive {
        background: linear-gradient(135deg, #2a6b75 0%, #1a4a52 100%) !important;
        color: #E0FFFF !important;
    }

    .nav-archive:hover {
        box-shadow: 0 6px 20px rgba(72, 202, 228, 0.3) !important;
    }

    .breadcrumb {
        background: rgba(20, 30, 50, 0.8);
        border-color: rgba(176, 224, 230, 0.2);
    }

    .breadcrumb a {
        color: #48CAE4;
    }

    .breadcrumb a:hover {
        color: #8eeee7;
    }

    .breadcrumb-separator {
        color: #8dd4e0;
    }

    .main-content {
        background: rgba(20, 30, 50, 0.95);
        border: 1px solid rgba(176, 224, 230, 0.2);
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    }

    .post-header {
        background: rgba(0, 0, 0, 0.3);
        border-bottom-color: rgba(176, 224, 230, 0.1);
    }

    .post-meta .meta-item {
        background: rgba(72, 202, 228, 0.1);
        color: #8dd4e0;
    }

    .meta-icon {
        color: #48CAE4;
    }

    .post-title {
        color: #B0E0E6;
    }

    .post-content {
        color: #c0c0c0;
    }

    .post-content h1, .post-content h2, .post-content h3,
    .post-content h4, .post-content h5, .post-content h6 {
        color: #B0E0E6;
    }

    .post-actions {
        background: rgba(0, 0, 0, 0.2);
        border-top-color: rgba(176, 224, 230, 0.1);
    }

    .btn-back {
        background: rgba(72, 202, 228, 0.1);
        border-color: rgba(176, 224, 230, 0.3);
        color: #B0E0E6;
    }

    .btn-back:hover {
        background: rgba(72, 202, 228, 0.2);
        border-color: #48CAE4;
        color: #E0FFFF;
    }

    .btn-new {
        background: linear-gradient(135deg, #2a6b75 0%, #1a4a52 100%);
        border: 1px solid rgba(176, 224, 230, 0.3);
        color: #E0FFFF;
    }

    .btn-new:hover {
        background: linear-gradient(135deg, #3a7b85 0%, #2a5a62 100%);
        box-shadow: 0 10px 30px rgba(72, 202, 228, 0.2);
    }

    .comments-section {
        background: rgba(20, 30, 50, 0.95);
        border: 1px solid rgba(176, 224, 230, 0.2);
    }

    .comments-header {
        background: rgba(0, 0, 0, 0.3);
        border-bottom-color: rgba(176, 224, 230, 0.1);
    }

    .comments-title {
        color: #B0E0E6;
    }

    .comment {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(176, 224, 230, 0.1);
    }

    .comment:hover {
        background: rgba(72, 202, 228, 0.05);
        border-color: rgba(72, 202, 228, 0.3);
    }

    .comment-author {
        color: #8dd4e0;
    }

    .comment-date {
        color: #8dd4e0;
    }

    .comment-content {
        color: #c0c0c0;
    }

    .comment-reply-form {
        background: rgba(0, 0, 0, 0.3);
        border-top-color: rgba(176, 224, 230, 0.1);
    }

    .form-title {
        color: #B0E0E6;
    }

    .form-group label {
        color: #B0E0E6;
    }

    .form-control {
        background: rgba(0, 0, 0, 0.4);
        border-color: rgba(176, 224, 230, 0.3);
        color: #e0e0e0;
    }

    .form-control:focus {
        border-color: #48CAE4;
        box-shadow: 0 0 0 3px rgba(72, 202, 228, 0.2);
    }

    .form-control::placeholder {
        color: #8dd4e0;
    }

    .required {
        background: rgba(228, 72, 72, 0.2);
        color: #e08d8d;
    }

    .optional {
        background: rgba(72, 202, 228, 0.1);
        color: #8dd4e0;
    }

    .form-note {
        color: #8dd4e0;
    }

    .btn-submit {
        background: linear-gradient(135deg, #2a6b75 0%, #1a4a52 100%);
        border: 1px solid rgba(176, 224, 230, 0.3);
        color: #E0FFFF;
    }

    .btn-submit:hover {
        background: linear-gradient(135deg, #3a7b85 0%, #2a5a62 100%);
        box-shadow: 0 10px 30px rgba(72, 202, 228, 0.2);
    }

    .btn-cancel {
        background: rgba(72, 202, 228, 0.1);
        border-color: rgba(176, 224, 230, 0.3);
        color: #B0E0E6;
    }

    .btn-cancel:hover {
        background: rgba(72, 202, 228, 0.2);
        border-color: #48CAE4;
        color: #E0FFFF;
    }

    .no-comments {
        background: rgba(0, 0, 0, 0.2);
        color: #8dd4e0;
    }

    .no-comments-icon {
        background: rgba(72, 202, 228, 0.1);
        color: #48CAE4;
    }

    .navigation-posts {
        background: rgba(20, 30, 50, 0.95);
        border: 1px solid rgba(176, 224, 230, 0.2);
    }

    .nav-link {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(176, 224, 230, 0.1);
    }

    .nav-link:hover {
        background: rgba(72, 202, 228, 0.1);
        border-color: #48CAE4;
    }

    .nav-link .label {
        color: #8dd4e0;
    }

    .nav-link .title {
        color: #B0E0E6;
    }

    .related-posts {
        background: rgba(20, 30, 50, 0.95);
        border: 1px solid rgba(176, 224, 230, 0.2);
    }

    .related-header {
        border-bottom-color: rgba(176, 224, 230, 0.1);
    }

    .related-title {
        color: #B0E0E6;
    }

    .related-item {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(176, 224, 230, 0.1);
    }

    .related-item:hover {
        background: rgba(72, 202, 228, 0.05);
        border-color: #48CAE4;
    }

    .related-item-title {
        color: #B0E0E6;
    }

    .related-item-meta {
        color: #8dd4e0;
    }
}