/* ============================================
   蛋薯机 DanShu Pro v2 — base.css
   PC端保持手机框架 / 手机端去框全屏
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --phone-width: 375px;
    --phone-height: 812px;
    --phone-radius: 50px;
    --phone-border: 4px;

    --glass-bg: rgba(255, 255, 255, 0.62);
    --glass-bg-strong: rgba(255, 255, 255, 0.35);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-blur: 18px;
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);

    --status-bar-height: 48px;
    --dock-height: 84px;
    --home-indicator-height: 20px;
    --page-dots-height: 24px;

    --icon-size: 54px;
    --icon-radius: 15px;
    --icon-svg: 24px;

    --app-height: 100vh;
}

html {
    font-size: 16px;
    overflow: hidden;
    height: 100%;
}

body {
    width: 100%;
    min-height: 100vh;
    background: #000;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

.phone-frame {
    position: relative;
    width: 100%;
    max-width: 520px;
    min-height: var(--app-height, 100vh);
    height: var(--app-height, 100vh);
    margin: 0 auto;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-frame::before {
    content: none;
}

/* 壁纸 */
.wallpaper {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('https://s3.bmp.ovh/2026/03/01/nn1m2Yea.png') center/cover no-repeat;
}

.wallpaper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0) 30%,
            rgba(0, 0, 0, 0) 70%,
            rgba(0, 0, 0, 0.1) 100%);
}

/* ============ 状态栏（PC端正常显示） ============ */
.status-bar {
    height: var(--status-bar-height);
    padding: 16px 26px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    color: var(--text-primary);
}

.status-time {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.status-brand {
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.status-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.status-icons svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

/* 底部横条 */
.home-indicator {
    height: var(--home-indicator-height);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 6px;
    position: relative;
    z-index: 10;
}

.home-indicator::after {
    content: '';
    width: 134px;
    height: 5px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ============ 通用样式 ============ */
[contenteditable]:focus {
    outline: none !important;
    -webkit-user-modify: read-write-plaintext-only;
}

::selection {
    background: rgba(248, 164, 184, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
}

[contenteditable]::before,
[contenteditable]::after {
    display: none !important;
}

*:focus {
    -webkit-tap-highlight-color: transparent;
}

[contenteditable] {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: text;
    user-select: text;
}

/* ============ Toast ============ */
.toast {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 24px;
    border-radius: 20px;
    background: rgba(60, 45, 55, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 85%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== 手机端全屏铺满 ===== */
@media screen and (max-width: 768px) {

    :root {
        --phone-radius: 0px;
        --phone-border: 0px;
        --status-bar-height: 0px;
        --home-indicator-height: 0px;
        --app-height: 100dvh;
    }

    html {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    body {
        margin: 0;
        padding: 0;
        width: 100%;
        min-height: var(--app-height);
        height: var(--app-height);
        background: #000;
        overflow: hidden;
    }

    .phone-frame {
        width: 100% !important;
        min-height: var(--app-height) !important;
        height: var(--app-height) !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        background: transparent !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .phone-frame::before {
        display: none !important;
    }

    .wallpaper {
        border-radius: 0 !important;
    }

    .status-bar {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .home-indicator {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .pages-viewport {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: hidden !important;
    }

    .pages-track {
        height: 100% !important;
    }

    .page {
        min-height: 0 !important;
        height: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .grid-container {
        padding-top: 8px !important;
    }

    .page-dots {
        margin: 0 !important;
        padding: 4px 0 !important;
        flex-shrink: 0;
    }

    .dock-container {
        padding: 0 24px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        align-items: flex-end !important;
        flex-shrink: 0;
    }

    .dock-container::before {
        bottom: env(safe-area-inset-bottom, 0px) !important;
    }

    .page-1 > .grid-container {
        transform: none !important;
        padding-top: 8px !important;
    }

    .page-2 > .p2-page-wrap {
        padding-top: 8px !important;
    }

    .page-3 {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
        padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .page-3::before {
        content: none !important;
    }

    .page-3 > *,
    .page-3 > .p3-profile-widget,
    .page-3 > .p3-contact-widget,
    .page-3 > .p3-status-widget,
    .page-3 > .p3-gallery-widget,
    .page-3 > .p3-links-widget {
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .chat-app-overlay,
    .novel-overlay,
    .forum-overlay,
    .moments-overlay,
    .theater-overlay,
    .music-overlay,
    .game-overlay,
    .chat-wallet-overlay,
    .chat-transfer-overlay,
    .chat-conv-overlay,
    [class*="-overlay"] {
        border-radius: 0 !important;
    }

    input[type="text"],
    .chat-conv-input {
        -webkit-appearance: none;
        appearance: none;
    }
}
