
/* 扩展项按钮样式 */
.extension-item {
    position: relative; 
    overflow: hidden; 
    min-width: 280px;
    max-width: 280px;
    height: 280px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.extension-item.checking-availability {
    opacity: 0.8;
}

.extension-item.unavailable {
    opacity: 0.6;
    filter: grayscale(100%);
}

.extension-item.unavailable .ext-actions {
    display: none;
}

.unavailable-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.unavailable-text {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.ext-image-container {
    position: relative;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}

.ext-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ext-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.ext-type {
    background-color: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.repost-badge {
    background-color: rgba(255, 165, 0, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.ext-content {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ext-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    flex-grow: 1;
}

.ext-desc {
    margin: 0 0 8px 0;
    font-size: 0.875rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ext-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    margin-top: auto;
}

.ext-rating {
    color: #FFB400;
    display: flex;
    align-items: center;
}

.ext-rating i {
    margin-right: 4px;
}

.ext-author {
    color: #666;
}

.ext-date {
    font-size: 0.75rem;
    color: #999;
    margin-top: 8px;
}

.extension-item .ext-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    gap: 8px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 5;
}

/* Removed hover effect */

.extension-item .ext-btn {
    flex: 1;
    padding: 6px 0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.extension-item .download-btn {
    background-color: #4F46E5;
    color: white;
}

.extension-item .download-btn:hover {
    background-color: #4338CA;
}

.extension-item .detail-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1e293b;
}

.extension-item .detail-btn:hover {
    background-color: white;
}

/* 详情弹窗样式 */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 8px;
    color: #94a3b8;
    border-radius: 4px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-modal:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

.ext-full-image, .tool-full-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
    height: 300px;
    object-fit: contain;
    object-position: center;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ext-full-image:hover, .tool-full-image:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ext-meta-full {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background-color: #f8fafc;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.meta-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.meta-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 4px;
}

.meta-value {
    font-weight: 500;
    color: #1e293b;
}

.ext-desc-full, .tool-desc-full {
    line-height: 1.7;
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.modal-download, .open-tool-btn {
    background-color: #4F46E5;
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    min-width: 160px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-download:hover, .open-tool-btn:hover {
    background-color: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.modal-download.unavailable {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.modal-download.unavailable:hover {
    background-color: #94a3b8;
    transform: none;
    box-shadow: none;
}
