/* 导入数码管电子字体 */
@import url('https://fonts.cdnfonts.com/css/ds-digital');

/* line-clamp 省略号样式增强 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 墨水屏设备外壳 —— 最外层硬件边框 */
.ink-device {
    background-color: #f0f0eb;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    position: relative;
    width: 370px;
    height: 580px;
    margin: 20px auto;
    border: 20px solid #f0f0eb;
    overflow: visible;
}
/* 🔥 电源按键：凸出在最外层边框右侧 */
.power-btn {
    position: absolute;
    top: 100px;
    right: -24px;
    width: 8px;
    height: 40px;
    background-color: #d0d0cb;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
/* 🔥 音量按键：凸出在最外层边框左侧 */
.volume-btn {
    position: absolute;
    top: 100px;
    left: -24px;
    width: 8px;
    height: 40px;
    background-color: #d0d0cb;
    border-radius: 4px 0 0 4px;
    cursor: pointer;
    z-index: 10;
}
.ink-screen {
    background-color: #e8e8e3;
    width: 330px;
    height: 480px;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid #c0c0bc;
    box-sizing: border-box;
    position: relative;
}
/* 底部硬件按键区域 —— 按键向下移动远离屏幕 */
.hardware-buttons {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: #f0f0eb;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2px;
}
/* 🔥 iPhone 早期经典圆形 Home 按键 */
.hw-btn-round {
    width: 40px;
    height: 40px;
    background-color: #d0d0cb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px #b0b0ac;
    cursor: pointer;
    user-select: none;
}
/* 🔥 iPhone4 风格：中间圆角正方形 */
.home-icon {
    width: 14px;
    height: 14px;
    border: 1.5px solid #888;
    border-radius: 4px;
}
/* 🔥 纯净无阴影数码管时间 */
.digital-time {
    font-family: 'DS-Digital', sans-serif;
    font-size: 80px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #222;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0;
    padding: 0;
}
/* 对话气泡 */
.bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 12px;
}
.bubble-left {
    background-color: #e0e0db;
    color: #222;
    align-self: flex-start;
}
.bubble-right {
    background-color: #d0d0cb;
    color: #222;
    align-self: flex-end;
}
.bubble-row {
    display: flex;
    align-items: flex-end;
    margin: 8px 0;
    gap: 8px;
}
.bubble-row-left {
    padding-left: 12px;
    justify-content: flex-start;
}
.bubble-row-right {
    padding-right: 12px;
    justify-content: flex-end;
    flex-direction: row-reverse;
}
.bubble-icon {
    flex-shrink: 0;
    width: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.bubble-icon svg,
.bubble-icon img {
    width: 24px;
    height: 24px;
    transform: translateY(-8px);
}

/* 页面统一样式 */
.page { display: none; width: 100%; height: 100%; }
.page.active { display: flex; flex-direction: column; }
.hidden { display: none; }

/* 🔥 全屏倾听覆盖层 */
.listen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e8e8e3;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.listen-overlay.active {
    display: flex;
}

/* 开机 / 关机 画面 */
.power-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #e8e8e3;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    gap: 16px;
    z-index: 9999;
}
.power-overlay.active {
    display: flex;
}

/* 设置菜单列表样式 */
.menu-item {
    padding: 14px 16px;
    border-bottom: 1px solid #d0d0c8;
    font-size: 15px;
    color: #222;
    display: flex;
    align-items: center;
}
.menu-item:active {
    background-color: #d8d8d3;
}
.menu-item:not(.no-arrow) {
    justify-content: space-between;
}
.menu-item:not(.no-arrow)::after {
    content: "›";
    font-size: 18px;
    color: #888;
    margin-left: 4px;
}
.menu-item.no-arrow {
    justify-content: space-between;
}
.menu-item .value {
    color: #888;
    font-size: 14px;
}
.menu-item:not(.no-arrow) {
    display: flex;
    align-items: center;
}
.menu-item:not(.no-arrow) span:first-child {
    flex-grow: 1;
}
.menu-item:not(.no-arrow) .value {
    margin-right: 4px;
}

/* 动画效果 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
}
