/**
 * 青春一隅 - 自定义样式
 * TailwindCSS补充样式
 */

/* ========== 图片轮播 ========== */
.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

/* ========== 聊天气泡 ========== */
.chat-msg-enter {
    animation: chatMsgIn 0.3s ease-out;
}

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

/* ========== iOS安全区域适配 ========== */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ========== 文本截断 ========== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-hover);
}

/* ========== 表单输入框自动填充背景色覆盖 ========== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px var(--autofill-bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ========== 移动端底部导航栏页面内容留白 ========== */
@media (max-width: 767px) {
    body {
        padding-bottom: 3.5rem;
    }
}

/* ========== 暗黑模式辅助 ========== */
.dark .scrollbar-hide::-webkit-scrollbar-thumb {
    background: transparent;
}
