/* Message Page — Doodle Studio Style */
/* 公共样式（CSS变量/页面基础/header涂鸦化/动画/reveal/toast）已提取至 common.css */

/* message 专属：弹幕详情层叠 */
body.page-message .danmaku-detail { position: fixed; z-index: 9998; }

/* ====== 通用 main ====== */
.page-message .main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 16px;
}

/* ====== HERO ====== */
.msg-hero {
    position: relative;
    padding: 144px 0 80px;
    text-align: center;
    overflow: hidden;
}
.msg-hero-blob {
    position: absolute;
    border: 4px solid var(--ink);
    opacity: 0.3;
}
.msg-hero-blob.b1 { top: 96px; left: 5%; width: 112px; height: 112px; background: var(--yellow); border-radius: 50%; animation: bounce-slow 4s ease-in-out infinite; }
.msg-hero-blob.b2 { bottom: 32px; right: 5%; width: 144px; height: 144px; background: var(--pink); border-radius: 50%; opacity: 0.25; animation: float-anim 4s ease-in-out infinite; }
.msg-hero-blob.b3 { top: 40%; left: 8%; width: 56px; height: 56px; background: var(--blue); transform: rotate(12deg); border-width: 2px; opacity: 0.2; }
.msg-hero-blob.b4 { top: 20%; right: 12%; width: 36px; height: 36px; background: var(--green); border-radius: 8px; border-width: 2px; opacity: 0.3; animation: spin-slow 10s linear infinite; }
.msg-hero-star {
    position: absolute;
    opacity: 0.5;
}
.msg-hero-star.s1 { top: 128px; right: 20%; width: 40px; height: 40px; color: var(--orange); opacity: 0.5; animation: wiggle 3s ease-in-out infinite; }
.msg-hero-star.s2 { bottom: 80px; left: 18%; width: 32px; height: 32px; color: var(--blue); opacity: 0.4; animation: bounce-slow 4s ease-in-out infinite; }

.msg-hero-inner {
    position: relative;
    z-index: 10;
    max-width: 56rem;
    margin: 0 auto;
}

/* HERO 徽章 */
.msg-badge-wrap {
    display: inline-block;
    margin-bottom: 32px;
    position: relative;
}
.msg-badge-wrap:hover .msg-badge-shadow { transform: translate(4px, 4px); }
.msg-badge-wrap:hover .msg-badge-main { transform: rotate(0); }
.msg-badge-shadow {
    position: absolute;
    inset: 0;
    background: var(--green);
    transform: translate(8px, 8px);
    border-radius: 8px;
    border: 2px solid var(--ink);
    transition: transform 0.2s ease;
}
.msg-badge-main {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 24px;
    border-radius: 8px;
    border: 2px solid var(--ink);
    font-weight: 800;
    font-size: 16px;
    transform: rotate(-2deg);
    transition: transform 0.2s ease;
}
.msg-badge-main svg { width: 20px; height: 20px; color: var(--pink); }

/* HERO 大标题 */
.msg-title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 32px;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.msg-title-accent {
    position: relative;
    display: inline-block;
    color: var(--blue);
}
.msg-title-accent svg {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
}
.msg-lede {
    font-size: 18px;
    color: #4b5563;
    margin-bottom: 16px;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-weight: 600;
    line-height: 1.7;
}
.msg-lede .br-md { display: none; }

/* HERO 档案条 */
.msg-hero-meta {
    margin-top: 40px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.8);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 8px 20px;
    box-shadow: var(--shadow-hard-sm);
    font-weight: 700;
    font-size: 12px;
}
.msg-hero-meta svg { width: 16px; height: 16px; color: var(--orange); }

/* ====== 通用 Section ====== */
.msg-section { padding: 40px 0 80px; }
.msg-section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 48px;
}
.msg-section-tag {
    color: #fff;
    padding: 4px 16px;
    border-radius: 999px;
    border: 2px solid var(--ink);
    font-weight: 900;
    font-size: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-hard-sm);
}
.msg-section-tag.blue { background: var(--blue); transform: rotate(2deg); }
.msg-section-tag.pink { background: var(--pink); transform: rotate(-2deg); }
.msg-section-title {
    font-size: 36px;
    font-weight: 900;
    text-align: center;
    position: relative;
}
.msg-section-title .star-deco {
    position: absolute;
    right: -40px;
    top: -24px;
    width: 36px;
    height: 36px;
    color: var(--yellow);
    animation: bounce-slow 4s ease-in-out infinite;
}
.msg-section-sub {
    color: #6b7280;
    margin-top: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 14px;
}

/* ====== § 01 投匣 ====== */
.compose-card {
    position: relative;
    background: #fff;
    border: 3px solid var(--ink);
    border-radius: 28px;
    box-shadow: var(--shadow-hard-lg);
    padding: 32px;
    overflow: hidden;
}
.compose-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.05;
    pointer-events: none;
    background-image: radial-gradient(var(--ink) 1px, transparent 1px);
    background-size: 24px 24px;
}
.compose-inner { position: relative; z-index: 10; }

/* textarea */
.msg-textarea {
    width: 100%;
    font-family: var(--font-doodle);
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow-hard-sm);
    outline: none;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.msg-textarea:focus {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 0 var(--blue);
}
.msg-textarea::placeholder {
    color: #9ca3af;
    font-family: var(--font-doodle);
    font-weight: 600;
}

