/* ============================================================
   Landing Page — Diegetic CRT (基于 demo-diegetic-retro.html)
   命名空间 .lp-  和 #page-upload.lp-active 用于覆盖 .page 默认
   ============================================================ */

:root {
    --lp-bg: #F6F6F4;
    --lp-text-main: #18181A;
    --lp-text-sub: #55555A;
    --lp-font-title: 'Noto Serif SC', serif;
    --lp-font-body: 'Inter', 'Noto Sans SC', sans-serif;
    --lp-pixel-font: 'DotGothic16', monospace;
    --lp-terminal-font: 'Space Mono', monospace;

    --lp-os-desktop: #008080;
    --lp-os-base: #DFDFD8;
    --lp-os-border-dark: #000000;
    --lp-os-title-bg: #0500AA;
}

/* ── #page-upload 的布局重写（保留 .page 自身的 opacity/translate 过渡） ── */
#page-upload.lp-mode {
    padding: 0;
    overflow: hidden;
    background-color: var(--lp-bg);
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    -webkit-font-smoothing: antialiased;
    align-items: center;
    /* justify-content / display:flex 沿用 .page 的默认 */
}

.lp-layout {
    width: 1400px;
    max-width: 95%;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 40px;
}

/* ── 左侧：打字机文案区 ── */
.lp-gallery-intro {
    padding: 40px 40px 120px 40px;
    font-family: var(--lp-font-body);
}

.lp-gallery-badge {
    display: inline-block;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    color: #444;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 16px;
    opacity: 0;
    transition: opacity 0.5s;
}

.lp-gallery-title {
    font-size: 48px;
    font-weight: 900;
    font-family: var(--lp-font-title);
    color: var(--lp-text-main);
    line-height: 1.3;
    margin: 0 0 32px 0;
    letter-spacing: -1px;
    min-height: 124px;
    white-space: nowrap;
}

.lp-highlight-accent {
    color: #008080;
    text-shadow: 0 0 16px rgba(0, 128, 128, 0.4);
}

.lp-security-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #E5E7EB;
    padding-top: 28px;
    min-height: 160px;
    max-width: 460px;
}

.lp-sec-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    color: #4B5563;
    font-weight: 500;
}

.lp-sec-icon {
    width: 6px;
    height: 6px;
    background: #D1D5DB;
    border-radius: 50%;
    transition: all 0.4s ease;
    position: relative;
}

.lp-sec-icon-active {
    background: #00A8A8;
    box-shadow: 0 0 8px rgba(0, 168, 168, 0.8), 0 0 2px #00A8A8;
}

.lp-typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background-color: var(--lp-text-main);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: lp-cursor-blink 0.8s step-end infinite;
}

@keyframes lp-cursor-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.lp-cursor-hidden {
    display: none;
}

/* ── 右侧 CRT 机器 ── */
.lp-crt-machine-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    transform: scale(0.95);
    transform-origin: center right;
}

.lp-crt-machine-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lp-crt-casing {
    width: 700px;
    height: 560px;
    background-color: #E3E1D9;
    border-radius: 12px 12px 4px 4px;
    box-shadow: inset 6px 6px 12px rgba(255, 255, 255, 0.8),
        inset -8px -12px 20px rgba(0, 0, 0, 0.12),
        inset -2px -2px 5px rgba(0, 0, 0, 0.2);
    padding: 36px 36px 60px 36px;
    position: relative;
    z-index: 2;
}

