/* 导航栏收藏按钮 */
.btn-favorites {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e91e63, #f06292);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-favorites:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

.favorites-count {
    background: rgba(255, 255, 255, 0.9);
    color: #e91e63;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
}

/* 工具卡片操作按钮 */
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.tool-actions {
    display: flex;
    gap: 8px;
}

.tool-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-action:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.favorite-btn.favorited {
    background: linear-gradient(135deg, #e91e63, #f06292);
    color: white;
}

.rating-btn:hover {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: white;
}

/* 工具统计 */
.tool-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    font-size: 14px;
    color: #ddd;
}

.rating-stars i.filled {
    color: #ffc107;
}

.rating-text {
    font-weight: 600;
    color: #333;
}

.rating-count {
    color: #666;
    font-size: 12px;
}

.tool-metrics {
    display: flex;
    gap: 12px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

/* 评分表单 */
.rating-form {
    padding: 24px;
}

.tool-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tool-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
}

.star-rating {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    cursor: pointer;
}

.star-rating i {
    font-size: 24px;
    color: #ddd;
    transition: all 0.3s ease;
}

.star-rating i:hover,
.star-rating i.hover,
.star-rating i.active {
    color: #ffc107;
    transform: scale(1.1);
}

/* 收藏列表 */
.favorites-content {
    padding: 24px;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.favorite-item:hover {
    background: #e9ecef;
}

.favorite-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.favorite-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    padding: 6px;
}

.favorite-actions {
    display: flex;
    gap: 8px;
}

.btn-visit,
.btn-unfavorite {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-visit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-unfavorite {
    background: #dc3545;
    color: white;
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.3s ease;
    min-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-submit,
.btn-cancel {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-cancel {
    background: #f8f9fa;
    color: #666;
}