/* 容器内部样式重置，替代原全局*重置 */
.narrative-box, .live-module, .live-header, .live-badge, .live-screen,
.danmaku, .live-scene, .idol-portrait, .chat-window, .char-name,
.dialog-text, .actions-panel, .action-btn, .status-section,
.status-header, .status-grid, .status-item, .item-label, .item-value,
.init-setup-box, .input-group, .input-label, .input-field,
.generate-btn, #config-output {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 卡片根容器（保留最外层div时生效，不需要可删除） */
.idol-mansion {
    max-width: 820px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(135, 206, 250, 0.2);
    border: 2px solid rgba(135, 206, 250, 0.4);
    position: relative;
    overflow: hidden;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

.narrative-box {
    background: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #FFB6C1;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

.live-module { margin: 24px 0; position: relative; }
.live-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 10px; 
    font-size: 13px; 
    color: #ff6f91; 
    font-weight: bold; 
}
.live-badge { 
    background: #ff6f91; 
    color: white; 
    padding: 3px 10px; 
    border-radius: 20px; 
    font-size: 11px; 
    animation: breathe 3s infinite ease-in-out; 
    box-shadow: 0 0 10px #ff6f91;
}
.live-screen { 
    background:linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    height: 130px; 
    border-radius: 16px; 
    position: relative; 
    overflow: hidden; 
    border: 2px solid #fff; 
    box-shadow: inset 0 0 20px rgba(255,255,255,0.5);
}
.danmaku {
    position: absolute; 
    white-space: nowrap; 
    color: #fff; 
    font-size: 14px; 
    font-weight: 600; 
    text-shadow: 1px 1px 2px rgba(168, 85, 247, 0.4);
    animation: fly linear infinite; 
    opacity: 0.95;
}
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } }
@keyframes fly { from { left: 100%; transform: translateX(20px); } to { left: 0%; transform: translateX(-100%); } }

.live-scene {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 25px;
    background: #f0f8ff;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(135, 206, 250, 0.3);
    position: relative;
}
.idol-portrait {
    width: 100%;
    height: 400px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}
.idol-portrait:hover {
    transform: scale(1.02);
}
.chat-window {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border-top: 1px solid #eee;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    border-radius: 0 0 12px 12px;
}
.char-name {
    background: #87CEFA;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 8px;
}
.dialog-text {
    color: #4682B4;
    font-size: 15px;
    line-height: 1.6;
}
.actions-panel {
    margin-bottom: 30px;
}
.action-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #555;
}
.action-btn:hover {
    border-color: #87CEFA;
    background: #f0faff;
    color: #4682B4;
    padding-left: 25px;
}
.action-btn:active {
    background: #e0f0fa;
    transform: scale(0.99);
}
.status-section {
    background: #fdfdfd;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.status-header {
    font-size: 16px;
    font-weight: bold;
    color: #4682B4;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #e0e7ff;
}
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    font-size: 13px;
}
.status-item.long-text {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    background: #f9fbff;
    border-color: #e6f0ff;
}
.item-label {
    font-weight: bold;
    color: #888;
    margin-right: 10px;
}
.status-item.long-text .item-label {
    margin-bottom: 4px;
    color: #87CEFA;
}
.item-value {
    color: #555;
    font-weight: 500;
    text-align: right;
}
.status-item.long-text .item-value {
    text-align: left;
    width: 100%;
    color: #333;
}
.init-setup-box {
    background: #f4f8fb;
    border: 2px solid #dbeafe;
    border-radius: 12px;
    padding: 20px;
}
.init-setup-box h4 {
    color: #4682B4;
    font-size: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}
.input-label {
    width: 80px;
    font-size: 13px;
    color: #666;
    font-weight: bold;
}
.input-field {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    transition: 0.3s;
    font-size: 13px;
}
.input-field:focus {
    border-color: #87CEFA;
    box-shadow: 0 0 0 3px rgba(135, 206, 250, 0.2);
}
.generate-btn {
    width: 100%;
    background: linear-gradient(to right, #87CEFA, #4682B4);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}
.generate-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
#config-output {
    display: none;
    margin-top: 15px;
    background: #2d3748;
    color: #a0aec0;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    font-family: monospace;
    white-space: pre-wrap;
    border: 1px solid #4a5568;
    position: relative;
}
#config-output::after {
    content: '🎀 请复制以上内容发送给偶像';
    display: block;
    text-align: center;
    color: #87CEFA;
    margin-top: 10px;
    font-size: 11px;
}
@media (max-width: 600px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
    .input-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .input-label {
        width: 100%;
        margin-bottom: 4px;
    }
    .input-field {
        width: 100%;
    }
    .idol-portrait {
        height: 280px;
    }
}