/* ===== 汉字转拼音 ===== */
.hp-hero {
    background: linear-gradient(160deg, #faf5ff 0%, #f5f3ff 100%);
    border: 1px solid #ede9fe;
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 26px;
    box-shadow: 0 12px 36px rgba(139, 92, 246, .08);
}

.hp-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.hp-logo {
    font-size: 28px;
    background: #ede9fe;
    border-radius: 14px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-title {
    font-size: 20px;
    font-weight: 800;
    color: #5b21b6;
}

.hp-sub {
    font-size: 13px;
    color: #a78bfa;
}

.hp-input {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    border: 1.5px solid #ddd6fe;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.7;
    color: #1e1b4b;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.hp-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .12);
}

.hp-input::placeholder {
    color: #c4b5fd;
}

.hp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.hp-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 26px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, opacity .2s;
    box-shadow: 0 6px 18px rgba(124, 58, 237, .28);
}

.hp-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(124, 58, 237, .36);
}

.hp-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.hp-btn-ghost {
    border: 1px solid #ddd6fe;
    background: #fff;
    color: #7c3aed;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.hp-btn-ghost:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
}

.hp-hint {
    font-size: 12px;
    color: #a78bfa;
}

/* ===== 结果区 ===== */
.hp-results {
    margin-top: 22px;
}

.hp-empty {
    text-align: center;
    padding: 34px 16px;
    border: 1.5px dashed #ddd6fe;
    border-radius: 14px;
    color: #8b5cf6;
}

.hp-empty-emoji {
    font-size: 30px;
    margin-bottom: 8px;
}

.hp-empty p {
    margin: 2px 0;
    font-weight: 600;
}

.hp-empty-sub {
    font-size: 12px;
    color: #c4b5fd;
    font-weight: 400 !important;
}

.hp-row {
    border: 1px solid #ede9fe;
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.hp-row-src {
    font-size: 15px;
    font-weight: 700;
    color: #312e81;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ede9fe;
    word-break: break-all;
}

.hp-items {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

@media (max-width: 720px) {
    .hp-items { grid-template-columns: 1fr; }
}

.hp-item {
    border: 1px solid #ede9fe;
    background: #faf9ff;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.hp-item:hover {
    border-color: #c4b5fd;
    background: #f5f3ff;
}

.hp-item-label {
    font-size: 11px;
    color: #a78bfa;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hp-item-copy {
    font-size: 11px;
    color: #8b5cf6;
    font-weight: 700;
}

.hp-item-val {
    font-size: 15px;
    font-weight: 600;
    color: #1e1b4b;
    word-break: break-all;
    line-height: 1.5;
}

.hp-item.copied .hp-item-copy {
    color: #10b981;
}

.hp-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
}

/* ===== 黑夜模式 ===== */
::root[data-theme="dark"] .hp-hero {
    background: linear-gradient(160deg, #1e1b2e 0%, #171b2d 100%);
    border-color: #2e2740;
    box-shadow: none;
}

::root[data-theme="dark"] .hp-logo {
    background: #2e2740;
}

::root[data-theme="dark"] .hp-title { color: #c4b5fd; }

::root[data-theme="dark"] .hp-sub { color: #8b5cf6; }

::root[data-theme="dark"] .hp-input {
    background: #131c31;
    border-color: #2e2740;
    color: #e5e7eb;
}

::root[data-theme="dark"] .hp-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .18);
}

::root[data-theme="dark"] .hp-input::placeholder { color: #4b5563; }

::root[data-theme="dark"] .hp-btn-ghost {
    background: transparent;
    border-color: #2e2740;
    color: #a78bfa;
}

::root[data-theme="dark"] .hp-btn-ghost:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, .1);
}

::root[data-theme="dark"] .hp-hint { color: #6d6d7d; }

::root[data-theme="dark"] .hp-empty {
    border-color: #2e2740;
    color: #a78bfa;
}

::root[data-theme="dark"] .hp-empty-sub { color: #6d6d7d; }

::root[data-theme="dark"] .hp-row {
    background: #131c31;
    border-color: #2e2740;
}

::root[data-theme="dark"] .hp-row-src {
    color: #e5e7eb;
    border-bottom-color: #2e2740;
}

::root[data-theme="dark"] .hp-item {
    background: #0f172a;
    border-color: #2e2740;
}

::root[data-theme="dark"] .hp-item:hover {
    border-color: #7c3aed;
    background: #1a2138;
}

::root[data-theme="dark"] .hp-item-label { color: #8b5cf6; }

::root[data-theme="dark"] .hp-item-val { color: #e5e7eb; }

::root[data-theme="dark"] .hp-error {
    border-color: #7f1d1d;
    background: #2a1515;
    color: #fca5a5;
}
