body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    touch-action: none;
    font-family: 'Cinzel', serif;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
}

/* ====== UI Layer ====== */
#prayer-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* 必须显著高于画布 */
    pointer-events: none; /* 重要：容器本身不拦截点击，让点击穿透到下面的按钮 */
    
}

.post-card, 
.post-input, 
.post-textarea, 
.action-btn, 
.tag-chip {
    pointer-events: auto !important; /* 强制恢复点击 */
}

/* 3. 检查你的 Canvas 容器层级 */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* 底层 */
    pointer-events: auto; /* 画布需要接收触摸以产生波纹 */
}

.prayer-step {
    pointer-events: auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
    transition: opacity 2.4s ease-in-out;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: min(92vw, 680px);
}

.step-hidden {
    opacity: 0;
    pointer-events: none;
}
.step-active {
    display: block !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
    opacity: 1;
}
.step-exit {
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    pointer-events: none;
}

/* ====== Step 1.5: Video ====== */
.step-video {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 999;
}

.step-video.step-hidden {
    transform: none !important;
    opacity: 0;
    filter: blur(0px);
    pointer-events: none;
}

.step-video.step-active {
    transform: none !important;
    opacity: 1;
    filter: blur(0px);
}

.step-video.step-exit {
    transform: none !important;
    opacity: 0;
    filter: blur(0px);
}

#ascii-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ====== Shoes Notice ====== */
#shoes-notice {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-align: center;
    line-height: 2.2;
    font-family: 'Cinzel', serif;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* ====== Tap to Pray ====== */
#tap-to-pray {
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.5rem;
    letter-spacing: 6px;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    animation: pulse 3s infinite ease-in-out;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255,0,0,0.8);
    font-family: 'Cinzel', serif;
    padding: 24px 48px;
    pointer-events: auto; /* 此时需要接收点击 */
}

@keyframes pulse {
    0%   { opacity: 0.3; transform: translate(-50%, -50%) scale(0.98); }
    50%  { opacity: 1; text-shadow: 0 0 30px rgba(255,50,50,1); transform: translate(-50%, -50%) scale(1.02); }
    100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.98); }
}

/* ====== Buttons ====== */
.action-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    padding: 12px 30px;
    border-radius: 40px;
    font-size: 1.1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: 'Cinzel', serif;
}
.action-btn.primary {
    border-color: rgba(255,50,50,0.5);
    color: white;
    background: rgba(255,0,0,0.05);
}
.action-btn:hover, .action-btn:active {
    background: rgba(255,255,255,0.1);
    color: white;
}
.action-btn.primary:hover, .action-btn.primary:active {
    background: rgba(255,0,0,0.3);
    box-shadow: 0 0 20px rgba(255,0,0,0.6);
    border-color: rgba(255,50,50,0.9);
}

/* ====== Prompt Text ====== */
.prompt-text {
    font-size: 2.1rem;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: 2.2;
    text-transform: none;
}
.prompt-sub {
    font-size: 1.15rem;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    opacity: 0.6;
    letter-spacing: 2px;
    display: block;
    margin-top: 5px;
    line-height: 2.4;
    text-transform: none;
}

/* ====== Look Up Arrow ====== */
.look-up-arrow {
    font-size: 3.5rem;
    color: rgba(255, 80, 80, 0.9);
    animation: floatUp 2s infinite ease-in-out;
    display: block;
    margin: 28px 0 16px;
    text-shadow: 0 0 30px rgba(255,0,0,0.9);
    line-height: 1;
}

@keyframes floatUp {
    0%   { transform: translateY(5px); opacity: 0.4; }
    50%  { transform: translateY(-12px); opacity: 1; }
    100% { transform: translateY(5px); opacity: 0.4; }
}

/* Tap Fountain Prompt */
.tap-prompt {
    position: fixed;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    letter-spacing: 4px;
    opacity: 0;
    transition: opacity 2.5s ease;
    white-space: nowrap;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    pointer-events: none;
    animation: subtlePulse 3s infinite ease-in-out;
}

.tap-prompt.visible {
    opacity: 1;
    pointer-events: auto;
}

@keyframes subtlePulse {
    0%, 100% { opacity: 0; }
    50%  { opacity: 1; }
}

/* Small instruction shown in step-2 telling user they can tap anywhere */
.tap-next {
    margin-top: 180px;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    opacity: 0.0;
    transition: opacity 0.6s ease;
}
.tap-next.visible {
    opacity: 1.0;
}

