
.persona-input-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.persona-input-modal-container {
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    background: var(--bg-color, #0A0A0A);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.2s;
}
@media (max-width: 550px) {
    .persona-input-modal-container {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
}
.persona-input-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    border: 0.5px solid rgba(255,255,255,0.2);
}
.persona-input-modal-close i {
    font-size: 14px;
    color: var(--text-color-8, rgba(255,255,255,0.8));
}
.persona-input-modal-close:hover {
    background: var(--text-color-1, rgba(255,255,255,0.1));
}
.persona-input-modal-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px 24px 28px;
    scrollbar-width: thin;
}
.persona-input-modal-form-group {
    margin-bottom: 28px;
}
.persona-input-modal-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}
/* 头像区域 */
.persona-input-modal-avatar-section {
    position: relative;
    margin-bottom: 32px;
    padding-top: 12px;
}
.persona-input-modal-avatar-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}
.persona-input-modal-avatar-backdrop {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 60px 60px;
    pointer-events: none;
    z-index: 0;
}
.persona-input-modal-avatar-backdrop.has-backdrop {
    opacity: 0.7;
}
.persona-input-modal-avatar-backdrop::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 100%);
    pointer-events: none;
    border-radius: inherit;
}
.persona-input-modal-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a2e, #1a1a1e);
    border: 3px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}
.persona-input-modal-avatar:hover {
    border-color: rgba(122, 65, 219, 0.6);
    transform: scale(1.02);
}
.persona-input-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.persona-input-modal-avatar-placeholder {
    font-size: 52px;
    color: rgba(255, 255, 255, 0.3);
}
.persona-input-modal-avatar-capsule {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 35, 0.9);
    backdrop-filter: blur(12px);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
    letter-spacing: -0.2px;
}
/* 输入框 */
.persona-input-modal-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    outline: none;
    transition: all 0.2s;
}
.persona-input-modal-field:focus {
    border-color: #7a41db;
    background: rgba(255, 255, 255, 0.08);
}
.persona-input-modal-field.error {
    border-color: #e76262;
}
.persona-input-modal-error-msg {
    font-size: 12px;
    color: #e76262;
    margin-top: 6px;
    display: none;
}
/* 多行文本框 */
.persona-input-modal-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 400;
    color: #ffffff;
    outline: none;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    min-height: 120px;
}
.persona-input-modal-textarea:focus {
    border-color: #7a41db;
    background: rgba(255, 255, 255, 0.08);
}
.persona-input-modal-word-count {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}
.persona-input-modal-word-count.warning {
    color: #e76262;
}
/* 复选框 */
.persona-input-modal-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.persona-input-modal-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7a41db;
}
.persona-input-modal-checkbox-label {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    margin-bottom: 0 !important;
}
.persona-input-modal-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}
/* 声音选择器 */
.persona-input-modal-voice-selector {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
}
.persona-input-modal-voice-selector:hover {
    background: var(--text-color-1, rgba(255,255,255,0.08));
}
.persona-input-modal-voice-selector.no-voice .persona-input-modal-voice-name {
    opacity: 0.5;
}
.persona-input-modal-voice-selector.no-voice .persona-input-modal-waveform {
    opacity: 0.5;
}
.persona-input-modal-voice-selector.has-error {
    border-color: #e76262;
}
.voice-selector-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.voice-selector-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 0 12px 18px;
    cursor: pointer;
    width: fit-content;
}
.voice-selector-arrow {
    padding: 12px 18px;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}
.voice-selector-arrow i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}
.persona-input-modal-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
}
.persona-input-modal-wave-bar {
    background-color: white;
    width: 2px;
    margin: 0 1px;
    border-radius: 2px;
    height: 100%;
    transition: height 0.2s ease;
}
.persona-input-modal-wave-bar:nth-child(1) { height: 30%; }
.persona-input-modal-wave-bar:nth-child(2) { height: 70%; }
.persona-input-modal-wave-bar:nth-child(3) { height: 50%; }
.persona-input-modal-wave-bar:nth-child(4) { height: 90%; }
.persona-input-modal-wave-bar:nth-child(5) { height: 40%; }

.persona-input-modal-waveform.playing .persona-input-modal-wave-bar {
    animation: persona-wave 1s infinite ease-in-out;
}
.persona-input-modal-waveform.playing .persona-input-modal-wave-bar:nth-child(1) { animation-delay: 0s; }
.persona-input-modal-waveform.playing .persona-input-modal-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.persona-input-modal-waveform.playing .persona-input-modal-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.persona-input-modal-waveform.playing .persona-input-modal-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.persona-input-modal-waveform.playing .persona-input-modal-wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes persona-wave {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.persona-input-modal-voice-name-gender {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.persona-input-modal-voice-name {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
/* 底部按钮 */
.persona-input-modal-footer {
    padding: 20px 24px 28px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-color, #0A0A0A);
}
.persona-input-modal-submit {
    width: 100%;
    background: var(--primary-btn-bg, #7a41db);
    border: none;
    border-radius: 60px;
    padding: 14px 0;
    font-weight: 600;
    font-size: 17px;
    color: var(--primary-btn-text-color, white);
    cursor: pointer;
    transition: all 0.2s;
}
.persona-input-modal-submit:hover {
    background: #936df5;
    transform: scale(0.98);
}
.persona-input-modal-delete {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 60px;
    padding: 12px 0;
    margin-top: 12px;
    font-weight: 500;
    font-size: 15px;
    color: #e76262;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.persona-input-modal-delete:hover {
    background: rgba(231, 98, 98, 0.08);
}
/* 确认气泡（复用角色弹窗样式） */
.confirm-bubble {
    position: fixed;
    background: rgba(30, 30, 35, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 20px;
    width: 260px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    z-index: 10010;
    text-align: center;
    transform-origin: center top;
    animation: bubbleSlideUp 0.2s ease-out;
}
@keyframes bubbleSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.confirm-bubble p {
    color: white;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
}
.bubble-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.bubble-cancel, .bubble-confirm {
    flex: 1;
    padding: 10px 0;
    border-radius: 40px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
}
.bubble-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
.bubble-confirm {
    background: #e76262;
    color: white;
}
@media (max-width: 550px) {
    .confirm-bubble { width: 240px; padding: 18px; }
}