/* 进度条样式 - 视频播放器风格动画 */
.progress-line {
    height: 4px;
    background: #e5e7eb;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-radius: 2px;
}

.progress-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* 正在填充的动画效果 */
.progress-line.animating::before {
    animation: progress-fill 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes progress-fill {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* 当前活动的进度条（正在进行中） */
.progress-line.active::before {
    width: 50%;
    background: linear-gradient(90deg, #10b981 0%, #059669 50%, #10b98150 100%);
    animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% {
        width: 50%;
        opacity: 1;
    }
    50% {
        width: 60%;
        opacity: 0.8;
    }
}

/* 闪光效果 */
.progress-line.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 60%;
    background: linear-gradient(90deg, transparent 80%, rgba(255,255,255,0.5), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* 已完成的进度条 */
.progress-line.completed {
    background: #10b981;
}

.progress-line.completed::before {
    width: 100%;
    background: #10b981;
}

/* 步骤节点样式 - 增强交互 */
.step-node {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.step-node:hover:not(.cursor-not-allowed) {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.step-node.active {
    border-color: #10b981;
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.1);
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}

.step-node.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
    animation: complete-bounce 0.5s ease;
}

@keyframes complete-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.step-node.completed .step-icon {
    color: white;
    animation: icon-rotate 0.5s ease;
}

@keyframes icon-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.step-node.active {
    animation: pulse 2s infinite;
}

/* 内容区域切换动画 - 平滑过渡 */
.content-panel {
    display: none;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-panel.active {
    display: block;
    animation: panel-fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes panel-fade-in {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 模式选择卡片 - 3D效果 */
.mode-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg);
}

.mode-card:hover {
    transform: perspective(1000px) rotateX(-5deg) translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
}

.mode-card:active {
    transform: perspective(1000px) rotateX(-2deg) translateY(-5px);
    transition: all 0.1s ease;
}

/* 流式输出相关样式 */
.skeleton-card {
    position: relative;
    overflow: hidden;
}

.skeleton-text {
    background: #f0f0f0;
    border-radius: 4px;
    min-height: 1.2em;
    position: relative;
    overflow: hidden;
}

.skeleton-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: skeleton-wave 1.5s infinite;
}

@keyframes skeleton-wave {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 打字机光标效果 */
.typewriter-cursor {
    display: inline;
    animation: cursor-blink 1s infinite;
    color: #10b981;
    font-weight: bold;
    margin-left: 0px;
    vertical-align: baseline;
}

/* 文本wrapper样式 */
.title-wrapper,
.content-wrapper {
    display: inline;
}

@keyframes cursor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* 流式加载动画 */
.stream-loading {
    text-align: center;
    padding: 2rem;
}

.stream-loading-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stream-loading-animation {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stream-dot {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    animation: stream-pulse 1.4s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.stream-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.stream-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes stream-pulse {
    0%, 80%, 100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    40% {
        transform: scale(1.4) translateY(-8px);
        opacity: 0.8;
    }
}

.stream-loading-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    animation: text-fade 0.6s ease-in-out;
}

@keyframes text-fade {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 进度条样式 */
.loading-progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 1.5rem;
    position: relative;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 9999px;
    animation: progress-indeterminate 2s ease-in-out infinite;
    position: relative;
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: progress-shimmer 2s linear infinite;
}

@keyframes progress-indeterminate {
    0% {
        transform: translateX(-100%) scaleX(0.5);
    }
    50% {
        transform: translateX(0) scaleX(1);
    }
    100% {
        transform: translateX(100%) scaleX(0.5);
    }
}

@keyframes progress-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 卡片样式 - 悬浮效果增强 */
.idea-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    border: 2px solid transparent;
    cursor: pointer;
    transform: translateZ(0);
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
}

.idea-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(16, 185, 129, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.idea-card:hover:not(.skeleton-card) {
    transform: translateY(-6px) translateZ(0);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
}

.idea-card:hover::after {
    opacity: 1;
}

.idea-card.selected {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    animation: selected-glow 2s ease infinite;
}

@keyframes selected-glow {
    0%, 100% { box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 2px 20px rgba(16, 185, 129, 0.4); }
}

.idea-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.idea-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.75rem;
    padding-right: 3.5rem;
    min-height: 1.5em;
    flex-shrink: 0;
    position: relative;
}

.idea-content {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-right: 1.5rem;
    min-height: 3em;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.select-idea-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: auto;
    width: 100%;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.select-idea-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.select-idea-btn:hover:not(:disabled) {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.select-idea-btn:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.select-idea-btn:active:not(:disabled) {
    transform: scale(0.98);
    transition: all 0.1s ease;
}

.select-idea-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #9ca3af;
}

/* 卡片进入动画 - 弹性效果 */
.stream-card-enter {
    opacity: 0;
    transform: translateY(40px) scale(0.9) rotateX(10deg);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.stream-card-visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
}

/* 卡片完成动画 - 波纹效果 */
.card-complete {
    animation: card-complete-pulse 0.5s ease;
    position: relative;
}

.card-complete::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.3);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes card-complete-pulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.05); }
    60% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .step-container {
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .step-wrapper {
        min-width: 600px;
    }
}

/* 可编辑内容样式 */
.editable {
    position: relative;
    cursor: default;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-height: 1.5em;
    display: inline-block;
}

.editable[contenteditable="true"] {
    background-color: white;
    outline: 2px solid #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    cursor: text;
}

/* 编辑按钮组 */
.edit-controls {
    display: none;
    margin-left: 10px;
    gap: 6px;
}

.edit-controls.show {
    display: inline-flex;
}

.edit-controls button {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-controls .save-btn {
    background: #10b981;
    color: white;
}

.edit-controls .save-btn:hover {
    background: #059669;
}

.edit-controls .cancel-btn {
    background: #ef4444;
    color: white;
}

.edit-controls .cancel-btn:hover {
    background: #dc2626;
}

.edit-icon {
    color: #3b82f6;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s;
    cursor: pointer;
}

/* 标题的编辑图标（行内） */
.idea-title .edit-icon {
    margin-left: 6px;
}

/* 内容的编辑图标（右上角） */
.idea-content .edit-icon {
    position: absolute;
    top: 0;
    right: 0;
}

.edit-icon:hover {
    opacity: 1 !important;
    color: #2563eb;
    transform: scale(1.1);
}

/* 当父元素悬停时显示编辑图标 */
.idea-title:hover .edit-icon:not(.editing),
.idea-content:hover .edit-icon:not(.editing),
h4:hover .edit-icon:not(.editing),
h5:hover .edit-icon:not(.editing),
p:hover .edit-icon:not(.editing) {
    opacity: 0.6;
}

.editable.editing .edit-icon {
    display: none;
}

/* 大纲编辑样式 */
.outline-section {
    position: relative;
}

.outline-section .edit-icon {
    font-size: 14px;
    transition: all 0.2s ease;
}

.outline-section h4 .edit-icon {
    margin-left: auto;
}

.outline-section .editable {
    position: relative;
}

.outline-section .editable:hover .edit-icon {
    opacity: 0.6;
}

.outline-section textarea {
    font-family: inherit;
    line-height: 1.6;
}

/* 编辑容器动画效果 */
.outline-edit-container {
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 编辑时的textarea增强 */
.outline-edit-container textarea {
    font-size: 15px;
    line-height: 1.7;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.outline-edit-container textarea::-webkit-scrollbar {
    width: 6px;
}

.outline-edit-container textarea::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.outline-edit-container textarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.outline-edit-container textarea::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* textarea的hover和focus状态增强 */
.outline-edit-container textarea:hover {
    border-color: #60a5fa;
}

.outline-edit-container textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 保存提示 */
.save-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.save-hint.show {
    opacity: 1;
    transform: translateY(0);
}

/* 滑块样式 */
.slider-thumb {
    -webkit-appearance: none;
}

.slider-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.slider-thumb::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(139, 92, 246, 0.6);
}

.slider-thumb::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
    border: none;
}

.slider-thumb::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(139, 92, 246, 0.6);
}

/* 小尺寸滑块样式 */
.slider-thumb-small {
    -webkit-appearance: none;
}

.slider-thumb-small::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.slider-thumb-small::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.6);
}

.slider-thumb-small::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
    border: none;
}

.slider-thumb-small::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.6);
}

/* 快速选择按钮动画 */
.quick-select-btn {
    position: relative;
    overflow: hidden;
}

.quick-select-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.quick-select-btn:active::before {
    width: 200px;
    height: 200px;
}

/* 页面入场动画 */
@keyframes page-enter {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: page-enter 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-delay-1 {
    opacity: 0;
    animation: page-enter 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: page-enter 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

/* 导航栏动画 */
nav {
    animation: slide-down 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-down {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 智能滚动提示样式 */
.scroll-hint {
    position: fixed;
    bottom: 100px;  /* 调高位置，避免遮挡控制按钮 */
    right: 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    z-index: 100;
    animation: fadeInUp 0.3s ease-out;
    max-width: 200px;  /* 限制最大宽度 */
}

.scroll-hint-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.scroll-hint-content i {
    font-size: 14px;
}

.scroll-hint-btn {
    margin-left: 6px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.scroll-hint-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* 弹跳动画 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}