/* AI提示词大全插件样式 - 苹果拟态风格 */

.xb-aitsc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    border-radius: 20px;
    position: relative;
}

.xb-aitsc-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.15) 0%, transparent 50%);
    border-radius: 20px;
    pointer-events: none;
}

/* 页面标题样式 - 拟态风格 */
.xb-aitsc-page-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border-radius: 20px;
    box-shadow:
        20px 20px 60px #bebebe,
        -20px -20px 60px #ffffff,
        inset 5px 5px 10px rgba(0, 0, 0, 0.1),
        inset -5px -5px 10px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 公告样式 - 移到底部，拟态风格 */
.xb-aitsc-notice {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 20px;
    margin-top: 40px;
    box-shadow:
        15px 15px 30px rgba(102, 126, 234, 0.3),
        -15px -15px 30px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.xb-aitsc-notice-info {
    background: linear-gradient(145deg, #4facfe, #00f2fe);
    color: white;
    padding: 20px 25px;
    border-radius: 15px;
    border-left: 5px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.1),
        inset -3px -3px 6px rgba(255, 255, 255, 0.2);
}

/* 筛选和排序区域 - 拟态风格 */
.xb-aitsc-filters {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow:
        15px 15px 30px #d1d1d1,
        -15px -15px 30px #ffffff;
    border: none;
    position: relative;
    z-index: 1;
}

.xb-aitsc-filter-group {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.xb-aitsc-filter-group:last-child {
    margin-bottom: 0;
}

.xb-aitsc-filter-label {
    font-weight: 600;
    color: #2c3e50;
    margin-right: 10px;
    font-size: 14px;
    min-width: 80px;
}

.xb-aitsc-filter-btn,
.xb-aitsc-sort-btn {
    display: inline-block;
    padding: 10px 18px;
    background: linear-gradient(145deg, #f0f0f0, #cacaca);
    color: #4a5568;
    text-decoration: none !important;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow:
        5px 5px 10px #c7c7c7,
        -5px -5px 10px #ffffff;
    position: relative;
}

.xb-aitsc-filter-btn:hover,
.xb-aitsc-sort-btn:hover {
    color: #2d3748;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow:
        7px 7px 15px #c7c7c7,
        -7px -7px 15px #ffffff;
}

.xb-aitsc-filter-btn.active,
.xb-aitsc-sort-btn.active {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.2),
        inset -5px -5px 10px rgba(255, 255, 255, 0.1),
        5px 5px 10px #c7c7c7,
        -5px -5px 10px #ffffff;
}

.xb-aitsc-filter-btn:active,
.xb-aitsc-sort-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 3px 3px 6px #c7c7c7,
        inset -3px -3px 6px #ffffff;
}

/* 提示词网格布局 */
.xb-aitsc-prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* 提示词卡片 - 拟态风格 */
.xb-aitsc-prompt-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    padding: 25px;
    box-shadow:
        15px 15px 30px #d1d1d1,
        -15px -15px 30px #ffffff;
    border: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.xb-aitsc-prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 20px 20px 0 0;
}

.xb-aitsc-prompt-card:hover {
    transform: translateY(-8px);
    box-shadow:
        20px 20px 40px #d1d1d1,
        -20px -20px 40px #ffffff;
}

/* 提示词标题 - 使用自定义样式而非h标签 */
.xb-aitsc-prompt-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.4;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 提示词元信息 */
.xb-aitsc-prompt-header {
    margin-bottom: 15px;
}

.xb-aitsc-prompt-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.xb-aitsc-category-tag {
    background: linear-gradient(145deg, #4facfe, #00f2fe);
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow:
        3px 3px 6px rgba(79, 172, 254, 0.3),
        -3px -3px 6px rgba(255, 255, 255, 0.8);
}

.xb-aitsc-hot-count {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 600;
}

/* 提示词内容 */
.xb-aitsc-prompt-content {
    color: #4a5568;
    line-height: 1.6;
    margin: 15px 0 20px 0;
    font-size: 14px;
    max-height: 120px;
    overflow: hidden;
    padding: 18px 20px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: none;
    box-shadow:
        inset 8px 8px 16px #d1d9e0,
        inset -8px -8px 16px #ffffff;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 提示词图片预览 */
.xb-aitsc-prompt-image {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(145deg, #f0f0f0, #cacaca);
    box-shadow:
        10px 10px 20px #d1d1d1,
        -10px -10px 20px #ffffff;
    position: relative;
}

.xb-aitsc-prompt-image a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: relative;
}

.xb-aitsc-prompt-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.xb-aitsc-prompt-image:hover img {
    transform: scale(1.05);
}

.xb-aitsc-prompt-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

.xb-aitsc-prompt-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, #e9ecef);
    border-radius: 0 0 15px 15px;
}

/* 操作按钮 - 优化尺寸 */
.xb-aitsc-prompt-actions {
    text-align: center;
}

.xb-aitsc-copy-btn {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 90px;
    box-shadow:
        5px 5px 10px rgba(102, 126, 234, 0.3),
        -5px -5px 10px rgba(255, 255, 255, 0.8);
}

.xb-aitsc-copy-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        7px 7px 15px rgba(102, 126, 234, 0.4),
        -7px -7px 15px rgba(255, 255, 255, 0.9);
}

