/* =========================================
   方案三：夏日青空档案 - 终极整合版 CSS
   包含：核心排版、聊天框按键美化、动态交互特效
   移动端全面优化
   ========================================= */

/* -----------------------------------------
   1. 核心容器与折叠面板
   ----------------------------------------- */
.status-wrap, .mem-wrap {
    background: rgba(240, 248, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(135, 206, 250, 0.5);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.05);
    font-size: 0.95em;
    word-break: break-word;
    overflow-wrap: break-word;
}
.status-wrap details, .mem-wrap details {
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(135, 206, 250, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}
.status-wrap details:last-child, .mem-wrap details:last-child { margin-bottom: 0; }
.status-wrap summary, .mem-wrap summary {
    font-weight: 600;
    color: #007bb5;
    cursor: pointer;
    outline: none;
    list-style: none;
    border-bottom: 1px dashed rgba(135, 206, 250, 0.6);
    padding-bottom: 6px;
    margin-bottom: 6px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 0.95em;
}
.status-wrap summary::-webkit-details-marker { display: none; }

/* -----------------------------------------
   2. 角色姓名、属性导航与情绪状态动画
   ----------------------------------------- */
f { 
    font-weight: bold; 
    font-size: 1.1em; 
    color: #1e90ff; 
    display: block; 
    margin-bottom: 4px; 
}
/* 呼吸心跳动画 (针对 💕, 💗) */
@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}
/* 心碎颤抖动画 (针对 💔) */
@keyframes heartbreak {
    0% { transform: translateX(0); filter: drop-shadow(0 0 0 rgba(255,0,0,0)); }
    20% { transform: translateX(-1px) rotate(-2deg); filter: drop-shadow(0 0 2px rgba(220,20,60,0.6)); }
    40% { transform: translateX(1px) rotate(2deg); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    100% { transform: translateX(0); filter: drop-shadow(0 0 0 rgba(255,0,0,0)); }
}
f[eye*="💕"]::before, f[eye*="💗"]::before {
    content: attr(eye) " ";
    display: inline-block;
    animation: heartbeat 2.5s infinite ease-in-out;
}
f[eye*="💔"]::before {
    content: attr(eye) " ";
    display: inline-block;
    animation: heartbreak 1.5s infinite;
}

nav { 
    display: flex; 
    flex-wrap: wrap;
    gap: 6px; 
    margin: 6px 0; 
}
nav i { 
    background: rgba(32, 178, 170, 0.15);
    padding: 3px 8px; 
    border-radius: 6px; 
    font-style: normal; 
    font-size: 0.85em; 
    color: #008080; 
    border: 1px solid rgba(32, 178, 170, 0.3);
    white-space: nowrap;
}

/* -----------------------------------------
   3. 敏感身体信息区 (毛玻璃窥探交互)
   ----------------------------------------- */
.bio-sex {
    border-left: 3px solid rgba(32, 178, 170, 0.6);
    padding-left: 10px;
    margin: 8px 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 100%);
    border-radius: 0 4px 4px 0;
    position: relative;
    transition: all 0.5s ease;
}
.bio-sex d {
    filter: blur(4px);
    opacity: 0.7;
    transition: filter 0.4s ease, opacity 0.4s ease;
    cursor: pointer;
    font-size: 0.85em;
    line-height: 1.5;
}
.bio-sex:hover d, .bio-sex:active d {
    filter: blur(0);
    opacity: 1;
}
.bio-sex::before {
    content: "👀 [悬浮/长按以查看私密档案]";
    position: absolute;
    top: -18px;
    left: 10px;
    font-size: 0.75em;
    color: #20b2aa;
    opacity: 0.8;
    pointer-events: none;
    white-space: nowrap;
}
.bio-sex:hover::before, .bio-sex:active::before { opacity: 0; }

/* -----------------------------------------
   4. SNS、群聊卡片与教务系统数据表
   ----------------------------------------- */
