@import url('https://fonts.cdnfonts.com/css/ds-digital');

.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;
}

.volume-btn-secondary {
    top: 146px;
}

.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;
}

.hw-btn-round {
    width: 78px;
    height: 42px;
    background-color: #f0f0eb;
    border-radius: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px #b0b0ac;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s ease;
}

.hw-btn-round:active {
    background-color: #e0e0db;
}

.home-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.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;
}