.xb-aitsc-copy-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.2),
        inset -3px -3px 6px rgba(255, 255, 255, 0.1);
}

/* 提示词来源样式 */
.xb-aitsc-prompt-source {
    display: inline-block;
    margin-left: 15px;
    padding: 8px 14px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    color: #4a5568;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    box-shadow:
        inset 3px 3px 6px #d1d9e0,
        inset -3px -3px 6px #ffffff;
}

/* 统计信息样式 */
.xb-aitsc-stats-info {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    padding: 20px 25px;
    border-radius: 20px;
    margin-top: 30px;
    margin-bottom: 20px;
    box-shadow:
        15px 15px 30px #d1d1d1,
        -15px -15px 30px #ffffff;
    text-align: center;
    position: relative;
    z-index: 1;
}

.xb-aitsc-stats-info p {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
}

.xb-aitsc-stats-info strong {
    color: #667eea;
    font-size: 20px;
    font-weight: 700;
}

/* 无数据提示 */
.xb-aitsc-no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.xb-aitsc-no-data p {
    font-size: 16px;
    margin: 0;
}

/* 自定义提示框 - 拟态风格 */
.xb-aitsc-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #2d3748, #1a202c);
    color: white;
    padding: 18px 30px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.3),
        -10px -10px 20px rgba(255, 255, 255, 0.1),
        inset 2px 2px 4px rgba(255, 255, 255, 0.1),
        inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}

.xb-aitsc-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1.05);
}

