/* ===================================================================
   崩坏的信息 — 模因收集页样式
   「雾与河」主题 · 蜃景数据流 + 水蓝紫缀 · 保持崩坏/故障气质
   =================================================================== */

/* ---- 页面背景：保留蜃雾白，去掉全局深色覆盖 ---- */
body {
    background: var(--lc-mist, #F7F8FB) !important;
}

/* ---- Wrapper ---- */
.collapse-wrapper {
    position: relative;
    min-height: 80vh;
    overflow: hidden;
    padding-bottom: 20px;
}

/* ---- Word Stream Canvas (深色文字数据流) ---- */
.word-stream-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* 2026-09-17：改用深色文字后略微提高整体不透明度，保证可读（原 0.45） */
    opacity: 0.70;
}

/* ===================================================================
   Main Visual Layout
   =================================================================== */
.collapse-main-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 30px 20px;
    min-height: 520px;
    flex-wrap: wrap;
}

/* ===================================================================
   Center Info Block
   =================================================================== */
.collapse-center {
    text-align: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    background: var(--lc-card, #EEF4F9);
    border: 1px solid rgba(72, 153, 203, 0.16);
    border-radius: 24px;
    padding: 34px 40px;
    box-shadow: 0 14px 36px rgba(44, 53, 68, 0.08);
    max-width: 640px;
}

.collapse-title-block {
    margin-bottom: 4px;
}

.collapse-title {
    font-family: var(--lc-serif, 'Noto Serif SC', serif);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 8px;
    margin: 0;
    position: relative;
    color: var(--lc-blue-deep, #2A5F85);
}

.title-glitch {
    position: relative;
    display: inline-block;
    color: var(--lc-blue-deep, #2A5F85);
    text-shadow:
        0 0 15px rgba(72, 153, 203, 0.35),
        0 0 40px rgba(148, 130, 188, 0.25),
        2px 2px 0 rgba(72, 153, 203, 0.35),
        -2px -2px 0 rgba(216, 168, 188, 0.40);
    animation: glitchText 5s infinite;
}

.title-glitch::before,
.title-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.title-glitch::before {
    animation: glitchClip1 4s infinite linear alternate-reverse;
    color: var(--lc-blue, #4899CB);
    z-index: -1;
    opacity: 0.55;
}

.title-glitch::after {
    animation: glitchClip2 5s infinite linear alternate;
    color: var(--lc-pink, #D8A8BC);
    z-index: -2;
    opacity: 0.5;
}

@keyframes glitchText {
    0%, 90%, 100% { transform: none; }
    92% { transform: translate(-2px, 1px); }
    94% { transform: translate(2px, -1px); }
    96% { transform: translate(-1px, -1px); }
    98% { transform: translate(1px, 1px); }
}

@keyframes glitchClip1 {
    0%   { clip-path: inset(0 0 80% 0); }
    20%  { clip-path: inset(20% 0 40% 0); }
    40%  { clip-path: inset(60% 0 10% 0); }
    60%  { clip-path: inset(10% 0 75% 0); }
    80%  { clip-path: inset(45% 0 30% 0); }
    100% { clip-path: inset(30% 0 55% 0); }
}

@keyframes glitchClip2 {
    0%   { clip-path: inset(75% 0 0 0); }
    25%  { clip-path: inset(40% 0 30% 0); }
    50%  { clip-path: inset(5% 0 70% 0); }
    75%  { clip-path: inset(55% 0 15% 0); }
    100% { clip-path: inset(20% 0 50% 0); }
}

.collapse-subtitle {
    font-family: var(--lc-serif, 'Noto Serif SC', serif);
    color: var(--lc-ink-2, #69687C);
    font-size: 1.05rem;
    letter-spacing: 3px;
    margin-top: 8px;
}

/* ---- Pun Counter ---- */
.pun-counter-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 14px 28px;
    background: #FFFFFF;
    border: 1px solid rgba(72, 153, 203, 0.30);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(72, 153, 203, 0.12), inset 0 0 20px rgba(72, 153, 203, 0.04);
}

.pun-counter-label {
    font-family: var(--lc-sans, 'Noto Sans SC', sans-serif);
    color: var(--lc-ink-2, #69687C);
    font-size: 1rem;
    letter-spacing: 2px;
}

.pun-counter-number {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--lc-blue, #4899CB);
    text-shadow: 0 0 10px rgba(72, 153, 203, 0.45), 0 0 30px rgba(148, 130, 188, 0.25);
    line-height: 1;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.pun-counter-number.bump {
    animation: counterBump 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes counterBump {
    0%   { transform: scale(1); color: var(--lc-blue); }
    40%  { transform: scale(1.3); color: var(--lc-purple-dark, #7C6BA6); }
    100% { transform: scale(1); }
}

/* ---- Submit Button ---- */
.btn-submit-pun {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 36px;
    font-family: var(--lc-serif, 'Noto Serif SC', serif);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #FFF;
    background: linear-gradient(135deg, var(--lc-blue, #4899CB), var(--lc-purple, #9482BC));
    border: 2px solid rgba(232, 212, 168, 0.7);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.35s ease;
    box-shadow: 0 4px 20px rgba(72, 153, 203, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-submit-pun::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--lc-gold, #E8D4A8), var(--lc-blue, #4899CB), var(--lc-purple, #9482BC), var(--lc-pink, #D8A8BC));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.btn-submit-pun:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(72, 153, 203, 0.55), 0 0 50px rgba(232, 212, 168, 0.3);
    color: #FFF;
}

.btn-submit-pun:hover::before {
    opacity: 0.5;
    animation: borderGlow 1.5s linear infinite;
}

@keyframes borderGlow {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.btn-submit-pun:active {
    transform: scale(0.96);
}

.btn-submit-pun .btn-icon {
    font-size: 1.3rem;
}

/* ---- Login Prompt ---- */
.login-prompt {
    text-align: center;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid rgba(72, 153, 203, 0.22);
    border-radius: 14px;
    width: 100%;
}

.login-prompt p {
    color: var(--lc-ink-2, #69687C);
    margin-bottom: 14px;
    font-size: 1rem;
}

.login-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ---- Remaining Info ---- */
.remaining-info {
    color: var(--lc-ink-2, #69687C);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.remaining-info strong {
    color: var(--lc-blue-dark, #3A7FAE);
    font-size: 1.2rem;
}

/* ---- Muted Notice ---- */
.muted-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(169, 79, 104, 0.10);
    border: 1px solid rgba(169, 79, 104, 0.35);
    border-radius: 12px;
    color: var(--lc-dark-red, #A94F68);
    font-weight: 600;
    letter-spacing: 1px;
}

.muted-icon {
    font-size: 1.5rem;
}

/* ---- Nickname checkbox label ---- */
.form-check-label {
    color: var(--lc-ink, #2C3544);
    font-size: 0.95rem;
    user-select: none;
}

/* ===================================================================
   Submit Modal
   =================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: rgba(42, 66, 88, 0.5);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease-out;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.collapse-modal {
    background: linear-gradient(160deg, #FFFFFF, var(--lc-card, #EEF4F9));
    border: 1px solid rgba(72, 153, 203, 0.30);
    border-radius: 20px;
    padding: 36px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(42, 95, 133, 0.35), 0 0 40px rgba(148, 130, 188, 0.10);
    animation: modalSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: var(--lc-ink-2, #69687C);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--lc-blue-dark, #3A7FAE);
    background: rgba(72, 153, 203, 0.10);
}

.modal-header-section {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header-section h2 {
    font-family: var(--lc-serif, 'Noto Serif SC', serif);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--lc-blue-deep, #2A5F85);
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.modal-subtitle {
    color: var(--lc-ink-2, #69687C);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ---- Form inside modal ---- */
.pun-input {
    background: #FFFFFF !important;
    border: 1px solid rgba(72, 153, 203, 0.30) !important;
    color: var(--lc-ink, #2C3544) !important;
    font-family: var(--lc-sans, 'Noto Sans SC', sans-serif) !important;
    font-size: 1rem !important;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease !important;
}

.pun-input:focus {
    border-color: var(--lc-blue, #4899CB) !important;
    box-shadow: 0 0 15px rgba(72, 153, 203, 0.15) !important;
}

.pun-input::placeholder {
    color: #A9B0BD;
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--lc-ink-2, #69687C);
    margin-top: 4px;
}

.required {
    color: var(--lc-dark-red, #A94F68);
}

.review-notice {
    font-size: 0.85rem;
    color: var(--lc-ink-2, #69687C);
    text-align: center;
    padding: 8px 12px;
    background: rgba(148, 130, 188, 0.10);
    border-radius: 8px;
    margin: 0;
}

/* ---- Submit result ---- */
.submit-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.submit-result.success {
    background: rgba(87, 153, 102, 0.10);
    border: 1px solid rgba(87, 153, 102, 0.35);
    color: #3F7148;
}

.submit-result.error {
    background: rgba(169, 79, 104, 0.08);
    border: 1px solid rgba(169, 79, 104, 0.35);
    color: #A94F68;
}

.submit-result .result-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.submit-result .result-msg {
    font-size: 0.95rem;
}

/* ---- Loading spinner ---- */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(72, 153, 203, 0.30);
    border-top-color: var(--lc-blue, #4899CB);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Toast ---- */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: 12px;
    font-family: var(--lc-sans, 'Noto Sans SC', sans-serif);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), toastOut 0.3s 3s ease-out forwards;
    pointer-events: none;
    max-width: 360px;
    box-shadow: 0 4px 15px rgba(44, 53, 68, 0.2);
}

.toast.success {
    background: rgba(87, 153, 102, 0.92);
    color: #FFF;
    box-shadow: 0 4px 15px rgba(87, 153, 102, 0.4);
}

.toast.error {
    background: rgba(169, 79, 104, 0.92);
    color: #FFF;
    box-shadow: 0 4px 15px rgba(169, 79, 104, 0.4);
}

.toast.info {
    background: rgba(72, 153, 203, 0.92);
    color: #FFF;
    box-shadow: 0 4px 15px rgba(72, 153, 203, 0.4);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

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

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 992px) {
    .collapse-main-visual {
        flex-direction: column;
        gap: 20px;
        padding: 15px 10px;
    }

    .collapse-title {
        font-size: 2.2rem;
        letter-spacing: 4px;
    }

    .pun-counter-number {
        font-size: 2.5rem;
    }

}

@media (max-width: 576px) {
    .collapse-main-visual {
        gap: 15px;
    }

    .collapse-center { padding: 24px 16px; }

    .collapse-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .pun-counter-block {
        padding: 10px 16px;
        gap: 6px;
    }

    .pun-counter-number {
        font-size: 2rem;
    }
}