/* ====== Post Composer Override ====== */
.post-step {
    top: 50% !important;
    max-width: 500px;
    width: 94%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.post-step::-webkit-scrollbar { display: none; }

.post-step.step-hidden {
    transform: translate(-50%, -50%) !important;
}
.post-step.step-active {
    transform: translate(-50%, -50%) !important;
}
.post-step.step-exit {
    transform: translate(-50%, -50%) !important;
}

/* ====== Post Card ====== */
.post-card {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(160, 10, 10, 0.45);
    border-radius: 22px;
    padding: 22px 22px 26px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 0 50px rgba(140, 0, 0, 0.18),
        inset 0 0 40px rgba(255,0,0,0.03);
    text-align: left;
    -webkit-user-select: auto;
    user-select: auto;


}


/* Platform header bar */
.post-platform-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    letter-spacing: 6px;
    font-size: 0.7rem;
    color: rgba(200, 20, 20, 0.75);
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 14px;
}

.post-platform-icon {
    font-size: 0.6rem;
    opacity: 0.7;
}

/* User header */
.post-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 100px;
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1.5px solid rgba(190, 10, 10, 0.65);
    box-shadow: 0 0 18px rgba(190,0,0,0.35), inset 0 0 12px rgba(255,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(25, 0, 0, 0.7);
    font-size: 1.4rem;
    color: rgba(255, 80, 80, 0.9);
    text-shadow: 0 0 12px rgba(255,0,0,0.6);
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0) invert(1);
}

.post-user-info {
    flex: 1;
    min-width: 0;
}

.post-meta-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.meta-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
    opacity: 0.65;
}

/* Inputs & Textarea */
.post-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Cinzel', serif;
    padding: 5px 0;
    font-size: 16px;
    letter-spacing: 1px;
    width: 100%;
    outline: none;
    -webkit-user-select: auto;
    user-select: auto;
    pointer-events: auto;
    touch-action: auto;
    caret-color: rgba(255, 80, 80, 0.85);
    box-sizing: border-box;
}

.post-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Cinzel', serif;
}

.post-input:focus {
    border-bottom-color: rgba(190, 10, 10, 0.7);
}

.name-input {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2px;
}

.meta-input {
    font-size: 13px !important;
    opacity: 0.82;
    letter-spacing: 0.5px;
}

/* Divider */
.post-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 16px 0;
}

/* Prayer textarea */
.post-content-wrap {
    position: relative;
}

.post-textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.88);
    font-family: 'Cinzel', serif;
    font-size: 15px;
    letter-spacing: 1px;
    line-height: 1.75;
    resize: none;
    outline: none;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: auto;
    user-select: auto;
    pointer-events: auto;
    touch-action: auto;
    caret-color: rgba(255, 80, 80, 0.85);
    min-height: 90px;
    display: block;
}

.post-textarea::placeholder {
    color: rgba(255, 255, 255, 0.22);
    font-family: 'Cinzel', serif;
}

.char-counter {
    text-align: right;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 1px;
    margin-top: 6px;
    font-family: 'Cinzel', serif;
}

/* Tags */

.tags-label {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: rgba(190, 10, 10, 0.8);
    margin-bottom: 12px;
    font-family: 'Cinzel', serif;
}

.preset-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.tag-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.74rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: all 0.3s ease;
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.tag-chip.selected {
    background: rgba(160, 0, 0, 0.28);
    border-color: rgba(200, 15, 15, 0.75);
    color: rgba(255, 110, 110, 1);
    box-shadow: 0 0 10px rgba(180,0,0,0.3);
}

.custom-tag-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.custom-tag-input {
    font-size: 13px !important;
    flex: 1;
    letter-spacing: 0.5px;
}

.tag-add-btn {
    padding: 7px 16px !important;
    font-size: 0.7rem !important;
    letter-spacing: 2px !important;
    border-radius: 20px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.selected-tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}

.selected-tag {
    background: rgba(160, 0, 0, 0.22);
    border: 1px solid rgba(190, 10, 10, 0.5);
    color: rgba(255, 120, 120, 0.9);
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: opacity 0.3s;
}

.selected-tag:hover {
    opacity: 0.6;
    text-decoration: line-through;
}

/* Post submit button */
.post-submit-btn {
    width: 100%;
    margin-top: 22px !important;
    padding: 16px !important;
    font-size: 1rem !important;
    letter-spacing: 6px !important;
    border-radius: 40px !important;
    background: rgba(160, 0, 0, 0.12) !important;
    border-color: rgba(200, 10, 10, 0.55) !important;
    box-shadow: 0 0 25px rgba(180,0,0,0.18) !important;
    transition: all 0.4s ease !important;
}

.post-submit-btn:hover, .post-submit-btn:active {
    background: rgba(200, 0, 0, 0.3) !important;
    box-shadow: 0 0 40px rgba(200,0,0,0.55) !important;
    border-color: rgba(255, 50, 50, 0.9) !important;
}

/* ====== Step 0-5 ====== */
#step-0-5 {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
}

.intro-text {
    font-size: 1.85rem;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    letter-spacing: 1px;
    line-height: 2.6;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
}

.intro-subtext {
    position: fixed;
    bottom: -80%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: pulse 5s infinite ease-in-out;
    pointer-events: none;
}