/* 响应式设计 - 拟态风格适配 */
@media (max-width: 768px) {
    .xb-aitsc-container {
        padding: 15px;
        border-radius: 15px;
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    }

    .xb-aitsc-page-title {
        font-size: 24px;
        margin-bottom: 20px;
        padding: 20px 20px;
        box-shadow:
            10px 10px 20px #bebebe,
            -10px -10px 20px #ffffff,
            inset 3px 3px 6px rgba(0, 0, 0, 0.1),
            inset -3px -3px 6px rgba(255, 255, 255, 0.8);
    }

    .xb-aitsc-prompts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .xb-aitsc-filter-group {
        margin-bottom: 15px;
    }

    .xb-aitsc-filter-label {
        margin-right: 0;
        margin-bottom: 8px;
        width: 100%;
        font-weight: 700;
        color: #2d3748;
    }

    /* 手机端排序按钮在同一行显示 */
    .xb-aitsc-filter-group:last-child {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .xb-aitsc-filter-group:last-child .xb-aitsc-filter-label {
        width: 100%;
        margin-bottom: 10px;
    }

    .xb-aitsc-sort-btn {
        flex: 0 0 auto;
        margin-right: 8px;
        margin-bottom: 8px;
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 12px;
    }

    .xb-aitsc-prompt-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* 手机端复制按钮优化 */
    .xb-aitsc-copy-btn {
        width: auto;
        padding: 8px 16px;
        font-size: 12px;
        border-radius: 12px;
        min-width: 70px;
    }

    .xb-aitsc-filters {
        padding: 20px;
        border-radius: 15px;
        box-shadow:
            10px 10px 20px #d1d1d1,
            -10px -10px 20px #ffffff;
    }

    .xb-aitsc-prompt-card {
        padding: 20px;
        border-radius: 15px;
        box-shadow:
            10px 10px 20px #d1d1d1,
            -10px -10px 20px #ffffff;
    }

    /* 手机端图片优化 */
    .xb-aitsc-prompt-image {
        height: 160px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    /* 手机端来源信息优化 */
    .xb-aitsc-prompt-source {
        display: block;
        margin-left: 0;
        margin-top: 10px;
        text-align: center;
        font-size: 11px;
        padding: 6px 12px;
    }

    /* 手机端统计信息优化 */
    .xb-aitsc-stats-info {
        padding: 15px 20px;
        margin-top: 20px;
        margin-bottom: 15px;
    }

    .xb-aitsc-stats-info p {
        font-size: 14px;
    }

    .xb-aitsc-stats-info strong {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .xb-aitsc-prompt-card {
        padding: 15px;
    }

    .xb-aitsc-prompt-title {
        font-size: 16px;
    }

    .xb-aitsc-page-title {
        font-size: 20px;
    }

    /* 分类按钮在手机端也要合理布局 */
    .xb-aitsc-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
        margin-bottom: 5px;
    }

    /* 超小屏幕图片优化 */
    .xb-aitsc-prompt-image {
        height: 140px;
    }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .xb-aitsc-prompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* 加载动画 */
.xb-aitsc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: xb-aitsc-spin 1s ease-in-out infinite;
}

@keyframes xb-aitsc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 成功提示样式 */
.xb-aitsc-toast.success {
    background: linear-gradient(145deg, #4facfe, #00f2fe);
    box-shadow:
        10px 10px 20px rgba(79, 172, 254, 0.3),
        -10px -10px 20px rgba(255, 255, 255, 0.1),
        inset 2px 2px 4px rgba(255, 255, 255, 0.2),
        inset -2px -2px 4px rgba(0, 0, 0, 0.1);
}

/* 错误提示样式 */
.xb-aitsc-toast.error {
    background: linear-gradient(145deg, #ff6b6b, #ee5a24);
    box-shadow:
        10px 10px 20px rgba(255, 107, 107, 0.3),
        -10px -10px 20px rgba(255, 255, 255, 0.1),
        inset 2px 2px 4px rgba(255, 255, 255, 0.2),
        inset -2px -2px 4px rgba(0, 0, 0, 0.1);
}

/* 按钮禁用状态 */
.xb-aitsc-copy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 优化无数据提示 */
.xb-aitsc-no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    grid-column: 1 / -1;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    box-shadow:
        inset 10px 10px 20px #d1d1d1,
        inset -10px -10px 20px #ffffff;
}

/* 滚动条美化 */
.xb-aitsc-container::-webkit-scrollbar {
    width: 8px;
}

.xb-aitsc-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.xb-aitsc-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.xb-aitsc-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* 搜索框样式 */
.xb-aitsc-search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    align-items: center;
}

.xb-aitsc-search-box input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow:
        inset 5px 5px 10px #d1d1d1,
        inset -5px -5px 10px #ffffff;
    color: #4a5568;
    font-weight: 500;
}

.xb-aitsc-search-box input:focus {
    box-shadow:
        inset 3px 3px 6px #d1d1d1,
        inset -3px -3px 6px #ffffff,
        0 0 0 3px rgba(102, 126, 234, 0.2);
}

.xb-aitsc-search-box input::placeholder {
    color: #a0aec0;
}

/* 搜索按钮样式 */
.xb-aitsc-search-btn {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
    box-shadow:
        5px 5px 10px rgba(102, 126, 234, 0.3),
        -5px -5px 10px rgba(255, 255, 255, 0.8);
}

.xb-aitsc-search-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        7px 7px 15px rgba(102, 126, 234, 0.4),
        -7px -7px 15px rgba(255, 255, 255, 0.9);
}

.xb-aitsc-search-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.2),
        inset -3px -3px 6px rgba(255, 255, 255, 0.1);
}

/* 优化手机端筛选布局 */
@media (max-width: 768px) {
    .xb-aitsc-filter-group:first-child {
        flex-direction: column;
        align-items: flex-start;
    }

    .xb-aitsc-filter-group:first-child .xb-aitsc-filter-btn {
        margin-right: 8px;
        margin-bottom: 8px;
    }

    /* 手机端搜索相关样式优化 */
    .xb-aitsc-search-box {
        gap: 8px;
        margin-bottom: 20px;
    }

    .xb-aitsc-search-box input {
        padding: 10px 15px;
        font-size: 13px;
    }

    .xb-aitsc-search-btn {
        width: auto;
        padding: 10px 12px;
        font-size: 14px;
        min-width: 45px;
        max-width: 120px;
        border-radius: 12px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .xb-aitsc-search-box {
        flex-direction: column;
        gap: 10px;
    }

    .xb-aitsc-search-box input {
        width: 100%;
    }

    .xb-aitsc-search-btn {
        font-size: 20px;
        min-width: 35%;
    }
}