/* ===== Hitokoto 每日一言 ===== */
.hk-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 40px 32px;
    margin-bottom: 24px;
    box-shadow: 0 10px 32px rgba(99, 102, 241, 0.08);
    position: relative;
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.hk-quote-mark {
    position: absolute;
    top: 10px;
    left: 26px;
    font-size: 84px;
    font-weight: 900;
    color: #6366f1;
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
    opacity: 0.18;
    user-select: none;
}

.hk-quote-text {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    line-height: 1.9;
    padding: 18px 14px 22px;
    min-height: 80px;
    transition: opacity .2s ease;
    word-break: break-word;
}

.hk-quote-text.is-loading::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 3px solid #e0e7ff;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: hk-spin .8s linear infinite;
    vertical-align: middle;
}

@keyframes hk-spin {
    to { transform: rotate(360deg); }
}

.hk-quote-meta {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #6b7280;
    padding-bottom: 6px;
}

.hk-quote-meta > span {
    display: inline-block;
}

.hk-quote-meta > span + span::before {
    content: "·";
    margin-right: 8px;
    color: #d1d5db;
}

.hk-quote-from,
.hk-quote-by {
    color: #4b5563;
}

.hk-quote-type {
    background: #eef2ff;
    color: #6366f1;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
}

.hk-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hk-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    border-radius: 12px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}

.hk-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.hk-btn.hk-primary {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}

.hk-btn.hk-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}

.hk-btn.is-done {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.hk-category {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    align-items: center;
}

.hk-cat-label {
    font-size: 13px;
    color: #9ca3af;
    margin-right: 4px;
}

.hk-cat {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s ease;
    font-weight: 500;
}

.hk-cat:hover {
    border-color: #c7d2fe;
    color: #4f46e5;
}

.hk-cat.is-on {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.hk-card-history {
    padding: 28px 32px;
}

.hk-history-title {
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    text-align: left;
}

.hk-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hk-history-item {
    background: #f9fafb;
    border: 1px solid #eef2ff;
    border-radius: 12px;
    padding: 14px 18px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background .15s ease;
}

.hk-history-item:hover {
    background: #f5f6ff;
}

.hk-history-text {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.7;
}

.hk-history-meta {
    font-size: 12px;
    color: #9ca3af;
}

.hk-history-meta span + span::before {
    content: " · ";
    color: #d1d5db;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .hk-card {
        padding: 28px 18px;
        border-radius: 16px;
    }
    .hk-quote-mark {
        font-size: 64px;
        left: 16px;
    }
    .hk-quote-text {
        font-size: 18px;
        padding: 12px 6px 16px;
    }
    .hk-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    .hk-cat {
        padding: 5px 11px;
        font-size: 11px;
    }
}

/* ===== Dark Mode ===== */
[data-theme="dark"] .hk-card {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .hk-quote-mark {
    color: #a5b4fc;
    opacity: 0.22;
}
[data-theme="dark"] .hk-quote-text {
    color: #f3f4f6;
}
[data-theme="dark"] .hk-quote-meta {
    color: #9ca3af;
}
[data-theme="dark"] .hk-quote-from,
[data-theme="dark"] .hk-quote-by {
    color: #d1d5db;
}
[data-theme="dark"] .hk-quote-type {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}
[data-theme="dark"] .hk-actions { border-top-color: #374151; }
[data-theme="dark"] .hk-btn {
    background: #374151;
    color: #e5e7eb;
    border-color: #4b5563;
}
[data-theme="dark"] .hk-btn:hover {
    background: #4b5563;
    color: #f9fafb;
}
[data-theme="dark"] .hk-btn.hk-primary {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}
[data-theme="dark"] .hk-btn.is-done {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}
[data-theme="dark"] .hk-category { border-top-color: #374151; }
[data-theme="dark"] .hk-cat-label { color: #9ca3af; }
[data-theme="dark"] .hk-cat {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}
[data-theme="dark"] .hk-cat:hover {
    border-color: #6366f1;
    color: #a5b4fc;
}
[data-theme="dark"] .hk-cat.is-on {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}
[data-theme="dark"] .hk-history-title { color: #f9fafb; }
[data-theme="dark"] .hk-history-item {
    background: #111827;
    border-color: #374151;
}
[data-theme="dark"] .hk-history-item:hover {
    background: #1f2937;
    border-color: #4f46e5;
}
[data-theme="dark"] .hk-history-text { color: #e5e7eb; }
[data-theme="dark"] .hk-quote-text.is-loading::after {
    border-color: #4338ca;
    border-top-color: #a5b4fc;
}
