/* ===== POP/CASUAL THEME - 大学生掲示板 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #f0f7ff;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    color: #334155;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 16px; width: 100%; }
.hidden { display: none !important; }

/* ===== モーダル ===== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(59, 130, 246, 0.15);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 16px; backdrop-filter: blur(6px);
}
.modal {
    background: #fff; border: 2px solid #e2e8f0; border-radius: 20px;
    padding: 32px; max-width: 560px; width: 100%; position: relative;
    animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.85) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; color: #94a3b8; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #3b82f6; }

.terms-modal { max-width: 640px; max-height: 80vh; display: flex; flex-direction: column; }
.terms-modal h2 { font-size: 22px; margin-bottom: 16px; padding-right: 32px; color: #1e40af; }
.terms-content { overflow-y: auto; flex: 1; font-size: 14px; line-height: 1.8; color: #64748b; padding-right: 8px; }
.terms-content h3 { font-size: 15px; font-weight: 700; margin-top: 20px; margin-bottom: 8px; color: #1e40af; }
.terms-content h3:first-child { margin-top: 0; }
.terms-content ul { padding-left: 20px; margin-bottom: 8px; }
.terms-content li { margin-bottom: 4px; }
.modal-ok-btn {
    display: block; width: 100%; margin-top: 16px; padding: 14px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; border: none; border-radius: 14px;
    font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
    transition: all 0.2s; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.modal-ok-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35); }

.qr-zoom-modal { max-width: 400px; padding: 16px; text-align: center; }
.qr-zoom-modal img { max-width: 100%; max-height: 70vh; border-radius: 14px; }

/* ===== ヘッダー ===== */
.header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: #fff; padding: 26px 0 22px; text-align: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    position: relative; overflow: hidden;
}
.header::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px;
    background: rgba(251, 191, 36, 0.15); border-radius: 50%;
    pointer-events: none;
}
.header::after {
    content: ''; position: absolute; bottom: -60%; left: -10%; width: 250px; height: 250px;
    background: rgba(255, 255, 255, 0.08); border-radius: 50%;
    pointer-events: none;
}
.logo {
    font-size: 28px; font-weight: 900; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    position: relative; z-index: 1;
}
.logo-icon { font-size: 32px; }
.header-sub { font-size: 14px; opacity: 0.9; margin-top: 4px; font-weight: 500; position: relative; z-index: 1; }

/* ===== 安全バナー ===== */
.safety-banner {
    background: #fffbeb; color: #92400e; padding: 10px 0;
    font-size: 13px; text-align: center; border-bottom: 2px solid #fde68a;
}