.lp-crt-neck {
    width: 180px;
    height: 28px;
    background: linear-gradient(180deg, #cbc9c0 0%, #b8b6ad 100%);
    border-left: 2px solid #a8a69e;
    border-right: 2px solid #a8a69e;
    box-shadow: inset 4px 0 6px rgba(0, 0, 0, 0.08),
        inset -4px 0 6px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.lp-crt-stand {
    width: 400px;
    height: 28px;
    background: linear-gradient(180deg, #c8c6bc 0%, #adaba2 100%);
    border-radius: 4px 4px 12px 12px;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 12px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #9e9c94;
    border-top: none;
    z-index: 1;
}

.lp-crt-details-grill {
    position: absolute;
    bottom: 24px;
    left: 40px;
    width: 80px;
    height: 6px;
    display: flex;
    gap: 4px;
}

.lp-crt-details-grill span {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.lp-crt-floppy-slot {
    position: absolute;
    bottom: 24px;
    right: 100px;
    width: 120px;
    height: 6px;
    background: #050505;
    border-radius: 3px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 2px 0 rgba(255, 255, 255, 0.8);
}

.lp-crt-details-power {
    position: absolute;
    bottom: 18px;
    right: 40px;
    width: 24px;
    height: 16px;
    background: #E3E1D9;
    border-radius: 4px;
    border: 1px solid #999;
    box-shadow: inset 1px 1px 2px #FFF,
        inset -1px -1px 2px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-crt-power-led {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #00FF41;
    box-shadow: 0 0 8px #00FF41;
}

.lp-crt-bezel {
    width: 100%;
    height: 100%;
    background-color: #1A1A1A;
    border-radius: 12px;
    padding: 16px;
    box-shadow: inset 4px 4px 10px #000,
        inset -4px -4px 10px #000,
        0 2px 4px rgba(255, 255, 255, 0.5);
}

.lp-crt-screen {
    width: 100%;
    height: 100%;
    background-color: var(--lp-os-desktop);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-crt-screen::after {
    content: "";
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.05),
            rgba(0, 0, 0, 0.05) 1px,
            transparent 1px,
            transparent 2px);
    z-index: 10;
    opacity: 0.8;
}

/* ── 屏幕内 Win95 对话框 ── */
.lp-os-dialog {
    width: 512px;
    background-color: var(--lp-os-base);
    border: 2px solid var(--lp-os-border-dark);
    box-shadow: inset 2px 2px 0 0 #FFFFFF,
        inset -2px -2px 0 0 #A0A099,
        6px 6px 0 rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 5;
}

.lp-os-titlebar {
    background-color: var(--lp-os-title-bg);
    color: #FFF;
    padding: 4px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--lp-pixel-font);
    border-bottom: 2px solid #FFF;
}

.lp-os-titlebar-text {
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lp-os-titlebar-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #00FF41;
    box-shadow: 0 0 8px #00FF41;
    vertical-align: middle;
    animation: lp-cursor-blink 1s step-end infinite;
}

.lp-os-titlebar-btns {
    display: flex;
    gap: 4px;
}

.lp-os-btn-min {
    width: 18px;
    height: 18px;
    background: var(--lp-os-base);
    border: 1px solid var(--lp-os-border-dark);
    box-shadow: inset 1px 1px 0 #FFF, inset -1px -1px 0 #808080;
    color: #000;
    font-family: var(--lp-terminal-font);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    text-shadow: 1px 1px 0 #FFF;
}

.lp-os-body {
    padding: 16px 28px 18px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

/* ── 拖放区（接 #upload-zone） ── */
.lp-os-droptray-wrapper {
    background: #FFF;
    border: 2px solid var(--lp-os-border-dark);
    box-shadow: inset 2px 2px 0 #808080,
        inset -2px -2px 0 #E0E0E0,
        0 1px 0 #FFF;
    padding: 4px;
}

.lp-os-droptray {
    background: #FFF;
    border: 2px dashed #999;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.lp-os-droptray:hover,
.lp-os-droptray.dragover {
    border-color: #008080;
    background: #F0FFFF;
}

.lp-os-icon {
    font-family: var(--lp-pixel-font);
    font-size: 34px;
    color: var(--lp-os-border-dark);
    margin-bottom: 8px;
    text-shadow: 1px 1px 0 #E0E0E0;
    animation: lp-icon-float 2.5s ease-in-out infinite;
}

@keyframes lp-icon-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.lp-os-droptext {
    font-family: var(--lp-pixel-font);
    font-size: 16px;
    font-weight: bold;
    color: #777;
    animation: lp-text-pulse 2s ease-in-out infinite;
}

@keyframes lp-text-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* 文件选中后的卡片样式（替换 droptray 内容） */
.lp-os-fileinfo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-align: left;
    font-family: var(--lp-pixel-font);
}

.lp-os-fileinfo-icon {
    font-size: 22px;
    color: var(--lp-os-border-dark);
}

.lp-os-fileinfo-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lp-os-fileinfo-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--lp-os-border-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-os-fileinfo-size {
    font-size: 12px;
    color: #666;
}

.lp-os-fileinfo-remove {
    background: var(--lp-os-base);
    border: 1px solid var(--lp-os-border-dark);
    box-shadow: inset 1px 1px 0 #FFF, inset -1px -1px 0 #808080;
    width: 22px;
    height: 22px;
    font-family: var(--lp-terminal-font);
    font-weight: bold;
    cursor: pointer;
    color: #000;
    line-height: 1;
}

.lp-os-fileinfo-remove:active {
    box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #FFF;
}

/* ── 表单行 ── */
.lp-os-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lp-os-label {
    font-family: var(--lp-pixel-font);
    font-size: 15px;
    color: var(--lp-os-border-dark);
    font-weight: bold;
    text-shadow: 1px 1px 0 #EAEAE4;
}

.lp-os-select {
    width: 220px;
    background: #FFF;
    border: 1px solid var(--lp-os-border-dark);
    box-shadow: inset 2px 2px 0 #808080, inset -1px -1px 0 #E0E0E0;
    padding: 6px 10px;
    font-family: var(--lp-pixel-font);
    font-weight: 500;
    font-size: 14px;
    color: var(--lp-os-border-dark);
    cursor: pointer;
}

/* ── 底部按钮 ── */
.lp-os-footer {
    margin-top: 4px;
    border-top: 1px solid #808080;
    box-shadow: 0 1px 0 #FFFFFF;
    padding-top: 14px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.lp-os-action-btn {
    font-family: var(--lp-pixel-font);
    font-size: 15px;
    font-weight: bold;
    background: var(--lp-os-base);
    border: 2px solid var(--lp-os-border-dark);
    padding: 10px 36px;
    color: var(--lp-os-border-dark);
    cursor: pointer;
    box-shadow: inset 2px 2px 0 #FFF,
        inset -2px -2px 0 #808080,
        2px 2px 0 rgba(0, 0, 0, 0.5);
    text-shadow: 1px 1px 0 #FFF;
}

.lp-os-btn-settings {
    padding: 10px 24px;
}

.lp-os-btn-start {
    font-weight: 900;
    background: #E0E0DB;
}

.lp-os-action-btn:active {
    transform: translate(2px, 2px);
    box-shadow: inset 2px 2px 0 #808080, inset -1px -1px 0 #FFF;
    text-shadow: none;
}

.lp-os-action-btn:disabled {
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

.lp-os-action-btn:disabled:active {
    transform: none;
    box-shadow: inset 2px 2px 0 #FFF, inset -2px -2px 0 #808080, 2px 2px 0 rgba(0, 0, 0, 0.5);
}
