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

ai {
    /* 核心马卡龙变量 */
    --text-color: #4A3F3E; /* 摩卡棕，用于状态栏等区域 */
    --bg-color: #FFFDF9; /* 阳光奶油白 */
    --pink-light: #FFE4E1; /* 浅蜜桃粉 */
    --pink-dark: #FFB6C1; /* 深蜜桃粉 */
    --blue-light: #E0F7FA; /* 婴儿蓝 */
    --yellow-light: #FFF9C4; /* 奶黄 */
    --green-light: #E8F5E9; /* 薄荷青 */
    
    /* 字体美化：治愈系圆体 */
    font-family: 'Nunito', 'Quicksand', 'Varela Round', '幼圆', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 24px;
}

/* ========== 手帐风正文区块 ========== */
ai article {
    background: #FFFFFF;
    padding: 24px 12px 16px; 
    border-radius: 20px;
    position: relative;
    /* 温暖光晕阴影 */
    box-shadow: 0 8px 24px rgba(255, 182, 193, 0.15);
    border: 2px dashed var(--pink-light);
    font-size: 15px;
    margin-top: 10px;
    line-height: 1.8; 
}
/* 手帐风半透明纸胶带美化 */
ai article::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 100px;
    height: 24px;
    background: rgba(255, 182, 193, 0.4);
    backdrop-filter: blur(2px);
    box-shadow: 1px 2px 4px rgba(0,0,0,0.05);
    border-radius: 2px;
    z-index: 1;
}
ai article p {
    margin-bottom: 16px; 
    color: #000000; /* 纯黑色，最高对比度 */
}

/* ========== 白芷专属粉色对话 ========== */
ai bz {
    color: #E56B85; /* 暖粉色 */
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(229, 107, 133, 0.15); 
}

/* ========== 毛绒质感折叠面板 ========== */
ai details {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 4px;
    /* 毛绒布艺缝线与光晕 */
    box-shadow: 0 6px 16px rgba(107, 91, 90, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}
ai details[open] {
    box-shadow: 0 10px 24px rgba(107, 91, 90, 0.12);
    padding-bottom: 12px;
}

/* 马卡龙交替配色 */
ai details:nth-of-type(1) { background: var(--blue-light); }
ai details:nth-of-type(3) { background: var(--yellow-light); }
ai details:nth-of-type(4) { background: var(--pink-light); }
ai details:nth-of-type(5) { background: var(--green-light); }

ai summary {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px dashed rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    transition: all 0.2s;
}
ai summary::-webkit-details-marker { display: none; }
ai summary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ========== 网格与数据项 ========== */
ai g {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    padding: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 16px;
    margin: 8px;
}
ai d {
    background: #FFFFFF;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
}

/* ========== 小标题 ========== */
ai h {
    display: block;
    font-weight: 700;
    color: var(--pink-dark);
    margin: 12px 12px 4px 12px;
    font-size: 14px;
    background: rgba(255,255,255,0.8);
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

/* ========== 糖果斜纹动态进度条 ========== */
@keyframes candy-stripe {
    0% { background-position: 0 0; }
    100% { background-position: 30px 0; }
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

ai bar {
    display: block;
    width: 100%;
    height: 18px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    grid-column: 1 / -1;
    margin: 4px 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--pink-light);
}

ai f {
    display: block;
    height: 100%;
    border-radius: 10px;
    background: repeating-linear-gradient(
        -45deg,
        #FFB6C1,
        #FFB6C1 10px,
        #FFC0CB 10px,
        #FFC0CB 20px
    );
    background-size: 30px 30px;
    animation: candy-stripe 2s linear infinite;
    box-shadow: 0 2px 5px rgba(255, 182, 193, 0.5);
    position: relative;
    transition: width 0.5s ease-in-out;
}
ai f::after {
    content: '❤';
    position: absolute;
    right: -10px;
    top: -4px;
    font-size: 16px;
    color: #FF69B4;
    text-shadow: 0 0 5px #FFF;
    animation: heartbeat 1s ease-in-out infinite;
}

/* ========== 软萌斑马纹表格美化 ========== */
ai table {
    width: calc(100% - 16px);
    margin: 8px;
    border-collapse: separate;
    border-spacing: 0 4px;
    font-size: 13px;
}
ai th {
    background: var(--blue-light);
    color: var(--text-color);
    padding: 8px;
    font-weight: 600;
    text-align: left;
}
ai th:first-child { border-radius: 12px 0 0 12px; }
ai th:last-child { border-radius: 0 12px 12px 0; }

ai td {
    background: #FFFFFF;
    padding: 8px;
    border-top: 1px solid rgba(0,0,0,0.02);
    border-bottom: 1px solid rgba(0,0,0,0.02);
    transition: background 0.2s;
}
ai tr:nth-child(even) td {
    background: rgba(255, 249, 196, 0.3);
}
ai td:first-child { border-radius: 12px 0 0 12px; border-left: 1px solid rgba(0,0,0,0.02); }
ai td:last-child { border-radius: 0 12px 12px 0; border-right: 1px solid rgba(0,0,0,0.02); }

ai tr:hover td {
    background: var(--pink-light);
}