.sns-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(135, 206, 250, 0.5);
    border-radius: 8px;
    padding: 10px;
    margin: 8px 0;
    box-shadow: 0 2px 10px rgba(135, 206, 250, 0.15);
    word-break: break-word;
    overflow-wrap: break-word;
}
.sns-card b { color: #1da1f2; }

.grid-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(135, 206, 250, 0.2);
    border: 1px solid rgba(135, 206, 250, 0.3);
    border-radius: 6px;
    overflow: hidden;
    min-width: 0;
}
.grid-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    gap: 4px;
    min-width: 0;
}
.grid-row:nth-child(even) { background: rgba(240, 248, 255, 0.8); }
.grid-header {
    font-weight: bold;
    background: rgba(135, 206, 250, 0.4) !important;
    color: #005f87;
}
.grid-row span { 
    flex: 1; 
    text-align: center; 
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 短期记忆区最新事件高亮警示 */
.grid-box .grid-row:nth-child(2) {
    background: linear-gradient(90deg, rgba(32, 178, 170, 0.15) 0%, rgba(255,255,255,0.7) 50%);
    border-left: 3px solid #20b2aa;
    font-weight: 600;
    color: #005f87;
}
.grid-box .grid-row:nth-child(2)::after {
    content: "NEW";
    font-size: 0.65em;
    color: #fff;
    background: #20b2aa;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* -----------------------------------------
   5. 顶部情报栏 (时间/地点/天气)
   ----------------------------------------- */
hd {
    display: block;
    background: linear-gradient(90deg, rgba(135, 206, 250, 0.4) 0%, rgba(240, 248, 255, 0.1) 100%);
    border-left: 5px solid #00ced1;
    border-radius: 4px 12px 12px 4px;
    padding: 12px 16px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(135, 206, 250, 0.1);
    word-break: break-word;
}
hd t { 
    font-weight: 800; 
    color: #005f87; 
    display: block; 
    font-size: 1.15em; 
    letter-spacing: 0.5px;
}
hd d { 
    color: #4682b4; 
    font-size: 0.9em; 
    margin-top: 4px; 
    display: inline-block; 
}
hd q { 
    display: block;
    font-style: normal; 
    color: #008080; 
    margin-top: 6px; 
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    word-break: break-word;
}

/* -----------------------------------------
   6. 叙事正文聊天框与沉浸式文本选择
   ----------------------------------------- */
@keyframes textFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
article {
    display: block;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(135, 206, 250, 0.4);
    border-radius: 12px;
    padding: 18px 22px;
    margin: 15px 0;
    line-height: 1.75;
    color: #2c3e50;
    font-size: 1.05em;
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.06);
    animation: textFadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    word-break: break-word;
    overflow-wrap: break-word;
}
article blockquote {
    background: rgba(240, 248, 255, 0.8);
    border-left: 4px solid #20b2aa;
    margin: 12px 0;
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
    color: #005f87;
    font-style: normal;
}
::selection {
    background: rgba(32, 178, 170, 0.3);
    color: #005f87;
    text-shadow: none;
}
::-moz-selection {
    background: rgba(32, 178, 170, 0.3);
    color: #005f87;
}

/* -----------------------------------------
   7. 交互按键、行动脚本与内心想法
   ----------------------------------------- */
span[style*="#00f2ff"] {
    color: #00ced1 !important;
    text-shadow: 0 0 8px rgba(0, 206, 209, 0.3);
    font-weight: bold;
}
q[t="inner"] { 
    color: #5f9ea0; 
    font-style: italic; 
    display: block; 
    margin-top: 6px; 
    word-break: break-word;
}
ol { 
    margin: 6px 0; 
    padding-left: 0; 
    color: #4682b4; 
    list-style: none;
}
ol li b { color: #00ced1; }

button, .action-btn, ol li {
    background: linear-gradient(135deg, rgba(240, 248, 255, 0.8), rgba(224, 255, 255, 0.8));
    border: 1px solid rgba(135, 206, 250, 0.6);
    border-radius: 20px;
    padding: 8px 16px;
    margin: 6px 0;
    color: #007bb5;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(135, 206, 250, 0.15);
    list-style-type: none;
    display: block;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    word-break: break-word;
}
button:hover, .action-btn:hover, ol li:hover {
    background: linear-gradient(135deg, rgba(224, 255, 255, 0.95), rgba(175, 238, 238, 0.95));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 206, 209, 0.25);
    border-color: rgba(0, 206, 209, 0.6);
    color: #005f87;
}
button:active, .action-btn:active, ol li:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 206, 209, 0.2);
}

