/* ===== ARAFO BBS - Chic Burgundy & Gold Sophisticated Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@700&display=swap');

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #f5f0e8;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(201, 176, 55, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(114, 47, 55, 0.03) 0%, transparent 50%);
    color: #2c1a1f;
    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 ===== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(30, 10, 15, 0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 16px; backdrop-filter: blur(8px);
}
.modal {
    background: linear-gradient(145deg, #faf5ef, #f5f0e8);
    border-radius: 16px; padding: 32px; max-width: 560px; width: 100%;
    position: relative; animation: modalIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(201, 176, 55, 0.3);
    box-shadow: 0 24px 80px rgba(30, 10, 15, 0.3);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; color: #8b7355; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #722f37; }

.age-gate-modal { text-align: center; max-width: 440px; }
.age-gate-icon { font-size: 56px; margin-bottom: 16px; }
.age-gate-modal h2 { font-size: 24px; margin-bottom: 12px; }
.age-gate-modal p { font-size: 15px; color: #5a3d42; margin-bottom: 8px; line-height: 1.6; }
.age-gate-buttons { display: flex; gap: 12px; margin-top: 20px; }
.age-gate-buttons button { flex: 1; padding: 14px; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.3s; }
.btn-yes { background: linear-gradient(135deg, #722f37, #983f48); color: #f0e6d0; }
.btn-no { background: #e8e0d0; color: #6b5545; }
.age-gate-buttons button:hover { opacity: 0.85; }

.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: #722f37; font-family: 'Noto Serif JP', serif; }
.terms-content { overflow-y: auto; flex: 1; font-size: 14px; line-height: 1.8; color: #4a3035; padding-right: 8px; }
.terms-content h3 { font-size: 15px; font-weight: 700; margin-top: 20px; margin-bottom: 8px; color: #722f37; }
.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: 12px;
    background: linear-gradient(135deg, #722f37, #983f48);
    color: #f0e6d0; border: none; border-radius: 10px; font-size: 15px;
    font-weight: 700; cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.modal-ok-btn:hover { opacity: 0.9; }

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

/* ===== Safety Banner ===== */
.safety-banner {
    background: linear-gradient(90deg, #f0e6d0, #ecdcc0);
    color: #7a5830;
    padding: 10px 0; font-size: 13px; text-align: center;
    border-bottom: 2px solid #c9b037;
}

/* ===== Header - Burgundy & Gold ===== */
.header {
    background: linear-gradient(135deg, #3d1520 0%, #722f37 30%, #5a2029 60%, #4a1a25 100%);
    color: #f0e6d0;
    padding: 36px 0 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(114, 47, 55, 0.4);
}
.header::before {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, transparent 0%, rgba(201, 176, 55, 0.08) 50%, transparent 100%),
        repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(201, 176, 55, 0.03) 30px, rgba(201, 176, 55, 0.03) 31px);
}
.header::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, transparent, #c9b037, transparent);
}

.logo {
    font-family: 'Noto Serif JP', serif;
    font-size: 34px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 10px;
    letter-spacing: 4px; position: relative;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: #c9b037;
}
.logo-icon { font-size: 38px; }
.header-sub {
    font-size: 13px; margin-top: 8px; letter-spacing: 5px;
    color: rgba(240, 230, 208, 0.7); text-transform: uppercase;
}

/* ===== Category Cards - Dark Elegant ===== */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.category-card {
    border-radius: 14px; padding: 28px 20px; text-align: center;
    cursor: pointer; transition: all 0.3s ease; color: #f0e6d0;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border: 1px solid rgba(201, 176, 55, 0.2);
}
.category-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, #c9b037, transparent);
    opacity: 0; transition: opacity 0.3s;
}
.category-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(114, 47, 55, 0.3); }
.category-card:hover::before { opacity: 1; }
.category-card.kakao { background: linear-gradient(135deg, #5a4520, #7a6530); }
.category-card.line { background: linear-gradient(135deg, #2a4a35, #3a6a4a); }
.category-card.email { background: linear-gradient(135deg, #35305a, #4a4575); }
.category-card.insta { background: linear-gradient(135deg, #5a2535, #7a3548, #6a2a40); }
.card-icon { font-size: 48px; margin-bottom: 12px; }
.category-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; font-family: 'Noto Serif JP', serif; }
.category-card p { font-size: 13px; opacity: 0.75; }
.post-count {
    display: inline-block; margin-top: 10px; font-size: 12px;
    background: rgba(201, 176, 55, 0.2); padding: 4px 14px;
    border-radius: 20px; font-weight: 500;
    border: 1px solid rgba(201, 176, 55, 0.3);
    color: #c9b037;
}
.category-card.kakao .post-count { background: rgba(201, 176, 55, 0.15); }

/* ===== How to Use ===== */
.how-to-use { margin-top: 32px; }
.steps { display: flex; gap: 16px; margin-top: 8px; }
.step {
    flex: 1; display: flex; gap: 12px; align-items: flex-start;
    background: #faf5ef; padding: 18px; border-radius: 12px;
    box-shadow: 0 2px 12px rgba(114, 47, 55, 0.06);
    border: 1px solid rgba(201, 176, 55, 0.15);
    border-left: 3px solid #c9b037;
}
.step-num {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #722f37, #983f48);
    color: #c9b037; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.step strong { font-size: 14px; display: block; margin-bottom: 2px; color: #2c1a1f; }
.step p { font-size: 12px; color: #8b7355; }

.section-title {
    font-size: 20px; font-weight: 700; margin-bottom: 16px;
    padding-bottom: 10px; display: inline-block;
    font-family: 'Noto Serif JP', serif; color: #2c1a1f;
    border-bottom: 3px double #c9b037;
}

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

/* ===== Board Screen ===== */
.back-btn {
    background: none; border: 2px solid #c9b037; padding: 8px 20px;
    border-radius: 8px; cursor: pointer; font-size: 14px;
    font-weight: 500; color: #8b7355; margin-top: 20px; transition: all 0.3s;
}
.back-btn:hover { border-color: #722f37; color: #722f37; background: rgba(114, 47, 55, 0.05); }

.board-header {
    display: flex; align-items: center; gap: 16px; margin-top: 20px;
    padding: 22px; background: #faf5ef;
    border-radius: 12px; box-shadow: 0 2px 12px rgba(114, 47, 55, 0.06);
    border: 1px solid rgba(201, 176, 55, 0.2);
    border-left: 4px solid #722f37;
}
.board-icon { font-size: 40px; }
.board-header h2 { font-size: 24px; font-weight: 700; font-family: 'Noto Serif JP', serif; color: #722f37; }

/* ===== Post Form ===== */
.post-form {
    background: #faf5ef; border-radius: 12px; padding: 28px; margin-top: 16px;
    box-shadow: 0 2px 12px rgba(114, 47, 55, 0.06);
    border: 1px solid rgba(201, 176, 55, 0.2);
}
.post-form h3 { font-size: 18px; margin-bottom: 16px; font-weight: 700; color: #722f37; }
.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: 500; color: #5a3d42; }
.required { color: #a03040; }
.form-group input, .form-group select, .form-group textarea {
    padding: 10px 14px; border: 1px solid #d4c8a8; border-radius: 8px;
    font-size: 15px; font-family: inherit; transition: all 0.3s; outline: none; width: 100%;
    background: #fefcf5;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #722f37; box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}
.form-group textarea { resize: vertical; }
.char-count { font-size: 12px; color: #a09070; text-align: right; }

.qr-upload-area { border: 2px dashed #c9b037; border-radius: 10px; overflow: hidden; transition: all 0.3s; }
.qr-upload-area.dragover { border-color: #722f37; background: #f5ece0; }
.qr-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; cursor: pointer; color: #a09070; font-size: 13px; text-align: center; }
.qr-upload-placeholder:hover { color: #722f37; }
.qr-upload-icon { font-size: 28px; }
.qr-upload-hint { font-size: 11px; color: #bba888; }
.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: 8px; border: 1px solid #d4c8a8; }
.qr-remove-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; background: #a03040; 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: #802028; }

.terms-agree { margin-top: 14px; font-size: 13px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: #722f37; }
.checkbox-label a { color: #722f37; text-decoration: underline; }

.submit-btn {
    display: block; width: 100%; margin-top: 16px; padding: 15px;
    background: linear-gradient(135deg, #722f37, #983f48);
    color: #f0e6d0; border: none; border-radius: 10px; font-size: 16px;
    font-weight: 700; cursor: pointer; transition: all 0.3s; font-family: inherit;
    letter-spacing: 2px; text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(114, 47, 55, 0.3);
    border: 1px solid rgba(201, 176, 55, 0.3);
}
.submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.submit-btn:active { transform: scale(0.98); }

/* ===== Filter ===== */
.filter-bar { display: flex; gap: 12px; margin-top: 16px; }
.filter-bar select {
    padding: 8px 12px; border: 1px solid #d4c8a8; border-radius: 8px;
    font-size: 14px; font-family: inherit; outline: none;
    background: #fefcf5; cursor: pointer; flex: 1;
}
.filter-bar select:focus { border-color: #722f37; }

/* ===== Posts ===== */
.posts-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.post-card {
    background: #faf5ef; border-radius: 12px; padding: 22px;
    box-shadow: 0 2px 12px rgba(114, 47, 55, 0.06);
    transition: all 0.3s; position: relative;
    border: 1px solid rgba(201, 176, 55, 0.12);
    border-left: 3px solid transparent;
}
.post-card:hover { box-shadow: 0 6px 24px rgba(114, 47, 55, 0.1); border-left-color: #c9b037; }
.post-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.post-avatar {
    width: 46px; height: 46px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.post-avatar.male { background: linear-gradient(135deg, #d4dce8, #c0c8d8); }
.post-avatar.female { background: linear-gradient(135deg, #f0d8e0, #e0c0c8); }
.post-avatar.other { background: linear-gradient(135deg, #d8d4e8, #c8c0d8); }
.post-info { flex: 1; min-width: 0; }
.post-name { font-weight: 700; font-size: 16px; color: #2c1a1f; }
.post-meta { font-size: 12px; color: #8b7355; margin-top: 2px; }
.post-badge { display: inline-block; padding: 3px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #f0e6d0; border: 1px solid rgba(201, 176, 55, 0.3); }
.post-badge.kakao { background: #5a4520; }
.post-badge.line { background: #2a4a35; }
.post-badge.email { background: #35305a; }
.post-badge.insta { background: linear-gradient(135deg, #5a2535, #7a3548); }
.post-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 3px 12px; border-radius: 6px; background: #ece0c8; color: #5a3d42; font-weight: 500; }
.post-message { margin-top: 12px; font-size: 14px; line-height: 1.8; color: #4a3035; white-space: pre-wrap; word-break: break-word; }
.post-contact {
    margin-top: 12px; padding: 12px 16px;
    background: linear-gradient(135deg, #f0e6d0, #ecdcc0);
    border: 1px solid #c9b037; border-radius: 8px;
    font-size: 14px; display: flex; align-items: center; gap: 8px;
}
.post-contact strong { color: #722f37; }
.post-contact .contact-value { font-weight: 500; word-break: break-all; }
.copy-btn {
    margin-left: auto; padding: 5px 14px; border: 1px solid #722f37;
    background: none; color: #722f37; border-radius: 6px;
    cursor: pointer; font-size: 12px; font-weight: 500;
    transition: all 0.3s; font-family: inherit; flex-shrink: 0;
}
.copy-btn:hover { background: #722f37; color: #f0e6d0; }
.post-qr { margin-top: 10px; text-align: center; }
.post-qr img { max-width: 120px; max-height: 120px; border-radius: 8px; border: 1px solid #d4c8a8; cursor: pointer; transition: transform 0.2s; }
.post-qr img:hover { transform: scale(1.05); }
.post-qr-label { font-size: 11px; color: #a09070; margin-top: 4px; }
.post-time { font-size: 11px; color: #b0a080; margin-top: 10px; text-align: right; }
.post-delete { position: absolute; top: 12px; right: 12px; background: none; border: none; color: #c9b037; cursor: pointer; font-size: 18px; padding: 4px; line-height: 1; transition: color 0.2s; }
.post-delete:hover { color: #a03040; }
.no-posts { text-align: center; padding: 48px 20px; color: #a09070; font-size: 16px; }

/* ===== Ads ===== */
.ad-section { margin-top: 24px; position: relative; }
.ad-section.ad-inline { margin-top: 16px; }
.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: #faf5ef;
    border-radius: 12px; overflow: hidden; text-decoration: none; color: #2c1a1f;
    box-shadow: 0 2px 10px rgba(114, 47, 55, 0.08); transition: all 0.3s;
    border: 1px solid rgba(201, 176, 55, 0.15);
}
.ad-banner:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(114, 47, 55, 0.15); }
.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.15)); }
.matching-bg { background: linear-gradient(135deg, #722f37, #983f48); }
.live-bg { background: linear-gradient(135deg, #35305a, #4a4575); }
.chat-bg { background: linear-gradient(135deg, #2a4a35, #3a6a4a); }
.ad-body { padding: 12px 14px; }
.ad-tag { display: inline-block; font-size: 10px; font-weight: 700; background: #ece0c8; color: #6b5545; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.ad-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ad-desc { font-size: 12px; color: #8b7355; line-height: 1.5; }
.ad-cta { margin-top: 8px; font-size: 13px; font-weight: 700; color: #722f37; }
.ad-banner-wide {
    display: flex; align-items: center; background: #faf5ef;
    border-radius: 12px; overflow: hidden; text-decoration: none; color: #2c1a1f;
    box-shadow: 0 2px 10px rgba(114, 47, 55, 0.08); transition: all 0.3s;
    border: 1px solid rgba(201, 176, 55, 0.15); gap: 0;
}
.ad-banner-wide:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(114, 47, 55, 0.15); }
.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: #f0e6d0;
    background: linear-gradient(135deg, #722f37, #983f48);
    align-self: stretch; display: flex; align-items: center; white-space: nowrap;
}

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #3d1520, #722f37);
    color: #f0e6d0; padding: 12px 28px; border-radius: 10px;
    font-size: 14px; font-weight: 500; z-index: 1000;
    box-shadow: 0 4px 20px rgba(30, 10, 15, 0.5); animation: toastIn 0.3s ease;
    border: 1px solid rgba(201, 176, 55, 0.3);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.related-sites { background: #ece0c8; padding: 20px 0; margin-top: 32px; border-top: 2px solid #c9b037; }
.related-sites h3 { font-size: 14px; color: #6b5545; margin-bottom: 10px; }
.related-links { display: flex; gap: 16px; flex-wrap: wrap; }
.related-links a { font-size: 13px; color: #722f37; text-decoration: none; }
.related-links a:hover { text-decoration: underline; }

/* ===== Footer ===== */
.footer {
    margin-top: auto; background: linear-gradient(135deg, #1a0e12, #2c1a1f, #1a0e12);
    color: #a09070; text-align: center; padding: 28px 0; font-size: 14px;
    border-top: 2px solid #c9b037;
}
.footer-links { margin-top: 8px; display: flex; justify-content: center; gap: 12px; font-size: 13px; }
.footer-links a { color: #c9b037; text-decoration: underline; cursor: pointer; }
.footer-links a:hover { color: #e0d060; }
.footer-links span { color: #5a4030; }
.footer-note { font-size: 11px; margin-top: 10px; opacity: 0.7; line-height: 1.6; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .header { padding: 28px 0 22px; }
    .logo { font-size: 26px; letter-spacing: 2px; }
    .category-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
    .category-card { padding: 20px 12px; }
    .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; }
    .age-gate-buttons { flex-direction: column; }
    .safety-banner { font-size: 12px; }
    .ad-grid, .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; }
}