/* ===== カテゴリカード ===== */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }
.category-card {
    border-radius: 18px; padding: 28px 20px; text-align: center; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); color: #fff; position: relative; overflow: hidden;
    border: none;
}
.category-card::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(255, 255, 255, 0.08); opacity: 0; transition: opacity 0.3s;
}
.category-card:hover { transform: translateY(-6px) rotate(1deg); box-shadow: 0 14px 35px rgba(0, 0, 0, 0.15); }
.category-card:hover::before { opacity: 1; }
.category-card.kakao { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.category-card.line { background: linear-gradient(135deg, #34d399, #10b981); }
.category-card.email { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.category-card.insta { background: linear-gradient(135deg, #f472b6, #ec4899, #a855f7); }
.card-icon { font-size: 48px; margin-bottom: 12px; }
.category-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.category-card p { font-size: 13px; opacity: 0.9; }
.post-count {
    display: inline-block; margin-top: 10px; font-size: 12px;
    background: rgba(255, 255, 255, 0.3); padding: 4px 14px;
    border-radius: 50px; font-weight: 600;
}

/* ===== 使い方 ===== */
.how-to-use { margin-top: 32px; }
.section-title {
    font-size: 20px; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px;
    border-bottom: 3px solid #3b82f6; display: inline-block; color: #1e40af;
}
.steps { display: flex; gap: 14px; margin-top: 8px; }
.step {
    flex: 1; display: flex; gap: 12px; align-items: flex-start;
    background: #fff; padding: 16px; border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid #e2e8f0; transition: all 0.3s;
}
.step:hover { border-color: #3b82f6; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.1); }
.step-num {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 16px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}
.step strong { font-size: 14px; display: block; margin-bottom: 2px; color: #1e293b; }
.step p { font-size: 12px; color: #94a3b8; }

.recent-section { margin-top: 32px; margin-bottom: 32px; }

/* ===== 掲示板画面 ===== */
.back-btn {
    background: #fff; border: 2px solid #e2e8f0; padding: 10px 22px; border-radius: 50px;
    cursor: pointer; font-size: 14px; font-weight: 600; color: #3b82f6;
    margin-top: 20px; transition: all 0.2s;
}
.back-btn:hover { border-color: #3b82f6; background: #eff6ff; }
.board-header {
    display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 20px;
    background: #fff; border-radius: 14px; border: 2px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.board-icon { font-size: 40px; }
.board-header h2 { font-size: 24px; font-weight: 700; color: #1e40af; }

/* ===== 投稿フォーム ===== */
.post-form {
    background: #fff; border-radius: 14px; padding: 24px; margin-top: 14px;
    border: 2px solid #e2e8f0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.post-form h3 { font-size: 18px; margin-bottom: 16px; font-weight: 700; color: #1e40af; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: #64748b; }
.required { color: #ef4444; }
.form-group input, .form-group select, .form-group textarea {
    padding: 11px 14px; border: 2px solid #e2e8f0; border-radius: 12px;
    font-size: 15px; font-family: inherit; transition: all 0.2s; outline: none;
    width: 100%; background: #f8fafc; color: #334155;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); background: #fff;
}
.form-group textarea { resize: vertical; }
.char-count { font-size: 12px; color: #94a3b8; text-align: right; }

.qr-upload-area { border: 2px dashed #cbd5e1; border-radius: 12px; overflow: hidden; transition: border-color 0.2s; }
.qr-upload-area.dragover { border-color: #3b82f6; background: #eff6ff; }
.qr-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; cursor: pointer; color: #94a3b8; font-size: 13px; text-align: center; }
.qr-upload-placeholder:hover { color: #3b82f6; }
.qr-upload-icon { font-size: 28px; }
.qr-upload-hint { font-size: 11px; color: #cbd5e1; }
.qr-preview-wrapper { position: relative; display: inline-block; padding: 12px; text-align: center; width: 100%; }
.qr-preview-wrapper img { max-width: 160px; max-height: 160px; border-radius: 12px; border: 2px solid #e2e8f0; }
.qr-remove-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; background: #ef4444; color: #fff; border: none; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qr-remove-btn:hover { background: #dc2626; }

.terms-agree { margin-top: 14px; font-size: 13px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: #64748b; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: #3b82f6; }
.checkbox-label a { color: #3b82f6; text-decoration: underline; }
.submit-btn {
    display: block; width: 100%; margin-top: 16px; padding: 15px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e293b; border: none; border-radius: 14px;
    font-size: 17px; font-weight: 900; cursor: pointer; transition: all 0.3s;
    font-family: inherit; letter-spacing: 1px;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(251, 191, 36, 0.4); }
.submit-btn:active { transform: scale(0.98); }

/* ===== フィルター ===== */
.filter-bar { display: flex; gap: 10px; margin-top: 14px; }
.filter-bar select {
    padding: 10px 14px; border: 2px solid #e2e8f0; border-radius: 12px;
    font-size: 14px; font-family: inherit; outline: none;
    background: #fff; color: #334155; cursor: pointer; flex: 1;
}
.filter-bar select:focus { border-color: #3b82f6; }

/* ===== 投稿一覧 ===== */
.posts-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.post-card {
    background: #fff; border-radius: 14px; padding: 22px;
    border: 2px solid #e2e8f0; transition: all 0.3s; position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.post-card:hover { border-color: #93c5fd; box-shadow: 0 6px 20px rgba(59, 130, 246, 0.1); transform: translateY(-2px); }
.post-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.post-avatar {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.post-avatar.male { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.post-avatar.female { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.post-avatar.other { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.post-info { flex: 1; min-width: 0; }
.post-name { font-weight: 700; font-size: 16px; color: #1e293b; }
.post-meta { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.post-badge { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 700; color: #fff; }
.post-badge.kakao { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1e293b; }
.post-badge.line { background: linear-gradient(135deg, #34d399, #10b981); }
.post-badge.email { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.post-badge.insta { background: linear-gradient(135deg, #f472b6, #ec4899); }
.post-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 4px 12px; border-radius: 50px; background: #eff6ff; color: #3b82f6; font-weight: 600; border: 1px solid #bfdbfe; }
.post-message { margin-top: 12px; font-size: 14px; line-height: 1.8; color: #475569; white-space: pre-wrap; word-break: break-word; }
.post-contact {
    margin-top: 12px; padding: 12px 16px;
    background: linear-gradient(135deg, #eff6ff, #f0f7ff); border: 2px solid #bfdbfe;
    border-radius: 12px; font-size: 14px; display: flex; align-items: center; gap: 8px;
}
.post-contact strong { color: #2563eb; }
.post-contact .contact-value { font-weight: 600; word-break: break-all; color: #1e293b; }
.copy-btn {
    margin-left: auto; padding: 6px 16px; border: 2px solid #3b82f6;
    background: none; color: #3b82f6; border-radius: 50px; cursor: pointer;
    font-size: 12px; font-weight: 700; transition: all 0.2s; font-family: inherit; flex-shrink: 0;
}
.copy-btn:hover { background: #3b82f6; color: #fff; box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3); }

.post-qr { margin-top: 10px; text-align: center; }
.post-qr img { max-width: 120px; max-height: 120px; border-radius: 12px; border: 2px solid #e2e8f0; cursor: pointer; transition: all 0.2s; }
.post-qr img:hover { transform: scale(1.08) rotate(-2deg); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15); }
.post-qr-label { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.post-time { font-size: 11px; color: #cbd5e1; margin-top: 10px; text-align: right; }
.post-delete { position: absolute; top: 12px; right: 12px; background: none; border: none; color: #cbd5e1; cursor: pointer; font-size: 18px; padding: 4px; line-height: 1; transition: color 0.2s; }
.post-delete:hover { color: #ef4444; }
.no-posts { text-align: center; padding: 48px 20px; color: #94a3b8; font-size: 16px; }

/* ===== 広告 ===== */
.ad-section { margin-top: 24px; position: relative; }
.ad-section.ad-inline { margin-top: 14px; }
.ad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ad-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.ad-banner {
    display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden;
    text-decoration: none; color: #334155; border: 2px solid #e2e8f0; transition: all 0.3s;
}
.ad-banner:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 10px 30px rgba(59, 130, 246, 0.12); }
.ad-thumb { height: 100px; overflow: hidden; }
.ad-thumb-bg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ad-thumb-icon { font-size: 42px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.matching-bg { background: linear-gradient(135deg, #fbbf24, #f59e0b, #ef4444); }
.live-bg { background: linear-gradient(135deg, #a855f7, #7c3aed, #3b82f6); }
.chat-bg { background: linear-gradient(135deg, #3b82f6, #06b6d4, #10b981); }
.ad-body { padding: 12px 14px; }
.ad-tag { display: inline-block; font-size: 10px; font-weight: 700; background: #eff6ff; color: #2563eb; padding: 3px 10px; border-radius: 50px; margin-bottom: 6px; }
.ad-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: #1e293b; }
.ad-desc { font-size: 12px; color: #94a3b8; line-height: 1.5; }
.ad-cta { margin-top: 8px; font-size: 13px; font-weight: 700; color: #2563eb; }
.ad-banner-wide {
    display: flex; align-items: center; background: #fff; border-radius: 14px; overflow: hidden;
    text-decoration: none; color: #334155; border: 2px solid #e2e8f0; transition: all 0.3s; gap: 0;
}
.ad-banner-wide:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.12); }
.ad-wide-thumb { width: 80px; min-height: 80px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ad-wide-body { flex: 1; padding: 12px 16px; }
.ad-wide-cta {
    padding: 0 16px; font-size: 13px; font-weight: 700; color: #1e293b;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    align-self: stretch; display: flex; align-items: center; white-space: nowrap;
}

/* ===== トースト ===== */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    padding: 14px 30px; border-radius: 50px; font-size: 14px; font-weight: 700;
    z-index: 1000; box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
    animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.related-sites { background: #f0f7ff; padding: 20px 0; margin-top: 32px; border-top: 2px solid #e2e8f0; }
.related-sites h3 { font-size: 14px; color: #94a3b8; margin-bottom: 10px; }
.related-links { display: flex; gap: 16px; flex-wrap: wrap; }
.related-links a { font-size: 13px; color: #3b82f6; text-decoration: none; }
.related-links a:hover { text-decoration: underline; }

/* ===== フッター ===== */
.footer {
    margin-top: auto;
    background: linear-gradient(135deg, #1e3a5f, #1e40af);
    color: #93c5fd; text-align: center; padding: 24px 0; font-size: 14px;
}
.footer-links { margin-top: 8px; display: flex; justify-content: center; gap: 12px; font-size: 13px; }
.footer-links a { color: #bfdbfe; text-decoration: underline; cursor: pointer; }
.footer-links a:hover { color: #fff; }
.footer-links span { color: #3b6daf; }
.footer-note { font-size: 11px; margin-top: 10px; opacity: 0.6; line-height: 1.6; }

/* ===== レスポンシブ ===== */
@media (max-width: 600px) {
    .header { padding: 20px 0 16px; }
    .logo { font-size: 22px; }
    .category-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
    .category-card { padding: 20px 12px; border-radius: 16px; }
    .card-icon { font-size: 36px; margin-bottom: 8px; }
    .category-card h2 { font-size: 14px; }
    .category-card p { font-size: 11px; }
    .steps { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; gap: 8px; }
    .board-header h2 { font-size: 18px; }
    .post-contact { flex-direction: column; align-items: flex-start; gap: 6px; }
    .copy-btn { margin-left: 0; }
    .modal { padding: 24px 20px; }
    .safety-banner { font-size: 12px; }
    .ad-grid { grid-template-columns: 1fr; }
    .ad-grid-3 { grid-template-columns: 1fr; }
    .ad-banner-wide { flex-direction: column; }
    .ad-wide-thumb { width: 100%; min-height: 60px; }
    .ad-wide-cta { width: 100%; justify-content: center; padding: 10px; }
}
