/* 舔狗日记组件样式 */
.dog-diary-widget {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-primary);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* 头部 */
.dog-diary-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border-primary);
}

.dog-diary-title {
    display: flex;
    align-items: center;
    flex-direction: row !important;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.dog-diary-title .dog-icon,
.dog-diary-title svg {
    width: 20px;
    height: 20px;
    color: #ff6b9d;
    fill: #ff6b9d;
    animation: heartbeat 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 内容区域 */
.dog-diary-content {
    padding: 20px;
    position: relative;
}

/* 文字容器 - 自适应宽度 */
.dog-diary-text-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

/* 背景层 - 手绘感不规则圆角 */
.dog-diary-text-wrapper::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -16px;
    right: -16px;
    bottom: -12px;
    background: var(--classD, #f0f4f8);
    border-style: solid;
    border-color: var(--classC, #e2e8f0);
    /* 手绘感不规则圆角 */
    border-bottom-left-radius: 20px 115px;
    border-bottom-right-radius: 115px 20px;
    border-top-left-radius: 250px 15px;
    border-top-right-radius: 25px 80px;
    z-index: 0;
}

.dog-diary-text {
    position: relative;
    z-index: 1;
    font-size: 15px;
    line-height: 1.8;
    color: var(--routine, var(--text-content));
    text-align: left;
    padding: 0;
}

.dog-diary-text .highlight {
    background: linear-gradient(120deg, #ffe082 0%, #ffd54f 100%);
    background-repeat: no-repeat;
    background-size: 100% 45%;
    background-position: 0 85%;
    padding: 0 2px;
    font-weight: 500;
    color: #5d4037;
}

/* 底部刷新按钮 */
.dog-diary-footer {
    display: flex;
    justify-content: center;
    padding: 12px;
    border-top: 1px solid var(--border-secondary);
}

.dog-diary-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.dog-diary-refresh:hover {
    background: var(--theme-color);
    color: #fff;
    transform: rotate(180deg);
}

.dog-diary-refresh:active {
    transform: rotate(360deg) scale(0.95);
}

.dog-diary-refresh svg {
    width: 18px;
    height: 18px;
}

.dog-diary-refresh.loading {
    animation: spin 1s linear infinite;
    pointer-events: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 深色模式适配 */
html[data-theme="dark"] .dog-diary-text-wrapper::before {
    background: var(--classD, #2a3038);
    border-color: var(--classC, #3a4550);
}

html[data-theme="dark"] .dog-diary-text {
    color: var(--routine, #d4c8b8);
}

html[data-theme="dark"] .dog-diary-text .highlight {
    background: linear-gradient(120deg, #b7791f 0%, #b7791f 100%);
    background-repeat: no-repeat;
    background-size: 100% 45%;
    background-position: 0 85%;
    color: #ffeaa7;
}

/* 响应式 */
@media (max-width: 768px) {
    .dog-diary-content {
        padding: 16px;
    }
    
    .dog-diary-text {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .dog-diary-text-wrapper::before {
        top: -10px;
        left: -14px;
        right: -14px;
        bottom: -10px;
    }
}
