/* ============================================
   iOS 27 Liquid Glass - 叶玖洛的小窝
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* 背景图片设置 - 取消注释并填入图片URL即可 */
    /* --bg-image: url('你的图片地址'); */
    /* --bg-opacity: 0.15; */
    /* --bg-blur: 0px; */

    /* 主色调 - 青蓝 */
    --accent: #0ea5e9;
    --accent-light: rgba(14, 165, 233, 0.1);
    --accent-border: rgba(14, 165, 233, 0.25);

    /* 毛玻璃 */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --glass-blur: blur(40px) saturate(200%);

    /* 文字 */
    --text-primary: #1a2b3a;
    --text-secondary: #4a6572;
    --text-muted: #8a9ba8;

    /* 终端 */
    --terminal-bg: #1e1e1e;
    --terminal-header: linear-gradient(180deg, #3a3a3a 0%, #2d2d2d 100%);
    --terminal-text: #e0e0e0;
    --terminal-border: rgba(0, 0, 0, 0.3);
    --terminal-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.2);

    /* 圆角 */
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f7fa;
    background-image: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 30%, #ffffff 50%, #f0f9ff 70%, #e0f2fe 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px 20px 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 背景图片层 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: var(--bg-opacity, 0);
    filter: blur(var(--bg-blur, 0px));
    z-index: -2;
    pointer-events: none;
}

/* 光斑 */
.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float 25s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #38bdf8, transparent 70%);
    top: -10%;
    left: -5%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #22d3ee, transparent 70%);
    top: 40%;
    right: -5%;
    animation-delay: -8s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #0ea5e9, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-delay: -16s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -40px) scale(1.08); }
    50% { transform: translate(-30px, 30px) scale(0.92); }
    75% { transform: translate(20px, 20px) scale(1.04); }
}

/* 毛玻璃卡片 */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* 主布局 */
#box {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    position: relative;
    z-index: 1;
}

/* 个人卡片 */
.meBox {
    width: 250px;
    padding: 24px 20px;
    text-align: center;
    flex-shrink: 0;
}

.headPhoto {
    width: 86px;
    height: 86px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    margin: 0 auto 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--accent-border);
}

.meBox:hover .headPhoto {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.2), 0 0 0 2px var(--accent);
}

.meBox-title {
    margin: 12px auto 0;
    position: relative;
}



/* 打字机效果 */
.typewriter-container {
    position: relative;
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    height: 1.5em;
    min-width: 0;
}

.typewriter-text {
    white-space: nowrap;
}

.typewriter-cursor {
    color: var(--accent);
    animation: blink-caret .8s step-end infinite alternate;
    font-weight: 300;
    margin-left: 1px;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

@keyframes particle-float {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, 10px), var(--ty, -25px)) scale(0);
    }
}

@keyframes particle-float-alt {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, -15px), var(--ty, -30px)) scale(0);
    }
}

@keyframes blink-caret { 50% { border-color: transparent; } }

.meBox-title .fg {
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 12px auto;
}

.meBox-text {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.85rem;
    animation: fadeUp 1s ease-out forwards;
    margin-top: 12px;
}

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

.meBox-text p {
    margin-top: 6px;
}

.meBox-Button {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.meBox-Button a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 36px;
    text-decoration: none;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}

.meBox-Button a:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
}

/* 终端区域 */
#cmdBox {
    width: 620px;
    height: 440px;
    position: relative;
    flex-shrink: 0;
}

/* 终端窗口 */
.cmd {
    width: 100%;
    height: 380px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--terminal-bg) !important;
    font-size: 13px;
    color: var(--terminal-text);
    position: absolute;
    border: 1px solid var(--terminal-border);
    box-shadow: var(--terminal-shadow);
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
}

/* 终端始终不变色 */
.cmd:hover {
    background: var(--terminal-bg) !important;
    border-color: var(--terminal-border) !important;
    box-shadow: var(--terminal-shadow) !important;
}

#terminal1 { top: 0; left: 0; z-index: 2; }
#terminal2 { top: 40px; left: 40px; z-index: 1; }

.cmd.draggable { cursor: default; user-select: none; }
.cmd.dragging { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important; }

/* 拖动把手 */
.drag-handle {
    cursor: grab;
    user-select: none;
    background: var(--terminal-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 14px;
    display: flex;
    align-items: center;
    height: 38px;
}

.drag-handle:active { cursor: grabbing; }

.cmd .title {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    pointer-events: none;
}

.drag-handle .click {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.drag-handle .click div {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.drag-handle .click .red { background: #ff5f57; box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); }
.drag-handle .click .yellow { background: #febc2e; box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); }
.drag-handle .click .green { background: #28c840; box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); }

/* 终端内容 */
.cmdText {
    padding: 14px 18px;
    line-height: 1.75;
    font-size: 12.5px;
}

.prompt-user { color: #67e8f9; font-weight: 500; }
.prompt-path { color: #60a5fa; font-weight: 500; }
.prompt-cmd { color: #f0f0f0; }

.cmdText p {
    color: rgba(224, 224, 224, 0.85);
    margin: 3px 0;
}

/* 站点列表 */
.site-list {
    list-style: none;
    margin: 8px 0;
    padding-left: 8px;
}

.site-list li { margin: 3px 0; }

.site-list a {
    text-decoration: none;
    color: rgba(224, 224, 224, 0.75);
    transition: all 0.2s;
    display: inline-flex;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12.5px;
}

.site-list a:hover {
    color: #67e8f9;
    background: rgba(103, 232, 249, 0.1);
}

/* 页脚 */
#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 20px;
    text-align: center;
    z-index: 100;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

#footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

#footer a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

#footer a:hover { color: var(--accent); }

.beian-icon {
    height: 14px;
    width: auto;
    vertical-align: middle;
    opacity: 0.7;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.meBox { animation: fadeIn 0.6s ease-out; }
#cmdBox #terminal1 { animation: fadeIn 0.5s ease-out 0.15s both; }
#cmdBox #terminal2 { animation: fadeIn 0.5s ease-out 0.3s both; }

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .orb { animation: none !important; }
}

/* 响应式 */
@media screen and (max-width: 940px) {
    #box {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .meBox { width: 260px; }
    #cmdBox { width: 100%; max-width: 560px; height: auto; min-height: 440px; }
}

@media screen and (max-width: 600px) {
    body { padding: 16px 10px 70px; }
    .meBox { width: 100%; max-width: 300px; padding: 20px 16px; }
    .headPhoto { width: 68px; height: 68px; }
    .meBox-title p { font-size: 1rem; }
    #cmdBox { max-width: 100%; min-height: 380px; }
    .cmd { height: 320px; }
    #terminal2 { top: 30px; left: 20px; }
    .cmdText { font-size: 11.5px; padding: 10px 14px; }
    #footer { font-size: 0.68rem; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }