/* ========================================
   中南漂流瓶 — 完全静态版 · 无特效
   移除所有动画、过渡、运动元素
   ======================================== */

/* === 重置 & 变量 === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink:       #F68BA0;
    --pink-light:  #F9B8C8;
    --lavender:     #B89FE0;
    --lav-light:    #D5C0F0;
    --coral:        #FF6B6B;
    --sky:          #A8D8F5;
    --mint:         #7EC8A0;

    --text:       #4A3F5C;
    --text-mid:   #8B7D9B;
    --text-light: #B8A8C8;
    --white:      #FFFFFF;

    --shadow-sm:  0 1px 4px rgba(160, 140, 180, 0.08);
    --shadow-md:  0 2px 8px rgba(160, 140, 180, 0.10);

    --radius-sm:  10px;
    --radius-md:  16px;
    --radius-lg:  22px;

    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    background: #F8F0F5;
}

/* ========================================
   主容器
   ======================================== */
#app {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ========================================
   背景 — 完全静态渐变（无任何动画）
   ======================================== */
.bg-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        #FCE8F0 0%,
        #F8E4F6 30%,
        #F0DFF8 60%,
        #E8D8F2 100%
    );
}

/* ========================================
   顶部标题区
   ======================================== */
.header {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 32px 20px 12px;
    flex-shrink: 0;
}

.header-subtitle {
    font-size: 14px;
    color: #A085B0;
    letter-spacing: 2.5px;
    font-weight: 400;
}

/* 用户信息（登录后显示） */
.user-info {
    position: absolute;
    top: 28px;
    right: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 20px;
    padding: 4px 12px 4px 4px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    min-height: 36px;
}

.user-info:active {
    background: rgba(255, 255, 255, 0.92);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--pink-light);
    object-fit: cover;
}

.user-name {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   内容滚动区
   ======================================== */
.content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 5;
    padding-bottom: 20px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   底部操作栏 — 静态样式（无缩放动画）
   ======================================== */
.bottom-bar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    padding: 10px 20px calc(14px + var(--safe-bottom));
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.85) 30%, rgba(255,255,255,0.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* 版本标记：v2026061401 */
    border-top: 2px solid rgba(200,160,210,0.3);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    min-width: 82px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* 按钮顶部色条 */
.action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3.5px;
    border-radius: 2px 2px 0 0;
}

