/* 适配主页玻璃拟态与 Capcut 特色的紫色主题 */

/* 背景特效重新着色为紫色/粉色系 */
.orb-capcut-1 {
    width: 500px;
    height: 500px;
    background: #a855f7;
    top: -200px;
    right: -100px;
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}
.orb-capcut-2 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    bottom: -150px;
    left: -100px;
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite reverse;
}
.orb-capcut-3 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: float 15s ease-in-out infinite;
}

.gradient-purple {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.back-link {
    color: #a855f7;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 10px;
    display: inline-block;
}
.back-link:hover {
    text-decoration: underline;
}

/* 覆盖主页默认的红色 Primary 按钮为紫色 */
.btn-primary {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.settings-bar {
    display: flex;
    justify-content: center;
    padding: 20px;
    margin-bottom: 24px;
}
.setting-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.custom-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    width: 100px;
    text-align: center;
    outline: none;
    font-size: 1rem;
    transition: border 0.3s;
}
.custom-input:focus {
    border-color: #a855f7;
}

/* 左右分栏布局 */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

.panel {
    display: flex;
    flex-direction: column;
}

.custom-textarea {
    width: 100%;
    height: 400px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    font-size: 1rem;
    resize: none;
    outline: none;
    font-family: inherit;
    margin-bottom: 16px;
    transition: all 0.3s;
}
.custom-textarea:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.controls-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.full-width-btn {
    margin-top: 16px;
}
.full-width-btn .btn-primary {
    width: 100%;
}

.stats-mini {
    color: #aaa;
    font-size: 0.9rem;
}
.stats-mini .divider {
    margin: 0 8px;
    color: #555;
}

.output-container {
    height: 400px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 16px;
}
.output-container::-webkit-scrollbar {
    width: 6px;
}
.output-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

/* JS 生成的类名样式适配 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
}
.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.group-header {
    background: rgba(168, 85, 247, 0.15);
    padding: 10px 16px;
    border-radius: 8px;
    margin: 16px 0 8px 0;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.group-title {
    display: flex;
    justify-content: space-between;
    color: #e8b0ff;
    font-weight: 500;
}

.paragraph-card {
    background: rgba(45, 45, 45, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: transform 0.2s, background 0.2s;
}
.paragraph-card.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.paragraph-card.warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}
.paragraph-card:hover {
    transform: translateX(4px);
    border-color: rgba(168, 85, 247, 0.5);
}

.paragraph-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.paragraph-number {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8b0ff;
    font-size: 0.95rem;
}
.num {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: #fff;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
}

.char-count {
    font-size: 0.85rem;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}
.char-count.error { 
    color: #ef4444; 
    background: rgba(239, 68, 68, 0.1);
}
.char-count.warning { 
    color: #f59e0b; 
    background: rgba(245, 158, 11, 0.1);
}

.paragraph-content {
    padding: 16px;
    font-size: 0.95rem;
    color: #e0e0e0;
    line-height: 1.6;
}

.group-copy-bar {
    margin: 16px 0 24px 0;
}
.btn-group-copy {
    width: 100%;
    padding: 12px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #e8b0ff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-family: inherit;
    font-size: 0.95rem;
}
.btn-group-copy:hover {
    background: rgba(168, 85, 247, 0.4);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid #22c55e;
    color: #fff;
    padding: 12px 24px;
    border-radius: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}