/* 结果展示区域样式 - 古风竹韵主题 */
.results-section {
    margin-bottom: var(--spacing-xl);
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    /* 古风竹韵背景 - 淡雅的森绿色渐变 */
    background: linear-gradient(135deg, rgba(44, 111, 89, 0.08), rgba(44, 111, 89, 0.04));
    /* 添加竹叶纹理背景 */
    background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><pattern id="bambooLeafSmall" width="200" height="200" patternUnits="userSpaceOnUse"><ellipse cx="40" cy="60" rx="12" ry="2" fill="rgba(44, 111, 89, 0.02)" transform="rotate(45 40 60)"/><ellipse cx="100" cy="40" rx="15" ry="2.5" fill="rgba(44, 111, 89, 0.025)" transform="rotate(-30 100 40)"/><ellipse cx="160" cy="100" rx="10" ry="1.5" fill="rgba(44, 111, 89, 0.02)" transform="rotate(60 160 100)"/><ellipse cx="75" cy="150" rx="14" ry="2" fill="rgba(44, 111, 89, 0.02)" transform="rotate(-45 75 150)"/><ellipse cx="175" cy="175" rx="11" ry="1.5" fill="rgba(44, 111, 89, 0.025)" transform="rotate(30 175 175)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23bambooLeafSmall)"/></svg>');
    background-position: 0 0;
    background-repeat: repeat;
    background-size: 200px 200px;
    border-radius: 12px;
    border: 1px solid rgba(44, 111, 89, 0.15);
    backdrop-filter: blur(5px) saturate(120%);
    -webkit-backdrop-filter: blur(5px) saturate(120%);
    box-shadow: 0 4px 16px rgba(44, 111, 89, 0.08);
}

.results-header h3 {
    color: #2c6f59; /* 森绿色 */
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 700;
}

.results-header i {
    font-size: 1.3rem;
    color: #2c6f59;
}

.results-container {
    display: grid;
    gap: 1.5rem;
}

/* 结果项 - 古风卡片设计 */
.result-item {
    background: rgba(255, 255, 255, 0.6);
    /* 添加竹叶纹理背景 */
    background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><defs><pattern id="bambooLeafCard" width="300" height="300" patternUnits="userSpaceOnUse"><ellipse cx="60" cy="90" rx="18" ry="3" fill="rgba(44, 111, 89, 0.015)" transform="rotate(45 60 90)"/><ellipse cx="150" cy="60" rx="22" ry="3.5" fill="rgba(44, 111, 89, 0.02)" transform="rotate(-30 150 60)"/><ellipse cx="240" cy="150" rx="15" ry="2.5" fill="rgba(44, 111, 89, 0.015)" transform="rotate(60 240 150)"/><ellipse cx="112" cy="225" rx="20" ry="3" fill="rgba(44, 111, 89, 0.015)" transform="rotate(-45 112 225)"/><ellipse cx="262" cy="262" rx="16" ry="2.5" fill="rgba(44, 111, 89, 0.02)" transform="rotate(30 262 262)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23bambooLeafCard)"/></svg>');
    background-position: 0 0;
    background-repeat: repeat;
    background-size: 300px 300px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(44, 111, 89, 0.06);
    border: 1px solid rgba(44, 111, 89, 0.12);
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
}

.result-item:hover {
    box-shadow: 0 8px 24px rgba(44, 111, 89, 0.12);
    transform: translateY(-3px);
    border-color: rgba(44, 111, 89, 0.2);
}

.result-item.success {
    border-left: 4px solid #2c6f59; /* 森绿色左边框 */
}

.result-item.error {
    border-left: 4px solid #c85450; /* 温和的红色 */
}

.result-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(44, 111, 89, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.result-file-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
    min-width: 0;
}

.result-file-icon {
    font-size: 1.8rem;
    color: #2c6f59; /* 森绿色图标 */
    flex-shrink: 0;
    opacity: 0.8;
}

.result-file-details {
    flex: 1;
    min-width: 0;
}

.result-file-name {
    font-weight: 700;
    color: #2c3e50; /* 深色文字 */
    margin: 0 0 var(--spacing-xs) 0;
    word-break: break-all;
    font-size: 1.1rem;
}