.throw-btn::before { background: linear-gradient(90deg, var(--pink), var(--pink-light)); }
.pick-btn::before  { background: linear-gradient(90deg, var(--lavender), var(--lav-light)); }
.my-btn::before    { background: linear-gradient(90deg, var(--sky), #C8E8F8); }

.btn-icon {
    font-size: 38px;
    line-height: 1;
    margin-bottom: 2px;
}

.btn-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    letter-spacing: 0.5px;
}

.throw-btn .btn-label { color: var(--pink); }
.pick-btn .btn-label  { color: var(--lavender); }
.my-btn .btn-label    { color: #6BA8D0; }

/* 按下态（无缩放，仅背景变化） */
.throw-btn:active { background: #FFF0F5; }
.pick-btn:active  { background: #F8F2FF; }
.my-btn:active    { background: #F0F8FF; }

/* ========================================
   扔瓶子弹窗
   ======================================== */
.throw-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(80, 60, 90, 0.40);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.throw-modal {
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px 18px calc(20px + var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #F2ECF6;
    border-radius: 50%;
    font-size: 18px;
    color: var(--text-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 文本框 */
.throw-textarea {
    width: 100%;
    min-height: 140px;
    border: 1.5px solid #E8E0F0;
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: #FAF8FC;
    resize: none;
    outline: none;
    font-family: inherit;
    margin-bottom: 14px;
}

.throw-textarea:focus {
    border-color: var(--lav-light);
    background: var(--white);
}

.throw-textarea::placeholder {
    color: #C8B8D8;
}

/* 字数统计 */
.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-light);
    margin-top: -8px;
    margin-bottom: 14px;
}

/* 上传区域 */
.upload-area {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: #F8F4FC;
    border: 1.5px dashed #D8C8E8;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-mid);
    cursor: pointer;
    white-space: nowrap;
}

.upload-btn:active {
    background: #F0ECF8;
}

/* 预览 */
.preview-area {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1.5px solid #E8E0F0;
}

.preview-item img,
.preview-item audio {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 提交按钮 */
.throw-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--pink), var(--lavender));
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 2px;
}

.throw-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   捞瓶子弹窗
   ======================================== */
.pick-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(80, 60, 90, 0.40);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pick-modal {
    width: 100%;
    max-width: 400px;
    max-height: 82vh;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 22px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pick-bottle-info {
    background: linear-gradient(135deg, #FFF8FC, #F8F4FE);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #F0E8F8;
}

.pick-bottle-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.pick-bottle-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.pick-bottle-meta img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

/* 评论区 */
.comments-section {
    margin-top: 14px;
}

.comments-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F5F0F8;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-nickname {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    word-break: break-word;
}

.comment-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 评论输入 */
.comment-input-area {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    align-items: flex-end;
}

.comment-input {
    flex: 1;
    border: 1.5px solid #E8E0F0;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 80px;
    outline: none;
    font-family: inherit;
    background: #FAF8FC;
    color: var(--text);
}

.comment-input:focus {
    border-color: var(--lav-light);
    background: var(--white);
}

.comment-submit {
    padding: 10px 18px;
    background: var(--lavender);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.comment-submit:disabled {
    opacity: 0.5;
}

/* ========================================
   我的瓶子弹窗
   ======================================== */
.my-bottles-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(80, 60, 90, 0.40);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.my-bottles-modal {
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px 18px calc(20px + var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 个人统计 — 与卡片风格统一 */
.my-stats {
    margin: 4px 14px 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: #FAF8FC;
    border: 1px solid #F0ECF5;
    text-align: center;
    font-size: 13px;
    color: #A894B8;
    letter-spacing: 0.3px;
}

.my-stats strong {
    font-size: 15px;
    font-weight: 700;
    color: #6B4E78;
}

/* 瓶子列表 */
.my-bottles-list {
    padding: 0 14px;
}

.my-bottle-card {
    background: #FAF8FC;
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #F0ECF5;
}

.my-bottle-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.my-bottle-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.my-bottle-actions {
    display: flex;
    gap: 6px;
}

.my-bottle-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #E0D8F0;
    background: var(--white);
    font-size: 12px;
    color: var(--text-mid);
    cursor: pointer;
}

.my-bottle-btn:active {
    background: #F5F0FA;
}

.my-bottle-btn.danger {
    color: var(--coral);
    border-color: #FDD;
}

/* 加载更多 */
.load-more-btn {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed #D8C8E8;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
}

.load-more-btn:active {
    background: #F8F4FC;
}

/* ========================================
   Toast 提示
   ======================================== */
.toast-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(60, 40, 70, 0.88);
    color: white;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(80, 60, 100, 0.18);
    white-space: nowrap;
}

/* ========================================
   加载动画 — 静态替代（无旋转）
   ======================================== */
.loading-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2.5px solid #E8E0F0;
    border-top-color: var(--lavender);
    border-radius: 50%;
}

/* 录音波形 — 静态显示（无跳动动画） */
.recording-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 36px;
    justify-content: center;
    padding: 10px 0;
}

.recording-wave span {
    display: inline-block;
    width: 3.5px;
    border-radius: 2px;
    background: var(--coral);
}

.recording-wave span:nth-child(1) { height: 14px; }
.recording-wave span:nth-child(2) { height: 24px; }
.recording-wave span:nth-child(3) { height: 32px; }
.recording-wave span:nth-child(4) { height: 24px; }
.recording-wave span:nth-child(5) { height: 14px; }

/* ========================================
   响应式 — 仅做基础适配，无动画
   ======================================== */
@media (min-width: 420px) {
    .bottom-bar {
        gap: 24px;
        padding: 14px 32px calc(18px + var(--safe-bottom));
    }
    .action-btn {
        min-width: 92px;
        padding: 14px 22px;
    }
    .btn-icon {
        font-size: 42px;
    }
}

@media (min-width: 540px) {
    .throw-modal,
    .my-bottles-modal {
        border-radius: var(--radius-xl);
        margin: auto;
        max-height: 82vh;
    }
    .pick-modal {
        max-width: 440px;
    }
}

/* ========================================
   工具类
   ======================================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-pink { color: var(--pink); }
.text-lavender { color: var(--lavender); }
