/* 底部评论输入条 */
.comment-section {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 70px;
    padding: 0 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
    pointer-events: none;
    transition: all 0.3s ease;
    gap: 8px;
}

.comment-bell-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: auto;
    flex-shrink: 0;
    margin-right: 10px;
}

.comment-bell-btn svg {
    width: 16px;
    height: 16px;
}

.comment-bell-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.25);
}

.comment-form-container {
    width: 100%;
    max-width: 420px;
    background: rgba(12, 16, 29, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 8px;
    box-shadow: 0 16px 32px rgba(5, 8, 20, 0.4);
    pointer-events: auto;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: all 0.3s ease;
}

.comment-form-container-inner {
    display: contents;
}

.comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
}

.comment-form textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    font-size: 13px;
    line-height: 38px;
    padding: 0 8px;
    color: #fff;
    font-family: "b", "a", sans-serif;
    vertical-align: middle;
    overflow: hidden;
}

.comment-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.comment-form textarea:focus {
    outline: none;
}

.comment-submit-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.comment-submit-btn::after {
    content: '';
    width: 16px;
    height: 16px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'/%3E%3C/svg%3E") center/contain no-repeat;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.comment-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.25);
}

.comment-status {
    padding-top: 4px;
    font-size: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

/* 评论成功气泡动画 - 简洁无背景，向上漂浮并淡出 */
.comment-success-bubble {
    position: fixed;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    z-index: 10000;
    padding: 10px 20px;
    background: transparent;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
}

.comment-success-bubble.show {
    animation: bubble-rise 3s ease-out forwards;
}

@keyframes bubble-rise {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateX(-50%) translateY(-30px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 弹幕区域 */
.danmaku-stream {
    position: fixed;
    left: 0;
    right: 0;
    top: 120px;
    bottom: 190px;
    pointer-events: none;
    overflow: hidden;
    z-index: 200;
}

.danmaku-item {
    position: absolute;
    left: 100%;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: danmaku-move linear;
}

/* 最新10条弹幕使用淡绿色 */
.danmaku-item.danmaku-newest {
    color: rgba(144, 238, 144, 0.95);
    border-color: rgba(144, 238, 144, 0.3);
}

@keyframes danmaku-move {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-130vw);
    }
}

@media (max-width: 768px) {
    .comment-section {
        bottom: 20px;
        padding: 0 12px;
        flex-direction: row;
        align-items: center;
    }

    .comment-bell-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin-bottom: 0;
        pointer-events: auto;
    }

    .comment-form-container {
        max-width: 90%;
        width: 90%;
        border-radius: 999px;
        padding: 4px 6px 4px 14px;
        display: flex;
        align-items: center;
    }

    .comment-form {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .comment-form textarea {
        min-height: 32px;
        max-height: 32px;
        line-height: 32px;
        padding: 0;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        vertical-align: middle;
        text-align: center;
    }

    .comment-submit-btn {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .danmaku-stream {
        top: 100px;
        bottom: 150px;
    }
}

/* 移除浮动按钮（如有遗留，不显示） */
.mobile-comment-btn { display: none !important; }

/* 手机端弹幕发送条改进 */
@media (max-width: 768px) {
    .comment-section {
        bottom: 20px;
        padding: 0 12px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        gap: 8px;
    }
    .comment-form-container {
        width: 100%;
        max-width: 100%;
        display: flex;
        padding: 4px 8px;
        pointer-events: auto;
    }
    .comment-form {
        gap: 8px;
        height: 40px;
        width: 100%;
    }
    .comment-bell-btn {
        width: 36px;
        height: 36px;
        margin-bottom: 0;
    }
    .comment-submit-btn {
        width: 36px;
        height: 36px;
    }
    .comment-form textarea {
        height: 36px;
        min-height: 36px;
        max-height: 36px;
        line-height: 36px;
        padding: 0 8px;
        text-align: left;
    }
}