.result-file-meta {
    font-size: 0.85rem;
    color: #5a6165; /* 温和的灰色 */
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.result-file-meta span {
    background: rgba(44, 111, 89, 0.06);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.result-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(44, 111, 89, 0.08);
}

.result-status.success {
    color: #2c6f59;
    background: rgba(44, 111, 89, 0.1);
}

.result-status.error {
    color: #c85450;
    background: rgba(200, 84, 80, 0.1);
}

.result-body {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
}

/* 链接展示 - 古风设计 */
.links-container {
    display: grid;
    gap: 1rem;
}

.link-group {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(44, 111, 89, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.link-group-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c6f59; /* 森绿色标题 */
    margin: 0 0 0.8rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(44, 111, 89, 0.1);
}

.link-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(44, 111, 89, 0.08);
    transition: all 0.3s ease;
}

.link-item:last-child {
    margin-bottom: 0;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(44, 111, 89, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 111, 89, 0.08);
}

.link-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c6f59;
    min-width: 80px;
    flex-shrink: 0;
    background: rgba(44, 111, 89, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
}

.link-url {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(44, 111, 89, 0.08);
    word-break: break-all;
    user-select: all;
}

.link-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.link-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.link-btn.copy {
    background: linear-gradient(45deg, #388e72, #2c6f59);
    color: white;
    box-shadow: 0 2px 8px rgba(44, 111, 89, 0.2);
}

.link-btn.copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 111, 89, 0.3);
}

.link-btn.copy.copied {
    background: linear-gradient(45deg, #28a745, #20c997);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.link-btn.open {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.link-btn.open:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Markdown 链接展示 - 古风设计 */
.markdown-links {
    margin-top: 1rem;
}

.markdown-item {
    margin-bottom: 0.8rem;
}

.markdown-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c6f59;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.markdown-label i {
    color: #2c6f59;
    font-size: 0.9rem;
}

.markdown-code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 10px;
    word-break: break-all;
    user-select: all;
    position: relative;
    border: 1px solid rgba(44, 111, 89, 0.2);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.1);
}

.markdown-code::before {
    content: attr(data-lang);
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.7rem;
    color: rgba(236, 240, 241, 0.6);
    text-transform: uppercase;
    background: rgba(44, 111, 89, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}



/* 错误信息 - 古风设计 */
.error-message {
    background: rgba(200, 84, 80, 0.08);
    color: #c85450;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(200, 84, 80, 0.15);
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message i {
    color: #c85450;
    font-size: 1.1rem;
}

/* 响应式设计 - 保持古风美感 */
@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }

    .results-header h3 {
        font-size: 1.3rem;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem;
    }

    .result-file-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .result-file-meta span {
        text-align: center;
    }

    .link-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .link-label {
        min-width: auto;
        text-align: center;
    }

    .link-actions {
        justify-content: center;
    }


}

@media (max-width: 480px) {
    .results-header h3 {
        font-size: 1.2rem;
    }

    .result-file-name {
        font-size: 1rem;
    }

    .link-url {
        font-size: 0.7rem;
    }

    .markdown-code {
        font-size: 0.7rem;
        padding: 0.8rem;
    }



    .result-body {
        padding: 1rem;
    }

    .link-group {
        padding: 0.8rem;
    }
}

/* 动画效果 - 古风优雅动画 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.results-section {
    animation: fadeInScale 0.6s ease-out;
}

.result-item {
    animation: slideInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-fill-mode: both;
}

.result-item:nth-child(2) {
    animation-delay: 0.15s;
}

.result-item:nth-child(3) {
    animation-delay: 0.3s;
}

.result-item:nth-child(4) {
    animation-delay: 0.45s;
}

/* 复制成功动画 - 优雅的脉冲效果 */
@keyframes copySuccess {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(44, 111, 89, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(44, 111, 89, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(44, 111, 89, 0.2);
    }
}

.link-btn.copy.copied {
    animation: copySuccess 0.4s ease-out;
}

/* 竹叶飘落动画 - 为背景增加生动感 */
@keyframes leafFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.6;
    }
    100% {
        transform: translateY(0) rotate(360deg);
        opacity: 0.3;
    }
}

.result-item::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><ellipse cx="10" cy="10" rx="8" ry="2" fill="rgba(44, 111, 89, 0.1)" transform="rotate(45 10 10)"/></svg>');
    animation: leafFloat 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}