/* compose footer */
.compose-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 16px;
}
.char-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #888;
    font-weight: 500;
}
.cooldown-text {
    font-family: var(--font-doodle);
    font-weight: 800;
    font-size: 13px;
    color: var(--pink);
    margin-right: 12px;
}

/* 提交按钮 */
.msg-submit-btn {
    font-family: var(--font-doodle);
    font-weight: 900;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 16px;
    background: var(--ink);
    color: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 0 var(--pink);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.msg-submit-btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 var(--pink); }
.msg-submit-btn:active:not(:disabled) { transform: translate(1px, 1px); box-shadow: 2px 2px 0 0 var(--pink); }
.msg-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.msg-submit-btn svg { width: 18px; height: 18px; }
.spinner { width: 18px; height: 18px; animation: spin 0.8s linear infinite; }

/* compose 须知 */
.compose-notes {
    margin-top: 28px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.note-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 8px 16px;
    box-shadow: var(--shadow-hard-sm);
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
}
.note-chip svg { width: 16px; height: 16px; }
.note-chip.yellow { background: var(--yellow); }
.note-chip.green { background: var(--green); }
.note-chip.blue { background: var(--blue); color: #fff; }
.note-chip.pink { background: var(--pink); color: #fff; }

/* ====== § 02 弹幕墙 ====== */
.danmaku-frame {
    position: relative;
    background: #fff;
    border: 3px solid var(--ink);
    border-radius: 28px;
    box-shadow: var(--shadow-hard-lg);
    overflow: hidden;
}
.danmaku-frame-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 2px solid var(--ink);
    background: var(--paper);
}
.danmaku-frame-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--yellow);
    padding: 4px 12px;
    border-radius: 999px;
    border: 2px solid var(--ink);
    box-shadow: var(--shadow-hard-sm);
}
.danmaku-frame-tag.right {
    background: var(--green);
    margin-left: auto;
}
.danmaku-frame-rule {
    flex: 1;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
}

.danmaku-container {
    position: relative;
    height: 320px;
    overflow: hidden;
    background-image: radial-gradient(var(--ink) 0.6px, transparent 0.6px);
    background-size: 24px 24px;
    background-position: 0 0;
}

/* 弹幕涂鸦贴纸样式 */
.danmaku-item {
    position: absolute;
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 2px 2px 0 0 var(--ink);
    font-family: var(--font-doodle);
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}
/* 五色随机配色 */
.danmaku-item.danmaku-yellow { background: var(--yellow); }
.danmaku-item.danmaku-pink { background: var(--pink); color: #fff; }
.danmaku-item.danmaku-blue { background: var(--blue); color: #fff; }
.danmaku-item.danmaku-green { background: var(--green); }
.danmaku-item.danmaku-white { background: #fff; }
.danmaku-item.danmaku-hover {
    transform: scale(1.08);
    box-shadow: 4px 4px 0 0 var(--pink);
    z-index: 10;
}

/* 弹幕底部装饰 */
.danmaku-frame-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 2px solid var(--ink);
    background: var(--paper);
}
.danmaku-tick {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ink);
    opacity: 0.3;
}
.danmaku-corner {
    width: 10px;
    height: 10px;
    border: 2px solid var(--ink);
}
.danmaku-corner.tl { border-right: none; border-bottom: none; }
.danmaku-corner.tr { border-left: none; border-bottom: none; margin-left: auto; }

/* ====== 弹幕详情卡片 ====== */
.danmaku-detail {
    width: 300px;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 20px;
    box-shadow: 6px 6px 0 0 var(--ink);
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.danmaku-detail.show {
    opacity: 1;
    transform: translateY(0);
}
.danmaku-detail-head {
    margin-bottom: 12px;
}
.danmaku-detail-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    background: var(--pink);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1.5px solid var(--ink);
}
.danmaku-detail-content {
    font-family: var(--font-doodle);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    margin-bottom: 12px;
    word-break: break-word;
}
.danmaku-detail-time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #888;
    margin-bottom: 12px;
}
.danmaku-detail-reply {
    background: var(--yellow);
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow-hard-sm);
}
.reply-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-doodle);
    font-weight: 900;
    font-size: 12px;
    color: var(--ink);
    margin-bottom: 6px;
}
.reply-label svg { width: 14px; height: 14px; }
.reply-text {
    font-family: var(--font-doodle);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
}

/* ====== Toast 变体（基础 .toast 已提取至 common.css） ====== */
.toast.success { background: var(--green); color: var(--ink); box-shadow: 4px 4px 0 0 var(--ink); }
.toast.error { background: var(--pink); color: #fff; box-shadow: 4px 4px 0 0 var(--ink); }

/* ====== COLOPHON ====== */
.msg-colophon {
    padding: 48px 0 32px;
    text-align: center;
}
.msg-colophon-bar {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 10px 24px;
    box-shadow: var(--shadow-hard-sm);
    font-weight: 900;
    font-size: 12px;
}

/* ====== 响应式 ====== */
@media (min-width: 640px) {
    .msg-title { font-size: 72px; }
    .msg-lede .br-md { display: block; }
}
@media (min-width: 768px) {
    .msg-hero-blob.b3 { display: block; }
    .msg-hero-star.s1, .msg-hero-star.s2 { display: block; }
    .msg-section-title { font-size: 48px; }
    .compose-card { padding: 48px; }
    .danmaku-container { height: 400px; }
}