/* -----------------------------------------
   8. 全局滚动条美化
   ----------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(240, 248, 255, 0.5);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(135, 206, 250, 0.6);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(32, 178, 170, 0.8);
}

/* -----------------------------------------
   9. d 标签通用行高与换行
   ----------------------------------------- */
d {
    display: block;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* =========================================
   10. 📱 移动端适配 (≤768px)
   ========================================= */
@media (max-width: 768px) {
    .status-wrap, .mem-wrap {
        padding: 8px;
        margin-bottom: 10px;
        border-radius: 8px;
        font-size: 0.88em;
    }
    .status-wrap details, .mem-wrap details {
        padding: 8px;
        margin-bottom: 6px;
        border-radius: 6px;
    }
    .status-wrap summary, .mem-wrap summary {
        font-size: 0.9em;
        padding-bottom: 4px;
        margin-bottom: 4px;
    }

    hd {
        padding: 10px 12px;
        border-left-width: 4px;
        border-radius: 4px 8px 8px 4px;
        margin-bottom: 10px;
    }
    hd t { font-size: 1em; }
    hd d { font-size: 0.8em; }
    hd q { font-size: 0.82em; padding: 3px 6px; }

    article {
        padding: 14px 16px;
        margin: 10px 0;
        font-size: 0.95em;
        line-height: 1.65;
        border-radius: 8px;
    }
    article blockquote {
        margin: 8px 0;
        padding: 8px 12px;
        border-left-width: 3px;
    }

    f { font-size: 1em; }

    nav { gap: 4px; }
    nav i { 
        padding: 2px 6px; 
        font-size: 0.78em; 
        border-radius: 4px;
    }

    .bio-sex {
        padding-left: 8px;
        margin: 6px 0;
    }
    .bio-sex d { font-size: 0.8em; }
    .bio-sex::before { 
        font-size: 0.7em; 
        top: -15px;
        white-space: normal;
    }

    .grid-row {
        padding: 5px 4px;
        font-size: 0.75em;
        gap: 2px;
    }
    .grid-header {
        font-size: 0.75em;
    }
    .grid-row span { font-size: 0.75em; }

    .grid-box .grid-row:nth-child(2)::after {
        font-size: 0.6em;
        padding: 1px 3px;
    }

    .sns-card {
        padding: 8px;
        margin: 6px 0;
        font-size: 0.85em;
    }

    button, .action-btn, ol li {
        padding: 10px 14px;
        margin: 5px 0;
        font-size: 0.9em;
        border-radius: 16px;
        min-height: 42px;
        display: flex;
        align-items: center;
    }
    ol { padding-left: 0; }
    ol li b { display: inline; }

    q[t="inner"] { font-size: 0.85em; }

    ::-webkit-scrollbar { width: 4px; height: 4px; }
}

/* =========================================
   11. 📱 小屏手机适配 (≤480px)
   ========================================= */
@media (max-width: 480px) {
    .status-wrap, .mem-wrap {
        padding: 6px;
        margin-bottom: 8px;
        border-radius: 6px;
        font-size: 0.82em;
    }
    .status-wrap details, .mem-wrap details {
        padding: 6px;
        margin-bottom: 4px;
    }
    .status-wrap summary, .mem-wrap summary {
        font-size: 0.85em;
    }

    hd {
        padding: 8px 10px;
        border-left-width: 3px;
        margin-bottom: 8px;
    }
    hd t { font-size: 0.9em; }
    hd d { font-size: 0.75em; display: block; }
    hd q { font-size: 0.78em; }

    article {
        padding: 12px 14px;
        font-size: 0.9em;
        line-height: 1.6;
    }

    f { font-size: 0.95em; }

    nav { gap: 3px; }
    nav i { font-size: 0.72em; padding: 2px 5px; }

    .bio-sex d { font-size: 0.75em; }
    .bio-sex::before { font-size: 0.65em; top: -13px; }

    .grid-row {
        padding: 4px 3px;
        font-size: 0.7em;
        gap: 1px;
    }
    .grid-header { font-size: 0.7em; }
    .grid-row span { font-size: 0.7em; }

    button, .action-btn, ol li {
        padding: 10px 12px;
        font-size: 0.85em;
        border-radius: 14px;
        min-height: 44px;
    }

    .sns-card { font-size: 0.8em; padding: 6px; }
    q[t="inner"] { font-size: 0.8em; }
}

